Download MetaTrader 5

[Q] Minimal SL ?

To add comments, please log in or register
waza123
125
waza123  

Is there a mql5 function witch can tell me, what is the minimal Stop Loss for the trade ?


I manually calculated that minimal SL for GBPUSD for my broker is 13 pips, if I try to set smaller SL, it gives me error: Invalid StopLoss value. (fixed spread 3 pips)


Not all brokers have this limitation.

waza123
125
waza123  

StopsLevel()

Taskin Osman
816
Taskin Osman  
MODE_STOPLEVEL14Minimal permissible StopLoss/TakeProfit value in points.

 

Use this with MarketInfo() should help you. Example MarketInfo(Symbol(),MODE_STEPLEVEL) will return you required minimum stoplevel. Check http://book.mql4.com/appendix/marketinfo and http://book.mql4.com/appendix/limits please. Yes every broker has different requirements. It is essential to understand every single tweak. Devil is in detail. 

MarketInfo() Identifiers - Appendixes - MQL4 Tutorial
  • book.mql4.com
MarketInfo() Identifiers - Appendixes - MQL4 Tutorial
Alain Verleyen
Moderator
31476
Alain Verleyen  
fx1.net:
MODE_STOPLEVEL14Minimal permissible StopLoss/TakeProfit value in points.

 

Use this with MarketInfo() should help you. Example MarketInfo(Symbol(),MODE_STEPLEVEL) will return you required minimum stoplevel. Check http://book.mql4.com/appendix/marketinfo and http://book.mql4.com/appendix/limits please. Yes every broker has different requirements. It is essential to understand every single tweak. Devil is in detail. 

The question was about mql5.

SymbolInfoInteger(_Symbol,SYMBOL_TRADE_STOPS_LEVEL);
To add comments, please log in or register