Lazy Locker simple
The Expert Advisor is only designed for trading forex pairs.
Expert Advisor Parameters
- Period Average True Range - indicator period
- The closing hour of trade - time to close positions and delete pending orders on Friday
- Lot size
- Take profit - take profit in points
- Slippage breakeven - distance in points to take into account possible slippage, commission and swap.
- Magic number - the identifier of orders and positions.
At the beginning of the week, wait for the first four-hour candlestick to close.
Set the pending Sell Limit order above High at the Average True Range indicator value and Buy Limit below Low at the same value of this candlestick.
Stop loss is not set here.
Take profit is set as per the appropriate parameter.
Once the first order is activated, the second one is not deleted.
If the second order is activated, at that very moment the stop loss of the first order is set to breakeven +\- the value of the 'Slippage breakeven' parameter. The Ea does not take into account commission and swap for breakeven calculation.
At the end of the week, we delete all orders and close all positions regardless of their profit or loss.