The script places pending orders when the price reaches the specified level.In the MT5 terminal, there are such orders as Buy Stop Limit and Sell Stop Limit, but it is very inconvenient to set them. (A lot of unnecessary actions). There are no such types of orders in MetaTrader 4, although their necessity is obvious to many. So I decided to add a script to the MT4 terminal that allows you to implement such orders and make opening such orders in MT5 more convenient. And also added a limit order to the stop order.
You want to set the SellStop to the price of 1.2000, but only when the price reaches 1.2500. At the same time, the current price is below 1.2000. At the moment, it is not possible to do this in the MT4 terminal by standard means. You throw the script at the price of 1.2500 (it is possible approximately, since after you can move the line and thus adjust the time of opening orders). The script will set a line with the inscription Bid=1.2500 SellStop 1.2000 on the price where you threw it. This means that when the price reaches the level of 1.2500, the script will automatically set the SellStop to 1.2000, with the stop loss and take profit specified in the parameters. In addition to the stop order, the script can also set a limit order in the same way. After setting the script, you can move all the lines with the mouse and delete the ones you don’t need to adjust it to the desired prices.
If you throw the script above the price, it places SellStop and BuyLimit orders. If it is lower than the current price, the script will place BuyStop and SellLimit.
Buy Stop Limit и Sell Stop Limit