Example C3: First breakeven, then average true range, then market stop loss trailing
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 extends trailing stops to three stages: breakeven, ATR-based, and market-based trailing. Each stage activates at specific profit levels, creating increasingly aggressive profit protection as trades succeed. The final market-based stage follows price extremely closely using previous candle extremes.
The market trailing stage adds both fixed and spread-based buffers, preventing stops from triggering on normal spread widening. With no take profit set, trades can run indefinitely until the trailing stop captures profits. This open-ended approach captures major trends while protecting accumulated gains.
Progressive staging represents advanced position management, allowing different strategies at different profit levels. This flexibility helps traders adapt to changing market conditions within a single trade, maximizing profit potential while managing risk dynamically.
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 - ATR (1)
- Signal in use = On
- Signal used for = Forward
- Selected indicator = ATR
- Draw in chart = On
- Drawing slot = 3
- Forward adjustment = 2.50
Signal Generation - Indicators - ATR (2)
- Signal in use = On
- Signal used for = Forward
- Selected indicator = ATR
- Draw in chart = On
- Drawing slot = 3
- Forward adjustment = 1.50
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 = ATR (1)
Stop Loss Trailing - Breakeven
- Activation position = 0
- Type = Breakeven
- Breakeven position = 120
Stop Loss Trailing - Indicator value
- Activation position = 150
- Type = Indicator value
- Used indicator = ATR (2)
Stop Loss Trailing - Market
- Activation position = 200
- Type = Market
- Market buffer fix = 10
- Market buffer spread = 4.0
Initial Take Profit
- Selection = Off
Screenshots
