Need help for invalid request.

 

Dear guys

I several time try and check but same error come when i try to open Buy Stop possition. I don't know what i did worg. then code is below:

            TResult = Trade.PositionOpen(_Symbol, ORDER_TYPE_BUY_STOP, ll96, lp72, lo64, lp88, "Magic = " + DoubleToString(301210));
            printf("Buy  "+Trade.ResultRetcodeDescription()+"   "+ll96+"   "+lp72+"   "+lo64+"   "+lp88);
printf write on jornal :  2013.12.13 08:50:17.779 2013.08.01 00:00:18   Buy  invalid request   0.1   1.34996   1.32996   1.35396

 

Current Price :  1.32999.

Please some one help me out.  

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
 
dralialadin:

Dear guys

I several time try and check but same error come when i try to open Buy Stop possition. I don't know what i did worg. then code is below:

printf write on jornal :  2013.12.13 08:50:17.779 2013.08.01 00:00:18   Buy  invalid request   0.1   1.34996   1.32996   1.35396

 

Current Price :  1.32999.

Please some one help me out.  

You can't use PositionOpen() function for a BuyStop order, it's only for market order (BUY/SELL). You have to use BuyStop() function.
Reason: