| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Desky. TDesk's trading drone. https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5545 |
Page 9 of 50 |
| Author: | SteveHopwood [ Tue Nov 06, 2018 11:56 am ] |
| Post subject: | Desky. TDesk's trading drone. |
V 1w is in post 1. I found Desky frozen this morning and found an Array out of range error at line 4400 - no idea why this should have happened. Do a search for "ArrayResize(TimeToStartTrading, ArraySize(TDeskSymbols));" Alter it slightly so that it is: ArrayResize(TimeToStartTrading, ArraySize(TDeskSymbols) + 1); I do not know if this will help. Re the rapid opening/closing of trades thingy reported in the Confused thread, I have absolutely no idea what is causing this. |
|
| Author: | SteveHopwood [ Wed Nov 07, 2018 11:14 am ] |
| Post subject: | Desky. TDesk's trading drone. |
V 1x is in post 1. Twice Desky showed the, "Your global cash TP has been hit. All your trades should have closed." message but little had happened. This is fixed in 1x. You do not need the update if you are not trading the entire position as a basket. DIYers, the mistakes I made in the code were ridiculous, but easy to fix. I had not actually populated the array that holds every ticket number in the global basket. Go to void CountTradesForGlobalBasket(), scroll down to just underneath, "if (OrderCloseTime() > 0) continue;" and insert the code that builds the array: Code: Select all Code: Select all |
|
| Author: | SteveHopwood [ Wed Nov 07, 2018 2:53 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
Mauro emailed today to remind me that Recovery is not quite working properly - I had forgotten. This should be fixed in 1x because I saw the problem within seconds of glaring at the code. I have not updated any version numbers because I have applied this fix to uploads of:
The fix is simple and you coders will see where I went wrong instantly:
BuyTickets[] is an array that can hold any number of elements - you can think of these as boxes and I will call them that from here on. The "[]" after the variable name tells the compiler that it is dealing with an array. The number of boxes goes inside the [] so that BuyTickets[4] is an array with 4 boxes. CrapQl4 indexes arrays starting from 0. Imagine there are three buy trades open with these ticket numbers: 123, 578; 692 and they are stored in the BuyTickes[3] array:
This is why "RecoveryTargetPrice/= ArraySize(BuyTickets);" failed. It was dividing the recovery target price by one more than it should have been. Yep. Bonkers. As I have often remarked in the past, welcome to my world. |
|
| Author: | c1borg [ Wed Nov 07, 2018 4:44 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
If you have time (might just be me) when shirt protection is selected the EA will not load. No rush as im not using it at the moment. Great work :hi: |
|
| Author: | SteveHopwood [ Wed Nov 07, 2018 5:08 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
Fixed in post 1. DIYers, go to the end of the file and scroll upwards for, "}//if (UseShirtProtection)". A few lines above that you you will see this code snippet: Code: Select all |
|
| Author: | billv [ Wed Nov 07, 2018 8:00 pm ] |
| Post subject: | Desky. TDesk's trading drone. |
Thanks Steve :hi: |
|
| Author: | Bruster400 [ Thu Nov 08, 2018 9:27 am ] |
| Post subject: | Desky. TDesk's trading drone. |
Thanks Steve, that helps me understand it........ even if I don't agree with it.... I don't want to offend anyone here so please all take this post as just my opinion and not a comment on anyone else's. I just wanted to add my view of how to automate SL and TP calculations and explain why I feel that price fractions isn't for me. When trading stocks, people tend to invest a lump of cash and then measure the performance based on the % change in the value of that cash. They don't care if they have to buy 10 shares with their lump or 1000 shares, it's all the same - it's just a lump sum invested. If price moves up, say 10%, then they might sell or add more. They are focussed on % price moves because that's the way it works. On forex, the banks work in much the same way. They will invest a % of their cash holding in a particular currency in the hope that it will deliver a % return. They are not bothered about pips but rather the current value of their lump sum invested. However, for the short term trader using leverage, things are very different. Short term trading is all about probability. We are looking for what is "most likely" to happen in terms of price movement. Our entries and money management are designed to be aligned to what is most "likely" to happen to price. An "edge" is simply a term used to describe the amount your strategy beats the average or random outcome. So when looking for SL's and TP's we should be looking for measures with similar probability of happening. Price moves don't always give us this. (and pip moves definitely don't!) Take USDCAD and NZDUSD as an example. Their current prices at this time are 1.31017 and 0.67918 resp. A 0.5% move in each would be a price move of 0.006551(USDCAD) and 0.003396(NZDUSD) resp. So this could be used as a TP or SL perhaps? Well, let's look at how "likely" those moves are. Based on a 14 day ATR, these moves would be 95% (USDCAD) and 261%(NZDUSD) of ATR. So for USDCAD to reach its 0.5% price move it would have to move less than it's done on average each day for the last 14 days - so that's quite likely. However, NZDUSD would have to move 2.61 times its average daily price move which is much less likely. So a 0.5% move in price is much more "likely" to happen on USDCAD than NZDUSD and that changes everything when you're betting on probabilities. If you're trading multiple currencies and you want to take the same "risk" on each, my belief is that you need to risk the same amount of cash on each "event" (SL or TP) that has the same probability of happening. I feel that sized positions and ATR based SL's and TP's are the only way to do this. Just my opinion.... Bruster |
|
| Author: | SteveHopwood [ Thu Nov 08, 2018 9:34 am ] |
| Post subject: | Desky. TDesk's trading drone. |
I will add this feature soon. |
|
| Author: | SteveHopwood [ Thu Nov 08, 2018 9:48 am ] |
| Post subject: | Desky. TDesk's trading drone. |
V 1y is in post 1. This update is only of interest to those of you with UseTradingDoneForTheWeek enabled, your target is hit and then you change your mind and decide to carry on trading. Pre-1y, this was impossible. Wait until the weekend if this is not an issue for you, as I will add ATR-based SL andTP. DIYers, do a search for, "//This allows DoneForTheWeek to reset to 'true' following a restart." and insert this just above: Code: Select all |
|
| Author: | tomele [ Thu Nov 08, 2018 11:08 am ] |
| Post subject: | Desky. TDesk's trading drone. |
Hi Bruster. We already have this possibility in Desky as well as in TDesk's simulation module. We have fixed pips, price fractions and atr percent as alternative SL/TP calculation methods. We obviously agree that fixed pips is the weakest method. I totally agree to what you write. Nevertheless, after 3 weeks of daily simulations on my side, price fractions have performed slightly better than atr percent in my scenario. The position sizing aspect might be the missing part that would change everything. Thanks for being the first one giving feedback. Cheers Thomas |
|
| All times are UTC | Page 9 of 50 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|