Lock balancer MT5
The robot can be used to insure positions during manual trading, or as an addition to another robot.
Principle of operation
Instead of the traditional stop loss, the trader manually sets the initial locking line of this robot. The robot monitors the behavior of the price relative to this line. If the price goes against the trader, the robot locks the position (or several positions) with a counter order, which limits the loss as a stop loss. But this is better than a stop-loss, as it allows you not to lose position in case of any, even too large price movements towards loss.
Closed at the right time, the lock allows you to return the lost capital in the subsequent return of the price to its original position, and also allows profits to grow as the price moves in the direction of profit. The robot provides all locking functions around the level set by the trader, ensuring that losses are minimized when the price moves in the direction of loss, and opens up the possibility of increasing profits when the price moves in the right direction.
- Language - robot message language (English/Russian);
- Direction - trade direction (BUY/SELL);
- Mode of operation - Testing / Trading with manual main entry, or with the main robot;
- Lot - lot only for the Testing operating mode;
- Take profit of the main order - take profit of the main order for the Testing mode, points (0 - no take profit);
- Magiс of the main positions – Magic of the main positions, (0 – we work with positions set manually);
- Magiс of the lock – Magic of the Lock (0 – lock will be without Magic);
- Unlock option - Unlock always / Unlock only at breakeven / Never unlock;
- Initial stop loss of the lock – initial stop-loss of the lock, points. It is set when the pending lock turns into a market lock;
- Break Even – anticipating the closing of the active lock when the price returns in the direction of the profit of the main position;
- Activation for Break Even – the level of activation of the break-even level, from the level of the initial locking line, points;
- Trailing the initial lock line – trailing of the initial locking line, points, (0 - trailing is disabled).
Main positions must not have stop losses, instead of stop-loss the robot will use a common lock.
If the robot is used to insure the positions set manually, then you need to set Magiс of the main positions = 0.
If the robot is used to insure the main positions set by another robot, then the Magiс of the main positions must be set the same as for the main robot.
If there are market positions, the robot sets the pending lock at the level specified by the initial lock line. When the price moves towards loss, the lock will become market and will not allow the loss to grow. The price can go any distance in the direction of loss, but the loss does not increase. When the price returns to the initial lock level, the robot closes the market lock at Break Even point, which will allow you to return funds from the drawdown when the price moves in the direction of the profit and continue to make a profit. Break Even level is activated when the price reaches the Activation for Break Even level in the direction of locking.
The position of orders and lines of the initial lock can be adjusted manually at any stage of trading, depending on the strategy of the trader.
When all positions are closed by take profit or manually, the robot will automatically close the lock.
The initial locking level should be set where a stop loss would be placed in manual trading in accordance with the chosen strategy. However, in order to reduce locking losses, one should strive to choose a level where the probability of flat formation is small. If, in the course of work, a flat is noticed at the level of the initial locking line, which leads to frequent triggering of the lock, it is advisable to move the line manually outside the flat border.
Let us describe in detail the unlocking modes selected by the Unlock option parameter.
If the Unlock always mode is selected, then the robot will always close the market lock when the price starts to return towards the profit of the trader's main positions. At the same time, there may be some losses on unlocking if the price has not reached the activation of the Break Even level. The robot does not change the main positions of the trader.
If the Unlock only at breakeven mode is selected, then unlocking will become possible only at breakeven. At the same time, the robot removes the take profits of all the trader's main positions and locking is maintained until the price reaches the activation of the Break Even level. After that, the lock is closed at the Break Even level, and a new take profit is assigned to all the main positions of the trader, upon reaching which losses will be compensated. Until that time, the trader can manually unlock.
If the Never unlock mode is selected, then unlocking will be possible only with the help of a trader, manually. The robot will not close the market lock until the trader intervenes. The take profits of all the trader's main positions will also be removed.
If you have questions, write me a private message. Always happy to help.