OrderSend error 130 on BuyStop

 

Dear All,

it happens that executing the EA in backtest inside MT4 build 1320 on Mex MB brocker

the following order, with a ask=1.18401 is execute without error:

OrderSend(Symbol(),OP_BUYSTOP,0.01,1.17983,Slippage,0,1.18183,YourOrderComment,MagicNumber,0,Green)

The same above order with a Ask=1.18583 gives the OrderSend error 130:

The broker has the following setting:

MODE_LOTSIZE=100000

MODE_MINLOT=0.01

MODE_LOTSTEP=0.01

MODE_MAXLOT=30

MODE_STOPLEVEL=5

MODE_SPREAD=27

Digits=5


What could be the problem?


Thanks


Luca




Thanks

luca

Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Compilation Errors
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Compilation Errors
  • www.mql5.com
Compilation Errors - Codes of Errors and Warnings - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Please edit your post and use the code button (Alt+S) when pasting code.
EDIT your original post, please do not just post the code correctly in a new post.

Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
Reason: