If you do not use lot incrementing, you do not need the update for now.
Sing out if the fix does not work.
Thanks for your reply.mantkinth wrote: Note to your understanding of the highlighted line.. it just means if the unrealized profit and loss (upl) >= 0, aka break even or profit, the highlighted line doesnt really matter unless you set the robot to Stop trading after basket closure... effects nothing if you dont manually turn it on and off.
Lastly the only problem with the robot is what people have discovered called the "death trade", but the RangeBoundClosure is the only setting that will get you out... of course when that triggers the hit is substantiale. Need more strategies to get out of those problems early (assuming you leave it unattented... but then again if a basekt if still going for over a week, I think you should take control of it hehe).
What I have been doing to stay out of those "death trades", is set Jumping stop loss to start at like $5, and hey if i get stopped out at BE, im happy, no way to get into a "death trade". (Testing with 0.1 lots here, my Target is set at $50)
That is not exactly correct, i'll try to translate.acostafulano wrote:This is the part of the code that seems to take care of Breaking even (Which in over 2 weeks of testing with different settings and in 16 pairs haven't been able to observe even once; thus my suggestion that it may not be working correctly).
Again, I'm not coder, so I can only TRY to understand what's going on:
//Basket closure at breakeven if LookForBreakevenAfter trades are open
if (OpenTrades > LookForBreakevenAfter)
{
if (MathAbs(OpenBuys - OpenSells) == 1)
{
if (upl >= 0)
{
if (StopTradingAfterBasketClosure) StopTrading = true;
CloseAllTrades();
DeleteRemainingPendingLines();//Remove pending price lines
if (ForceTradeClosure) return;
}//if (upl >= 0)
}//if (MathAbs(OpenBuys - OpenSells == 1)
}//if (MathAbs(OpenBuys - OpenSells) == 1)
If some coder could please correct me:
From what I understand, the "closealltrades()" thingy will only be triggered "if" the "StopTradingAfterBasketClosure and/or "StopTrading" inputs are set to true?
If that's the case, then that's the reason that I'm not getting any closures at breakeven, ever...
Maybe I'm just looking ridiculous trying to understand all of this without knowing mql :S!
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.mantkinth wrote: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
magft wrote:mantkinth wrote:
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
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.acostafulano wrote:magft wrote:
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?
Mike
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?acostafulano wrote: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.acostafulano wrote:magft wrote:
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?
Mike