| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Gertje plus Squalou plus Forexhard EA https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=485 |
Page 11 of 18 |
| Author: | SteveHopwood [ Wed Apr 25, 2012 8:59 am ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
Latest update in post 1. I realised why G++ is not returning to original lot size when a basket is closed. If you do not use lot incrementing, you do not need the update for now. Sing out if the fix does not work. |
|
| Author: | acostafulano [ Wed Apr 25, 2012 1:01 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
Thanks for your reply. Still, what I'm trying to understand is why the "Stoptrading = true" inputs within the code of LookForBreakEvenAfter if its not being called as a condition to trigger it! Could any coder please enlighten me, at least only for peace of mind? About the "DEATHTRADES"... I agree 100% that these is the system's only flaw but with some kind of early exit logic (paired with its inherent hedging) the strategy would be "deathproof".... That's what I think the LookForBreakEvenAfter input should be in charge of doing, but it seems not to be doing the trick as it is coded right now. Your approach using Jumping stop from $5 (about 5 pips in your case) makes sense but this could still get you a death trade in an extreme scenario (I'm getting some of this big grids opened with a TP of 10... not so far from that, you see?) |
|
| Author: | mantkinth [ Wed Apr 25, 2012 1:24 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
Indeed even with the Jumping stop of $5 you can still get stuck in a death trade lol ive been backtesting it on GBPUSD with Dukas tic data with various settings, and it doesnt matter what your settings are... sometimes you will get stuck in a death trade lol, its too bad when you use Empty4 craptester you can't manually exit cause its automatic, then tell it to continue lol Heck even with a $3 jumping stop, I still get into death trades with different settings.. Also you can't have too many of the grids runnings at once (well depending on your lot size and account size). Like worst cast scenario is having a 3k floating loss or more if you get into a death trade with 0.1 lots and 20 grid size with 10 levels. I am thinking of making the grid size maybe dynamic instead of fixed (based on ATR or something).. need to have a look on how to do that and see if it helps or anything |
|
| Author: | magft [ Wed Apr 25, 2012 4:06 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
That is not exactly correct, i'll try to translate. //Basket closure at breakeven if LookForBreakevenAfter trades are open if (OpenTrades > LookForBreakevenAfter) //Number of Open trades more than LookForBreakevenAfter { if (MathAbs(OpenBuys - OpenSells) == 1) //if the different between open buys and sells is 1 (buy=2 and sells=3) { if (upl >= 0) //we are in some profit { if (StopTradingAfterBasketClosure) StopTrading = true; //This is to stop further baskets opening if required so if StopTradingAfterBasketClosure=false wont set CloseAllTrades(); //So got this far close all trades DeleteRemainingPendingLines();//Remove pending price lines if (ForceTradeClosure) return; }//if (upl >= 0) }//if (MathAbs(OpenBuys - OpenSells == 1) }// if (OpenTrades > LookForBreakevenAfter) So it will only close at BE if we have say 2 buys and 3 sells open,which means more trades than LookForBreakevenAfter=4 and we are in profit. Hope that helps. Mike |
|
| Author: | magft [ Wed Apr 25, 2012 4:20 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
I have been thinking the same about a dynamic grid size, just need to add a ATR calc in SetUpBuyGrid() and SetUpSellGrid() which would fix it for that basket of trades. Or are you thinking of changing the space between lines during a basket for trades as this would be a lot more tricky. In the attached pic you can see i have a crappy situation on AUDCHF with 2 buys and 2 sells, when the next trade opens unless the market keeps moving in that dir the basket wont close. Worst case it could go back other way and open another opposite trade. Maybe we should look to minimise loses and close basket if we get stuck with equal number of trades open (say 2 or 3 of each) and back in the CZ, any thoughts? I am loving this EA though, i've attached my current results for last 7 trading days. Regards Mike |
|
| Author: | acostafulano [ Wed Apr 25, 2012 4:53 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
Thanks for the explanation regarding the code. Much appreciated Now, I'm loving the EA so far. It has a good entry, its safe because of its inherent hedging and works very well in picking up the moves because of the grid its based on, but this precise "crappy situations" is what I think we should look to avoid. I also think that in this "crappy situations" the best thing to do would be just exit (aim for zero profit) and wait for the next CZ and entry and right now the function which aims at that "LookForBReakevenAfter" is not doing the trick (At least not for me). What you suggest of closing the basket when stuck is precisely what the EA needs, but closing right at the middle of the grid where both the sells and buys are in loss wouldn't be taking the hit at the point of maximum DD for these positions? |
|
| Author: | acostafulano [ Wed Apr 25, 2012 6:56 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
What you're saying here can be achieved with Rangeboundtradeclosure. It checks that buys = sells. For example for closure @4 buys and 4 sells you have to set it to 8. |
|
| Author: | SWG123 [ Wed Apr 25, 2012 8:18 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
That will get you out, but you will still take a big loss. We need to scale out elegantly. How about after x longs and x corresponding shorts, and it's starting to hurt, we reverse the grid and hedge the hedges. It then becomes a conventional grid trader until losses are under control? Will that work? Sounds like it should, but it's too late for me to try the maths. Anybody out there feeling clever? |
|
| Author: | mantkinth [ Thu Apr 26, 2012 1:28 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
Hmm hedge the hedges, but the death trade happens when its properly hedged lol... basically with Gerte when you run out of levels, and each side has the same amount of sells and buys is when your screwed hehe. Your loss will never increase but its a huge loss Basically the worst case scenario can be calculated before starting up the grid.. Also if you reverse the grid, you are just adding to more possible losses, and not to mention the increased margin used. I dont think there is an automatic way besides takign the loss (which Steve has programmed in already), unless you use your manual trading strategies to try to unbalance the sides and hope you can reduce the losses/or get out (aka martingaling and hoping you pick the right direction). But heck i doubt you can ever program something like into an ea which will do it automatically. Going back to post 1, this ea can't be fully automated unless you take the hit when it happens.. its semi automatic as you need to save trades lol. #Think about why the EA was made, and why we using Squalo's indicator... we are trading breakouts and we dont care which direction... problem happens when we have false breaks. If its a true breakout, we can lock in some profit and stop the death trade from ever happening.. its when we can't aka you enter a buy and it goes 1 pip before slamming through the sell level.. which goes for 20 pips, triggering the next level, then going all the way back past the first buy and even further hit the 1st buy level.. and back down to hit level 2 of sell, then back up.. as you add the lots and average down your positions as more levels are open the more you dig yourself into a hole |
|
| Author: | Caillou [ Thu Apr 26, 2012 2:01 pm ] |
| Post subject: | Re: Gertje plus Squalou plus Forexhard EA |
Deleted |
|
| All times are UTC | Page 11 of 18 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|