Download MetaTrader 5

Invalid Price MT5

To add comments, please log in or register
Lodan
36
Lodan  

 

Why this Invalid Price error ?

I dont see anything wrong. 

Damian Mateusz Dziadosz
6867
Damian Mateusz Dziadosz  
Maybe the ask price was higher than the order at the time order were send.
Lodan
36
Lodan  
Damian Mateusz Dziadosz:
Maybe the ask price was higher than the order at the time order were send.
         mrequest.action = TRADE_ACTION_PENDING;                               
         mrequest.price = NormalizeDouble(p_high1,_Digits);
         
         mrequest.tp = NormalizeDouble(p_high1 + TKP*_Point,_Digits);
         mrequest.sl = NormalizeDouble(p_low1*_Point,_Digits);
          
       
         mrequest.symbol = _Symbol;                                          
         mrequest.volume = Lot;                                              
         mrequest.magic = EA_Magic;                                          
         mrequest.type = ORDER_TYPE_BUY_STOP;                                      
         mrequest.type_filling = ORDER_FILLING_IOC;
         mrequest.deviation=0; 


I want to the EA buy when the price get the higher price of the previous candle that the cross the MA !

But sometimes i get this Invalid Price Error 

To add comments, please log in or register