All Pending Orders with StopLoss opens any combination of pending orders (Buy Stop, Sell Stop, Buy Limit and Sell Limit) and closes all existing pending orders.
If boolSL = true, this script will calculate one total stop loss value for the first/last orders and set this value for all pending orders.
Before placing pending orders, the input parameters window opens, in which they can be edited:
- DeleteAllPendings: If true, all pending orders (for the current currency) are deleted. (Pending orders will not be created!).
- Order_Type: Select the desired type of pending orders (Buy Stop, Sell Stop, Buy Limit or Sell Limit).
- boolSL: set to true a stop loss is set for each position.
- Stop_Loss: Stop loss.
- InitLot: the size of the initial lot.
- LotCoeff: At a value of 1, all pending orders will have the same lot size.
- InitStep: The difference in points between two consecutive orders.
- StepCoeff: In the value of 1, the distance between all positions will be the same.
- NumOfOrders: the number of pending orders to be placed on the chart.
- If DeleteAllPendings = true, the script will delete all existing pending orders only for the current currency pair.
- It is necessary to allow automatic trading in the “Expert Advisors” tab (Tools->Options).