Automatic validation errors when attempting to upload EX5

 

Hey All, I'm trying to upload EA to market but keep getting Automatic validation errors when I upload .EX5 can anyone help Its my first EA that I'm happy to put up for sale following errors occur 

test on EURUSD,H1 (netting) 2022.02.08 09:29:40 failed modify #24 sell 0.35 EURUSD sl: 1.14292, tp: 1.13968 -> sl: 1.14281, tp: 1.13968 [Modification failed due to order or position being close to market] 2022.02.16 10:42:40 failed modify #36 buy 0.3 EURUSD sl: 1.13577, tp: 1.13911 -> sl: 1.13609, tp: 1.13911 [Modification failed due to order or position being close to market] 2022.02.16 10:42:59 failed modify #36 buy 0.3 EURUSD sl: 1.13577, tp: 1.13911 -> sl: 1.13603, tp: 1.13911 [Modification failed due to order or position being close to market] 2022.02.16 10:43:00 failed modify #36 buy 0.3 EURUSD sl: 1.13577, tp: 1.13911 -> sl: 1.13603, tp: 1.13911 [Modification failed due to order or position being close to market] 2022.03.17 18:58:40 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10970, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.17 18:58:59 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10967, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.17 18:59:00 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10966, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.17 18:59:20 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10966, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.18 13:55:40 failed modify #98 sell 0.25 EURUSD sl: 1.10552, tp: 1.10209 -> sl: 1.10526, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 13:56:20 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10516, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 13:57:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10517, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:12:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10515, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:13:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10516, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:13:59 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10519, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:14:00 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10519, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:14:20 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10519, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:15:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10516, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:16:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10510, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:16:59 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10511, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:17:00 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10511, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:17:20 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10511, tp: 1.10209 [Modification failed due to order or position being close to market

I believe it has something to do with the trailing stop ive tried a few different approaches but I get the same errors.. the EA works fine on strategy tester and on live/demo accounts so I'm a bit confused.

Any advise would be greatly appreciated.

thanks Guys

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • 2011.05.18
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 
Jonathan Boak:

Hey All, I'm trying to upload EA to market but keep getting Automatic validation errors when I upload .EX5 can anyone help Its my first EA that I'm happy to put up for sale following errors occur 

test on EURUSD,H1 (netting) 2022.02.08 09:29:40 failed modify #24 sell 0.35 EURUSD sl: 1.14292, tp: 1.13968 -> sl: 1.14281, tp: 1.13968 [Modification failed due to order or position being close to market] 2022.02.16 10:42:40 failed modify #36 buy 0.3 EURUSD sl: 1.13577, tp: 1.13911 -> sl: 1.13609, tp: 1.13911 [Modification failed due to order or position being close to market] 2022.02.16 10:42:59 failed modify #36 buy 0.3 EURUSD sl: 1.13577, tp: 1.13911 -> sl: 1.13603, tp: 1.13911 [Modification failed due to order or position being close to market] 2022.02.16 10:43:00 failed modify #36 buy 0.3 EURUSD sl: 1.13577, tp: 1.13911 -> sl: 1.13603, tp: 1.13911 [Modification failed due to order or position being close to market] 2022.03.17 18:58:40 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10970, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.17 18:58:59 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10967, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.17 18:59:00 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10966, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.17 18:59:20 failed modify #96 buy 0.2 EURUSD sl: 1.10952, tp: 1.11282 -> sl: 1.10966, tp: 1.11282 [Modification failed due to order or position being close to market] 2022.03.18 13:55:40 failed modify #98 sell 0.25 EURUSD sl: 1.10552, tp: 1.10209 -> sl: 1.10526, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 13:56:20 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10516, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 13:57:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10517, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:12:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10515, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:13:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10516, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:13:59 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10519, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:14:00 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10519, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:14:20 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10519, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:15:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10516, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:16:40 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10510, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:16:59 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10511, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:17:00 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10511, tp: 1.10209 [Modification failed due to order or position being close to market] 2022.03.18 14:17:20 failed modify #98 sell 0.25 EURUSD sl: 1.10530, tp: 1.10209 -> sl: 1.10511, tp: 1.10209 [Modification failed due to order or position being close to market

I believe it has something to do with the trailing stop ive tried a few different approaches but I get the same errors.. the EA works fine on strategy tester and on live/demo accounts so I'm a bit confused.

Any advise would be greatly appreciated.

thanks Guys

Similar questions have been raised before - for detailed guidance and helpful info you can read here:

The article 
Solving Automatic Validation Problems Arising During Product Submission in MQL5 Market

Blog post 
The checks a trading robot must pass before publication in the Market


Friendly NOTE: learning how to use the search function on this website might save you a lot of time
https://www.mql5.com/en/search#!keyword=validation&module=mql5_module_forum&page=2

Solving Automatic Validation Problems Arising During Product Submission in MQL5 Market
Solving Automatic Validation Problems Arising During Product Submission in MQL5 Market
  • 2017.08.07
  • www.mql5.com
If you're distributing some products for MetaTrader 4/5 via the Market, you probably know that a special "welcome" stage of automatic product validation has been added recently by MetaQuotes on the
 
figured it out thanks