Code Description: SimpleBreakoutTrailingBot
This code implements a Trading Robot (cBot) designed to execute a Simple Breakout Strategy with dynamic position management using a responsive Trailing Stop.
📝 Core Functionality
- Entry Strategy (Executed on
OnBar): - The bot checks if the current bar's closing price breaks above the high (
breakoutHigh) or below the low (breakoutLow) of a specified previous bar (BreakoutBarIndex). - If the closing price breaks the high, the bot executes a Buy order.
- If the closing price breaks the low, the bot executes a Sell order.
- The position is opened with an initial Stop Loss (
StopLossPips) and an optional Take Profit (TakeProfitPips).
- The bot checks if the current bar's closing price breaks above the high (
- Position Management (Executed on
OnTick): - The
UpdateTrailingStopfunction runs on every price change (OnTick) to monitor the position in real-time. - The Trailing Stop only activates once the position reaches the minimum profit threshold defined by
TrailingStartPips. - Once activated, the Stop Loss trails the market price by a constant distance (
TrailingStepPips), ensuring locked-in profit is continuously increased as the price moves favorably.
- The
In essence: This bot focuses on capturing price momentum from a simple bar breakout and dynamically managing risk and reward through a fast, continuous Trailing Stop.
Profil de trading
0.0
Avis : 0
Avis clients
Il n'y a pas encore d'avis sur ce produit. Vous l'avez déjà essayé ? Soyez le premier à en parler aux autres !
Breakout
EURUSD
GBPUSD
XAUUSD
Les produits disponibles sur cTrader Store, notamment les bots de trading, les indicateurs et les plug-ins, sont fournis par des développeurs tiers et mis à disposition à titre informatif et à des fins d'accès technique uniquement. cTrader Store n'est pas un courtier et ne fournit aucun conseil en investissement, aucune recommandation personnelle ni aucune garantie quant aux performances futures.
Depuis le 30/09/2025