SetSellStopLimitOrder – script MetaTrader 5

SetSellStopLimitOrder script is developed for placing a SellStopLimit order with fixed trigger levels, Stop Loss and Take Profit levels in points from the current price and order trigger prices. The main advantage of this script is its ability to fix a deal volume, which depends on the entire deposit size, using MM (Money Management) script input parameter. This script determines a ratio between the amount of funds involved in the deal and all the funds of the deposit.

The script input parameters:

//+----------------------------------------------+
//| INPUT PARAMETERS OF THE SCRIPT               |
//+----------------------------------------------+
input double  MM=0.1;       // Money Management
input uint  LEVEL1=300;     // Trigger level of the first Stop order in points from the current price
input uint  LEVEL2=300;     // Trigger level of the second Limit order in points from the trigger level of first order
input uint  STOPLOSS=300;   // Stop loss in points from the open price
input uint  TAKEPROFIT=800; // Take profit in points from the open price
input uint  EXPIRED=0;      // The duration of the order in hours (0 - without time of cancellation)
input uint  RTOTAL=4;       // The number of repeats on unsuccessful transactions
input uint  SLEEPTIME=1;    // Pause time in seconds between repeats


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks