formula for minimum distance from Market Price for pending orders?

 
How to calculate minimum distance from Market Price for pending orders OP_BUYSTOP and OP_SELLSTOP to be placed?
 
moneysmile:
How to calculate minimum distance from Market Price for pending orders OP_BUYSTOP and OP_SELLSTOP to be placed?

MarketInfo .. i guess MODE_FREEZELEVEL was what you are looking for
 

For further information see https://book.mql4.com/appendix/limits

 
Ickyrus:

For further information see https://book.mql4.com/appendix/limits


Thank you!!!
 

MarketInfo(Symbol(), MODE_STOPLEVEL)*Point

If the market is closer to either stop than max(stoplevel,freezelevel) you can not close, delete or modify an order.

On IBFX freezelevel is zero while stoplevel is usually 3 pips.

 
WHRoeder:

MarketInfo(Symbol(), MODE_STOPLEVEL)*Point

If the market is closer to either stop than max(stoplevel,freezelevel) you can not close, delete or modify an order.

On IBFX freezelevel is zero while stoplevel is usually 3 pips.


>>On IBFX freezelevel is zero while stoplevel is usually 3 pips

Also new for me, thx WHRoeder

Reason: