The adviser works on breakdown or paternity from the levels. The simultaneous application of two strategies is possible. Levels are determined by fractals and candles.
The EA opens a pending stop order on fractals or on extremes of candles.
The BuyStop and SellLimit Expert Advisor puts on the upper fractal or on the HIGH candles. SellStop and BuyLimit on the lower fractal or LOW candles.
For Stop and Limit orders, the parameters are indented. Thus, BuyStop can be placed just above the upper fractal, and SellLimit is also slightly lower at the same time.
When the price reaches the level and gets rid of it, the adviser makes profit on limit orders. If a breakdown occurred and a stop order worked, then we expect profit from the breakdown.
If the price has not hooked the order and a new fractal has formed, then the adviser trails orders for the price of new fractals or candles.
After the order is triggered, its stop loss is traded according to the same principles. Those. the stop moves behind the price along the tops of fractals or extremes of candles.
If a new order appears, the adviser averages them and trawls the total profit from the breakeven point. If there is a situation when many positions are open against the trend, then with a given drawdown, the adviser unloads the deposit by closing long positions due to accumulated profit.