PendingOrders from any Price
- Leonid Basis
- Version: 4.12
- Updated: 20 April 2020
- Activations: 10
Pending Orders Grid Complete System opens any combination of Buy Stop, Sell Stop, Buy Limit and Sell Limit pending orders and closes all existing pending orders.
You will have a possibility to put a legitimate Open Price for the first position in the grid. Usually it should in the area of Support/Resistance lines.
You just need to drop this script on the chart of a desired currency pair.
Before placing all pending orders, the input window is opened allowing you to modify all input parameters:
- DeleteAllPendings - if true, then all pending orders (for the current currency) will be deleted. (No pending orders will be created!);
- Order_Type - you can choose what kind of pending orders you want to use (only Buy Stop, Sell Stop, Buy Limit or Sell Limit will work);
- StartingPrice - you must put a legitimate price for the first position in the grid (Comment will appear if the Price is not right or too close to the current price);
- DistanceBetweenOrders - this will be a distance between 2 any pending orders in the grid;
- InitLotSize - initial lot size;
- LotCoeff - if 1, all pending orders will have the same lot size;
- InitStep - difference between two consecutive orders in points;
- NumOfOrders - number of pending orders you want to place on the chart;
- MagicNum - magic number;
- SameProfitTarget - if false then each order will calculate TP by adding/subtracting Take_Profit to the Open Price. If true then all orders will have the same TP.
- SameLossTarget - if false then each order will calculate SL by adding/subtracting Stop_Loss to the Open Price. If true then all pending orders will have the same SL.
- If DeleteAllPendings=true, the script will be able to delete existing pending orders for the current currency pair only.
- You have to allow automated trading on the "Expert Advisors" tab (Tools->Options).
- If SameProfitTarget and SameLossTarget equal to true then not all pending orders will have TP and SL because those values could be too close or on a wrong side of the Open Price.
- You must put a legitimate Starting Price for the first position in the grid. Comment will appear in the left upper corner of the chart if the Price is not right or too close to the current price (see the first screenshot).