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.
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.