| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Euro Grid by Dietmar https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=116 |
Page 5 of 15 |
| Author: | gaheitman [ Mon Dec 05, 2011 9:45 pm ] |
| Post subject: | Re: Euro Grid by Dietmar |
Rick, Here's a slightly updated indicator. It allows you to change the step width as well as the start time down to the minute. It should allow you to manually investigate some of your ideas. It also tries to keep track of the max number of open trades and worst draw down/loss and displays it in the comments. I'm not counting that as fully debugged, so it's more directional. :> George |
|
| Author: | garyfritz [ Mon Dec 05, 2011 10:29 pm ] |
| Post subject: | Re: Euro Grid by Dietmar |
I agree you would probably benefit from calculating dynamic band sizes for the trap. Some analysis & thoughts on how this thing behaves... If I understand this beastie correctly, it always exits the TP with an equal number of positions on the winning side. That is you will have N longs from long1, N from long2, N from long3. The number on the losing side depends on how many times you've gone back & forth, and how deeply you went into the losing bands. So you might have M shorts from short1 and none from short2/3. The first direction you start out doesn't matter, just the direction you hit the TP. So e.g. if you go to long1-short1-longTP, you end up with 2 long positions from long1/2/3 and 1 short from short1. If you go short1-longTP, you have the same. I think, by definition, you will always end up with larger positions on the winning side (the side that hits the TP) than on the losing side. Unfortunately the loser-to-TP/SL distance is greater than the winner-to-TP distance, which gets worse for the deeper loser levels. If you go only 1 level deep on the losing side, you have 1 more long set than you have shorts, e.g. the 2 longs / 1 short example above. The deeper you get into the losing side, the worse off you are on the losers, because it increases the size of your losers. But each losing band you hit adds to the size of the winners. So e.g. if you to go short3-longTP, you have 1 set of shorts (total loss = 45+60 + 30+60 + 15+60 = 270) and 4 sets of longs (total gain = 4*45+4*30+4*15 = 360). I think the worst case is if you go back & forth multiple times, hitting a deep level on the losing side with large position sizes. Then the large losers outweigh the winners. Even the worst case of going back and forth, back and forth, really has reasonably limited risk. Let's say you went back & forth to long3/short3 10 times. Each time you get to long3, you've added 3 sets of shorts, and vice versa. So you'd end up with something like 30 shorts and 30 longs. But it's not as bad as it sounds because they all offset. Instead of hedging all these longs and shorts, you could instead hold a *net* position. Place a "+1" on each long level, "-1" on each short. Hit long1, change your position by "+1" -- add a long and decrement the short values. Hit short1, the value there is -2, so you add -2 to the position -- now you're short 1 (basically closed out your 1 long and added a short at short1), and you add +1 to the long levels. Hit short2, add -2 to position, now you're short 3 (1 at short1, 2 at short2), add +1 to the long levels. Now say you turn up and go to long TP. When you hit long1 you add +2 to your position, now you're short 1. (You basically just closed out your short1 short and added a long at long1, still have your 2 short2 shorts.) Hit long2, add +3, now you're long 2 (closed the short2 short positions and added 1 long at long2), then add 3 longs at long3, etc. This avoids hedging entirely. Your worst DD was just before you hit long2, when you had 2*60=120 loss from the short2 shorts, plus 15 from your long1. You end up with 45 (1 * long1) + 30 (1 * long2) + 45 (3 * long3) = 120 wins, minus 60 (2*short1-to-long1 losses), minus 120 (2*short2-to-long2 losses), for a net of -60. Did that make any sense to anyone?? So your maximum risk is determined by how many times you go back and forth. Say you bang back & forth between long1/short1 5 times. If you then go straight to long TP, you have 5 short1 shorts that get canceled out at long1 for 5 * 30 = 150 loss, plus 1 long at short1 and 7 longs at long2/3 for a nice profit. But it's very different if you go to short3 before you head to long TP. The long1/short1 positions cancel out. You have 6 shorts at short2 and 6 at short3, so you have 6 * 60 = 360pip exposure until you get to long2, when the long2 longs effectively close the 6 shorts at a 360pip loss. The 6 shorts at short3 get closed for a 6*90 = 540pip loss. Ouch. And you'll only have about 100 pips of wins to offset those. SO: I believe the more times you bang back & forth, the bigger your winning-side gains become -- but the bigger potential losses become, and those are bigger. If you never went deeper than level 1 on the losing side, the big position sizes benefit you. If you go deeper, the big position sizes hurt you. But you don't know if they'll help or hurt until you finally hit the TP, because until then you don't know which side is the winner. You could mitigate the risk by saying "I give up and close the position the Nth time I try to increase size" or something like that. Or refuse to increase the position size beyond N. Or something similar to that. Just some thoughts... |
|
| Author: | ironrick [ Tue Dec 06, 2011 7:45 am ] |
| Post subject: | Re: Euro Grid by Dietmar |
George, Thanks for the updates to your PRICETRAP indi! Unfortunately I can't get it to actually draw anything on screen except for the comments at the top of the screen. The old indi from Dietmar's original thread works fine though. I am just getting into Empty4 code though so I don't know if it is me or a bug. Maybe it has to do with allowing the custom step width? Couple of questions as well: 1) Are the trade stats in the comments section for the last day's trade only? Or is it showing a total or an average or the max stats/numbers for all the days in the chart's history (ie the worst day on the charts)? Not sure I am getting what is displayed in the comments section? 2) Is there a way to print the vital statistics of each day's trade above each trade (say above the imaginary TP line) rather than just in the comments section? 3) I have read the original thread that Dietmar references as the genisis of this system. That original author recommends trying step width settings based on ATR -- which is something Khalid also suggested. My idea was to try some using some ADR based scenarios. Is it possible to use either of these within the indicator? I have some ideas of the settings logic that could be used if it is possible. But I don't want to impose on you either! I will wait to hear from you. Gary I am working through the logic of your post. I may need sleep before I can totally understand. I like the thinking though -- and you and I have already said that a max trades limit could help on the "bad days". I have a few other ideas of limits or filters as well. Those are coming as I mull on them some more. I am waiting for George's excellent indi to help me with some basic ideas. Thanks again, All! Cheers, Rick |
|
| Author: | gaheitman [ Tue Dec 06, 2011 7:58 am ] |
| Post subject: | Re: Euro Grid by Dietmar |
Hmm, not much of an improvement, is it. The stats are cumulative for whatever history you have loaded in the chart. It currently prints the net pips calculated at the close of each bar along with the daily result. What else would you like to see? Let me know what you have in mind and I'll give it a go. George |
|
| Author: | lhDT [ Tue Dec 06, 2011 6:35 pm ] |
| Post subject: | Re: Euro Grid by Dietmar |
Today is a hard day for EuroGrid. Currently -42pips and 15 trades still running ... |
|
| Author: | forextrader-radioman [ Tue Dec 06, 2011 6:39 pm ] |
| Post subject: | EA still not working here, now with error messages |
Dragos, today I tested the EA again on my VPS ... one in EURUSD M5 Chart, Grid start should be at 08:00 B_roker time ... Screenshot of settings below ... EA did not set one single pending order ... nothing ... the second was running on GBPUSD M5 Chart, Grid start should be at 09:00 B_roker time ... Screenshot settings below, too ... EA tried to set pending orders, but at 11:03 B_roker time ...3 hours later?!? ... and there was no pending order set correctly but an endless flow of error messages (Screenshot below)... Why starts it to generate pending orders so late, 3 hours after the Grid-set-time in the EA? All of you a nice afternoon/evening, Dietmar first screenshot is EU settings second screenshot is GU settings third screenshot is GU error messages |
|
| Author: | gaheitman [ Tue Dec 06, 2011 7:11 pm ] |
| Post subject: | Re: EA still not working here, now with error messages |
Dragos, I believe the issue with not setting orders at all when the time passes is that the time tests in LookForTradingOpportunities() are looking for equality instead of being "greater than or equal to." An example of the code (there are multiple instances): Code: Select all Code: Select all George
|
|
| Author: | DragosDanescu [ Tue Dec 06, 2011 8:07 pm ] |
| Post subject: | Re: EA still not working here, now with error messages |
Thanks, George, but that generates another problem.If I use >=, it start shooting pendings all the way, not only 1 set, but a lot of them.Tried to stop it doing that by checking if Pendings !=0, but seems it doesn't work, no ideea why. Trying to find a solution.... |
|
| Author: | dynel14 [ Tue Dec 06, 2011 8:25 pm ] |
| Post subject: | Re: EA still not working here, now with error messages |
Had the same problem after I changed all Code: Select all Code: Select all Code: Select all Thank you George and Dragos, dynel14 |
|
| Author: | DragosDanescu [ Tue Dec 06, 2011 9:33 pm ] |
| Post subject: | Re: Euro Grid by Dietmar |
Ok, guys, please check 1st post for updated version.I hope I solved all the problems for now. Thanks George for your unvaluable help! Strange thing is that in backtester, if I use 01.01.2010 as starting day, it keeps opening loads of grid orders, if I switch to the next day, everything works fine.Must be voodoo.... Another problem was that void DefineLevels() was called too many times, accidentally...now solved. Dinamically LevelsOffset is calculated by Previous day range*0.15 (just pure guess). If you check the fixed value (let's say default of 15 pips)and ALSO select AutoLevelsOffset as true, EA ill choose the greatest value between them . So, if Previous day range = 160*0.15 = 24, EA will use 24 pips as level offset. You can see that also in the user display. Have fun P.S. I'm having fun now with UseDiffLevelLots=true, multiplier 1.5....no martingale |
|
| All times are UTC | Page 5 of 15 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|