Backtest vs demo
-
Hello everyone, I have encountered a problem with my EA. EA worked perfectly on backtesting, but there are some hiccups on live demo account.
This photo on backtest shows houw it's supposed to look.

This photo on live demo show the mistake, as it took me out of trade mid candle for no apparent reason.
Here we have another example how it should look:

And again, the incorrect one:

It would seem that it closes the trade too soon. Any help would be greatly appreciated. -
Can you please share the link of your project?
-
It would seem that the problem lies in my blocks that close the trade. But I only have this setup for closing trades (i have it mirrored for sells) and i cannot seem to find the problem. It truly is weird why it would behave correctly on backtesting (on every tick) and not working correctly on live demo... is this perhaps some bug?

-
I changed it to this:

Hopefully this wil work. -
To round up my monologue, could the reasons for my problems on live demo be in the magic number of ea? I had the same magic number across dirfferent charts of different pairs. I have now changed all magic number. Could that have been the reason?
EDIT: The answer is not in the magic number as the problem persists...
I would greatly appreciate any help. -
@subotai Both 'if trade' blocks are specified for buys only, not sells. Additionally, both 'pips away from open price' blocks are using different 'adjust' multipliers.
-
I'm having the same problem with my EA and with almost the same blocks, did you manage to fix this problem? in backtesting works as expected but when I run the same EA in the demo it executes the blocks instantly after opening a trade instead of waiting till the position reach the 60 pips in "pips away" block

-
@sosel You should separate the break even block from that position. Its a loop connected to a previous loop 'For each trade'