The Expert Advisor is designed for trading only on Forex currencies
- Period Average True Range – Indicator period
- The closing hour of trade – Time to close positions and delete pending orders on Friday
- Lot size – Contract size
- Take profit – Distance in points to take profit
- Slippage breakeven-Distance in points to account for possible slippage, commission, and swap.
- Magic number-ID of orders and positions.
At the beginning of the week, we wait for the first four-hour candle to close.
We put the pending order Sell Limit above High on the value of the Average True Range indicator and Buy Limit below Low on the same value of this candle.
We do not set a stop loss.
Take profit is set according to the Take profit value
The second order after activating the first one is not deleted.
At the moment when and if the second order is activated, the stop loss of the first one is set to breakeven – the value of the Slippage breakeven parameter. The Expert Advisor does not take into account the commission and swap for calculating the breakeven.
At the end of the week, we delete all orders and close all positions, regardless of their profit or loss.