Why this code, on Eur/usd, daily TF, opens/closes thousound of trades from the beginning to today
defparam cumulateorders = false
if onmarket then
sell at market
endif
buy at market
while, if I remove or comment out line 1, it only opens one trade (still runnung today)?
It is as if with it removed the buy and sell just cancel each other out but in the real world you would sell and then buy at a different price because of spread so they should not behave as they are doing.
With DEFPARAM CUMULATEORDERS = FALSE we have the additional issue that it only opens a trade on every other day when what it should do is close one trade and open another at the same time – but it waits one candle before opening a new trade. Did you not say in the other discussion about this that in real live trading this does not happen? If so then it is a major difference between back testing and live trading.
[attachment file=77531]
I’m afraid so.
I hope someone at PRT takes a look at our posts once in a while to address some issues.
I replied to their email and IG said that they were asking PRT to re-investigate these issues.