Description
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.
Summary
AI summary
BREAKOUT PROFIT is a trading robot (cBot) implementing a simple breakout strategy combined with dynamic position management via a trailing stop. The bot monitors bar closing prices to detect breakouts above a specified previous barβs high or below its low. Upon breakout, it opens a buy or sell position with an initial stop loss and optional take profit set in pips.
Position management runs on every price tick, activating a trailing stop once the position reaches a defined minimum profit threshold. The trailing stop then follows the market price at a fixed distance, locking in profits as the price moves favorably.
This bot is designed to capture momentum from bar breakouts and manage risk and reward dynamically through continuous trailing stop adjustments. It supports trading on symbols including EURUSD, GBPUSD, and XAUUSD (gold).
Position management runs on every price tick, activating a trailing stop once the position reaches a defined minimum profit threshold. The trailing stop then follows the market price at a fixed distance, locking in profits as the price moves favorably.
This bot is designed to capture momentum from bar breakouts and manage risk and reward dynamically through continuous trailing stop adjustments. It supports trading on symbols including EURUSD, GBPUSD, and XAUUSD (gold).
Trading profile
Customer reviews
0.0
Reviews: 0
Customer reviews
No reviews for this product yet. Already tried it? Be the first to tell others!
Discussion
FAQ
Breakout
EURUSD
GBPUSD
XAUUSD
Products available through cTrader Store, including trading bots, indicators and plugins, are provided by third-party developers and made available for informational and technical access purposes only. cTrader Store is not a broker and does not provide investment advice, personal recommendations or any guarantee of future performance.
Price
Since 30/09/2025
