- 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.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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:
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.