problems, failed to modify invalid stops error?

 
Hey, when I wanted to upload my EA to the sstore It got the error :

2020.04.01 12:20:36 failed modify #3 sell 0.95 EURUSD sl: 1.09466, tp: 1.09066 -> sl: 1.09262, tp: 1.09066 [Invalid stops]

the same for "buy".

Can someone maybe help me? the code is below. Would mean the world to me!

If you have any solutions, please dont speak to me like a programmer :) Me and my freind coded it, well he did the most part. Im not very good at programming so would be cool if someone could provide the missing code and where to put! thanks!
Files:
 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 

Please read and apply the following to your code ...

Articles

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

MetaQuotes, 2016.08.01 09:30

Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 

Forum on trading, automated trading systems and testing trading strategies

Tick size vs Point(), can be a little tricky in Multicurrency EA

Fernando Carreiro, 2022.03.09 12:11

Tick Size and Point Size can be very different especially on stocks and other symbols besides forex.

Always use Tick Size to adjust and align your prices, not the point size. In essence, make sure that your price quotes, are properly aligned to the Tick size (see following examples).

...
double tickSize = SymbolInfoDouble( _Symbol, SYMBOL_TRADE_TICK_SIZE );
...
double normalised_price = round( price / tick_size ) * tick_size;
...
// Or use a function
double Round2Ticksize( double price )
{
   double tick_size = SymbolInfoDouble( _Symbol, SYMBOL_TRADE_TICK_SIZE );
   return( round( price / tick_size ) * tick_size );
};