
Gallery


🔧 Basic Concept
- Fade Breakout Strategy: Executes a trade in the opposite direction right after the price breaks the upper or lower bound of the Donchian Channel (e.g., breakout above → sell, breakout below → buy).
- Portfolio Management Across Multiple Symbols: Monitors and trades up to three currency pairs simultaneously.
- Position Management: Automatically sets SL (Stop Loss), TP (Take Profit), and trailing stop levels.
⚙️ Parameter Configuration
Money Management
- Position size is determined either by a fixed lot size or based on a risk percentage.
- Supports both current balance and peak balance for risk calculation.
Per-Symbol Settings
- Donchian Channel Period
- SL, TP, and Trailing Multipliers for Buy/Sell
- Cool-Down Feature: Temporarily suspends trading after a specified number of consecutive losses.
Common Settings
- ATR period
- ADX filter to avoid entries during overtrending markets.
🧠 Logic Flow
OnStart()
- Initializes indicators (Donchian, ATR, ADX) for each symbol.
- Initializes dictionaries for tracking cool-downs and loss streaks.
OnBarOpened()
- Detects Donchian breakouts and opens reverse-direction trades.
- Skips entries if ADX exceeds a threshold (avoids overheated markets).
ProcessOrder()
- Calculates SL/TP distance based on ATR.
- Computes volume and places a market order.
OnPositionClosed()
- Increments consecutive loss count if the trade was a loss.
- Applies a cool-down period if loss limit is reached.
ManagePositions()
- On TP hit, takes partial profit (half volume) and sets SL to breakeven.
- Manages trailing stop based on ATR.
🧩 Supplementary Classes
SymbolConfig
: Holds all per-symbol configuration parameters.LotSizingMode
: Enum defining methods of position sizing.
✅ Summary of Key Features
- Flexible risk management with per-symbol custom settings.
- Fade-style (contrarian) breakout strategy.
- Risk mitigation through entry limits and cool-down periods.
- Gradual position closure logic (half profit-taking and trailing)
$ 500
/
$1290
$ 500
/
$1290
$ 500
/
$750
$ 500
$ 500
/
$599
$ 450
/
$799
$ 499
/
$2500
$ 499
/
$500
$ 500
/
$700
$ 500
/
$1000
$ 490
/
$500