EA Locking Grid
Semiautomatic EA for trading based on the averaging and locking strategy. The trader sends signals for opening grids by using the buttons on the chart. The EA opens a market order, places a grid of limit orders in the same direction with lot multiplication according to specified parameters and a locking stop order in the opposite direction with the volume equal to the sum of all the previous ones.
Once the price passes the specified breakeven level, the EA places a stop loss at the open price+spread. After the stop losses are placed, pending orders are deleted. If the price hits the limit orders, the breakeven level is calculated by averaging. If the price passes all the limit orders and hits the stop order, then the grid is locked. Partial or complete closure of the locked grids is performed automatically at the expense of the profits from new grids.
The number of opened grids is not limited. The account summary, as well as the sum of the current buy/sell trades and their volumes are displayed on the chart screen.
- Lots — the initial order's volume;
- trailStop — the trailing stop level;
- noLoss — breakeven placement level;
- trailStep — the trailing step;
- slippage — slippage;
- gridOrders — the number of pending orders for the grid;
- gridFactor — volume multiplier for the grid;
- gridDistance — grid distance.