Download MetaTrader 5

Invalid Price MT5

To add comments, please log in or register
Interested in social trading? Read the article!
Lodan
36
Lodan 2016.05.29 16:47 

 

Why this Invalid Price error ?

I dont see anything wrong. 

Damian Mateusz Dziadosz
5772
Damian Mateusz Dziadosz 2016.05.29 16:53  
Maybe the ask price was higher than the order at the time order were send.
Lodan
36
Lodan 2016.05.29 17:11  
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