StopLoss Calculation – library MetaTrader 4

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

  !_Spread_Hi_Lo.mq4 - indicator MetaTrader 4
📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks