Job finished
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specification
Indicators:
- Bollinger Band (8), Deviation: 2.0
- Bollinger Band (20), Deviation: 2.0
- ADX | Average Directional Index (14)
- ATR | Average True Range (14)
- EMA | Exponential Moving Average (20)
· Lot size to be entered manually
· When the conditions of entry have been met, open 2 trades
o The first trade to have a fixed Stop Loss and Take Profit at 2x the ATR
o The second trade to have a fixed Stop Loss at 2x the ATR but no Take profit
o When the first trade has exited at its Take Profit, then move the second trades Stop Loss to break-even
o The second trade must exit at the exit requirements mentioned below
Strategy:
A-
The upper band of the Bollinger Band (8) must be lower than the upper band of the Bollinger Band (20) and the lower band of Bollinger Band (8) must be higher than the lower band of Bollinger Band (20)
As soon as the bands of BB (8) are inside the bands of BB (20), then if +Di is above -Di of the ADX, we wait for price to reach higher by 0.5x the ATR above the current closing price.
If -Di is above +Di of the ADX, we wait for price to reach lower by 0.5x the ATR above the current closing price.
B-
If price had reached to the level of entry, but the upper band of BB (8) is above the upper band of BB (20), and/or the lower band of BB(8) is below the lower band of BB(20), then do not enter a trade.
However, if the upper band of BB (8) is below the upper band of BB (20) and the lower band of BB (8) is above the lower band of BB (20), then we can enter a trade and use the ADX (14) to determine the direction at execution point.
Determining the Direction:
Direction of Buy Trade:
ADX line below 30 | +Di above -Di (Buy Trade).
ADX line above 30 | +Di below -Di (Buy trade).
Direction of Sell Trade:
ADX line below 30 | -Di above +Di (Sell trade)
ADX line above 30 | -Di below +Di (Sell trade)
Exit
If the trade was opened when the EMA was inside the bands of BB (8), then exit the trade when the EMA exits the bands of BB (8)
However, if the trade was opened when the EMA was outside the bands of BB (8), then exit the trade when the EMA enters and then exits the bands of BB (8)