DislikedMmmm. I just ran the backtester on the pairs that the EA has taken trades on over the last 5 days (EURCHF, GBPCAD, EURCAD), and nothing. No trades. It works on forward demo, just not in the backtester.
Bother. Not sure why. Certainly nothing obvious. Closed market?
SimonIgnored
if (TradingStatus == ReversalBuy) ReversalBuy();
if (TradingStatus == ReversalSell) ReversalSell();
if (TradingStatus == TrendBuy) TrendBuy();
if (TradingStatus == TrendSell) TrendSell();
to
if (ReversalTradeDirection == buy) ReversalBuy();
if (ReversalTradeDirection== sell) ReversalSell();
if (TrendTradeDirection == buy) TrendBuy();
if (TrendTradeDirection == sell) TrendSell();
The EA is taking trades now, not sure if it's working as meant though. Anyway, the initial code didn't look right:
TradingStatus = none if no orders open so no trade functions ever get called.
Of course I might be completely missing the intended code logic here.