Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Libraries | StopLoss Calculation

MetaTrader Experts, Indicators, Scripts and Libraries

This library made to simplify calculating your Stop Loss for market execution orders.

This library enables you to put your Stop Loss in Points, or you can make ATR(true) to calculate your stop loss depending on ATR indicator; and you can change ATR Multiplier which is 3 by default.

Your Stop Loss is calculated depending on your position, if you are opening Buy position, use StpLoss(0) function with Parameter=0, or use StpLoss(1) function with Parameter=1 for Sell positions.

If you want to use this function for OrderModify(), you can put StopLoss= StpLoss(OrderType()).

15291

Best MetaTrader Indicators + Profitable Expert Advisors