Example D3: Indicator value for initial stop loss, stop loss trailing, initial take profit and dynamic take profit
This is not a ready-to-use trading strategy. A trading strategy requires adjustment to the timeframe and symbol, along with thorough backtesting. The example is intended as a foundation for your own custom strategy and to help you get familiar with the Expert Advisor Builder web application. To import and use an example, please follow the instructions provided here.
Description
This example combines indicator-based levels with dynamic adjustments for both stop loss and take profit. Bollinger Bands provide initial levels and continue adjusting them throughout the trade duration. This creates a fully dynamic system where both risk and reward targets respond to changing market conditions.
The trailing stop and dynamic take profit activate immediately, continuously repositioning based on current Bollinger Band values. As bands expand or contract, both levels adjust accordingly. This creates a breathing trade management system that adapts to volatility in real-time.
This advanced approach suits experienced traders comfortable with fully automated position management. The system requires no manual intervention once trades open, making it ideal for algorithmic trading where consistent rule application matters more than discretionary judgment.
Recreate the Example
You can either import this example directly or set it up manually. To manually replicate the trading module, make sure a newly added module includes the following key settings and that the professional mode is activated:
Trade Basics
- Operation type = Long
Signal Generation - Indicators (MACD Main line)
- Signal in use = On
- Signal used for = Entry
- Selected indicator = MACD
- Line index = Main line
- Draw in chart = On
- Drawing slot = 1
Signal Generation - Indicators (MACD Signal line)
- Signal in use = On
- Signal used for = Entry
- Selected indicator = MACD
- Line index = Signal line
- Draw in chart = On
- Drawing slot = 2
Signal Generation - Indicators (BB Lower)
- Signal in use = On
- Signal used for = Forward
- Selected indicator = BB
- Line index = Lower
- Draw in chart = On
- Drawing slot = 3
Signal Generation - Indicators (BB Upper)
- Signal in use = On
- Signal used for = Forward
- Selected indicator = BB
- Line index = Upper
- Draw in chart = On
- Drawing slot = 4
Signal Generation - Indicator Combinations (MACD Main line & MACD Signal line)
- Signal in use = On
- Signal used for = Entry
- Input indicator 1 = MACD (Main line)
- Input indicator 2 = MACD (Signal line)
- Value relation = Value x cross value x
Initial Stop Loss
- Selection = Indicator value
- Used indicator = BB (Lower)
Stop Loss Trailing - Indicator value
- Activation position = 0
- Type = Indicator value
- Used indicator = BB (Lower)
Initial Take Profit
- Selection = Indicator value
- Used indicator = BB (Upper)
Dynamic Take Profit - Indicator value
- Activation position = 0
- Type = Indicator value
- Used indicator = BB (Upper)
Screenshots
