



✅ Basic Information & Restrictions
- Demo Account Only: The bot stops if running on a live account, enforced via
Account.IsLive
.
🔧 Parameters
Money Management
MaxOpenPositions
: Maximum number of simultaneously open positions.LotSizingMode
: Lot calculation mode (Fixed / Balance-based / Peak balance-based).RiskPercentage
: Percentage of account balance to risk per trade.FixedLotSize
: Fixed lot size (when selected).
Trading Strategy
DonchianPeriod
: Period for Donchian Channel.SlMultiplierBuy/Sell
: Stop-loss multiplier based on ATR (Buy/Sell).Tp1MultiplierBuy/Sell
: Initial take-profit multiplier.TrailMultiplierBuy/Sell
: Trailing stop multiplier.
Filters
AtrPeriod
: Period for ATR indicator.EnableAdxFilter
: Enables ADX-based filtering.AdxPeriod
,MaxAdxValue
: ADX settings and threshold.
Cool-Down (Drawdown Management)
EnableCoolDown
: Enables temporary pause after losses.MaxLosses
: Max consecutive losses allowed before pause.CoolDownHours
: Number of hours to pause trading.
🧠 Strategy Logic
OnStart()
- Initializes indicators (Donchian, ATR, ADX).
- Checks for demo account only.
- Registers event handler for position closures.
OnBar()
- On each new bar:
- Skips if cooling down or positions already exist.
- Skips if ADX is above threshold (strong trend).
- Otherwise, calls
HandleEntry()
to evaluate signals.
HandleEntry()
- Fade Breakout Logic:
- If price breaks above the Donchian high then closes below → Sell
- If price breaks below the Donchian low then closes above → Buy
ProcessOrder()
- Calculates SL/TP using ATR.
- Determines lot size via
GetVolume()
. - Executes market order using
ExecuteMarketOrder()
.
ManagePositions()
- If initial TP is hit: closes half the position and moves SL to break-even.
- If no TP is set: applies trailing stop based on ATR multiplier.
GetVolume()
- Calculates volume based on selected lot sizing mode:
- Fixed lot
- Risk % of current balance
- Risk % of peak balance
OnPositionClosed()
- Increments consecutive loss count.
- If losses exceed threshold, initiates cooldown period.
📊 Strategy Summary
- Fade Breakout Style: Reacts to Donchian breakouts by trading reversals.
- Uses ATR to adapt SL/TP and trailing stop to volatility.
- ADX Filter avoids trading in overly strong trends.
- Cool-down mechanism helps protect capital after consecutive losses.
Więcej od tego autora
Możesz także polubić
Popularne
cBot
ai
needThai cBot Your AI Companion
needThaiBot Automated Version 3.7, Please Try default setting before making any changes
cBot
ai
E7 BBKG NumSharp Sample
NumSharp and Pandas Sample CODE ONLY!!! Our mission is to make Machine Learning inside cTrader easier for everyone.
cBot
signal
High Profit CADJPY
Bot is based on Price Action strategy to open & manage orders. It is effective capital management and high profitability