System with reversals of direction of trade
-
Please help to make an algorithm: if the price moved away from the opening price (loss) on X pips-open the opposite order with martingale:
- open the №1 sell 0.01
- when the loss X pips open №2 buy size №1 sell * ratio
- if it is unprofitable, the №3 sell with lot size №2 buy * coefficient is opened when X (or Y) is indented.
This will be checked: if there are sell orders (buy) with a loss of X-then with a total profit of more than Y, all orders will be closed.
In fact, we need an analogue of add volume only to open an order of a given volume in the opposite direction