This is so funny: "there are no trading operations" even when forcing to open positions.

 
Here's a funny joke:
Imagine spending days tweaking your EA in order for it to be accepted by the old, non-customizable, obsolete check-up mechanism for the MT5 market.
You keep getting the same error over and over again: 

test on EURUSD,H1 (netting)

there are no trading operations

test on XAUUSD,D1 (netting)

there are no trading operations

test on GBPUSD,M30 (netting)

there are no trading operations

test on EURUSD,M1 (netting)

there are no trading operations

So, as a last resort, you create a simple, locally working EA that opens a position every 5 candles and... you guessed it!
It doesn't work! (I attached the mq5 file)


Unfortunately, this is not a joke.


Either someone help me or this will keep on going for ages.

Files:
test.mq5  2 kb
 
  • You used PositionSelect(symbol) which is intended to work only with netting accounts.
  • You used iTime, which it's unreliable. (Use CopyTime instead).
  • You skipped the first 5 bars of backtest without any reason.
  • You open a BUY trade on BID price. (BUY open at ASK and close on BID. SELL open on BID and close on ASK).
  • You have not normalized prices. (Always normalize them to tick size)

5 error in 60 rows of code. I have no doubt that a more complex EA give you same or even more problems :)

 
Fabio Cavalloni #:
  • You used PositionSelect(symbol) which is intended to work only with netting accounts.
  • You used iTime, which it's unreliable. (Use CopyTime instead).
  • You skipped the first 5 bars of backtest without any reason.
  • You open a BUY trade on BID price. (BUY open at ASK and close on BID. SELL open on BID and close on ASK).
  • You have not normalized prices. (Always normalize them to tick size)

5 error in 60 rows of code. I have no doubt that a more complex EA give you same or even more problems :)

Yeah... ChatGPT isn't really good at coding MT5 EAs compared to my handwritten EA. I'm going to get back to you after fixing these things.