🏷️ TAGLINE
AI-powered dynamic trendline trading bot for cTrader — breakout, touch and approach signals filtered through nine confirmation layers.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 DynamicTrendlineProBot V24 — AI Sentiment Edition
A professional cTrader cBot that combines advanced dynamic trendline analysis with AI-driven market sentiment scoring.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 WHAT IS IT?
DynamicTrendlineProBot automatically identifies dynamic support and resistance levels from the chart, reacts to breakouts, touches and approaches, and filters every trade through 9 confirmation layers — including an internal AI sentiment engine and optional connection to external AI APIs (GPT, Claude, custom models).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ KEY FEATURES
🔹 Auto-calculated dynamic trendlines updated every bar 🔹 3 interaction types: Breakout, Touch, Approach — each fully configurable 🔹 Internal AI Sentiment with composite score from -100 to +100 🔹 External AI Sentiment via HTTP POST API 🔹 Full Risk Management with daily/total drawdown, equity floor, loss streak cooldown 🔹 Smart Pyramiding with lot multiplier 🔹 Automatic Break-Even + Trailing Stop 🔹 ATR Override for high-volatility conditions 🔹 MA, RSI, ADX filters plus slope and touch validation 🔹 Works on any asset and timeframe 🔹 AccessRights.None — maximum security for the user
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷️ TRADING — GENERAL
📌 Label — Tag that identifies the bot's trades. Must be unique if you run multiple instances on the same account.
📌 Size Mode — Choose between fixed volume (FixedLots) or automatic calculation based on risk percentage of balance (RiskPercent).
📌 Volume (Lots) — Fixed volume per trade, only used in FixedLots mode. Default: 0.01
📌 Risk % per Trade — Percentage of balance risked per trade. The bot automatically calculates the volume based on the stop loss. Default: 1.9%
📌 Approach Distance (Pips) — Distance in pips from the trendline to trigger an Approach signal. Default: 241
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡️ RISK MANAGEMENT
📌 Use Daily Drawdown Limit — Stops trading if the daily loss exceeds the threshold. Default: on
📌 Max Daily Drawdown % — Maximum daily loss relative to the start-of-day balance. Once hit, the bot pauses until the next day. Default: 5%
📌 Use Total Drawdown Limit — Stops trading if the total drawdown from peak equity exceeds the threshold. Default: on
📌 Max Total Drawdown % — Maximum drawdown from peak equity. Trading resumes automatically when equity recovers. Default: 15%
📌 Use Max Exposure Limit — Caps the total open lot exposure. Default: on
📌 Max Total Exposure (Lots) — Maximum combined lots across all open positions. Default: 1.0
📌 Use Equity Floor — Blocks trading when equity drops below a fixed amount. Default: off
📌 Equity Floor (Amount) — Minimum equity threshold in account currency. Default: 500
📌 Use Loss Streak Cooldown — Pauses trading after a series of consecutive losses. Default: on
📌 Consecutive Losses to Trigger — Number of consecutive losses to activate the cooldown. Default: 3
📌 Cooldown Bars After Streak — Number of bars the bot stays idle after a loss streak. Default: 5
📌 Reduce Size After Streak % — Volume reduction after a loss streak. 50% means the bot halves its lot size. Default: 50%
📌 Max Open Positions (All) — Maximum positions open at the same time, including long, short and pyramid entries. Default: 6
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 AI SENTIMENT — INTERNAL
The internal sentiment engine calculates a score from -100 (extreme bearish) to +100 (extreme bullish) by combining 4 technical components, each with a configurable weight.
📌 Use Internal Sentiment — Enables the internal sentiment filter. Default: on
📌 Sentiment RSI Period — RSI period for the momentum component. Default: 14
📌 Sentiment MA Period — Exponential moving average period for the trend component. Default: 50
📌 Sentiment Momentum Period — Lookback period for Rate of Change. Default: 10
📌 Sentiment BB Period — Bollinger Bands period. Default: 20
📌 Sentiment BB StdDev — Bollinger Bands standard deviation. Default: 2.0
📌 Minimum Score to Buy — Minimum score to allow a long entry. Default: 15
📌 Maximum Score to Sell — Maximum score (negative) to allow a short entry. Default: -15
📌 Sentiment Action Mode — BlockOnly just blocks non-conforming trades. ConfirmAndScale also scales the volume proportionally to signal strength. Default: ConfirmAndScale
📌 Scale Factor at Max Score — Maximum volume multiplier when the score is at its peak. Default: 1.5x
📌 RSI Weight % — Weight of the RSI component. Default: 30%
📌 MA Trend Weight % — Weight of the MA trend component (distance + slope). Default: 25%
📌 Bollinger Weight % — Weight of the Bollinger Band positioning component. Default: 20%
📌 Momentum Weight % — Weight of the Rate of Change component. Default: 25%
💡 Example: RSI at 70 generates a +40 component, price above MA with positive slope +60, price near the upper BB +80, positive momentum +50 → weighted final score ≈ +52 → Buy allowed (above the 15 threshold). If the score were +8 the Buy would be blocked.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌐 AI SENTIMENT — EXTERNAL API
Optional connection to any AI API. The bot sends full market context (OHLCV candles, indicators, account data) and receives a sentiment score.
📌 Use External AI API — Enables the connection. Default: off
📌 API Endpoint URL — POST endpoint URL. Supports any service that returns JSON.
📌 API Key (Bearer Token) — Authentication token sent in the Authorization header.
📌 API Timeout (Seconds) — Maximum response timeout. Default: 10s
📌 Cache Duration (Minutes) — The bot won't call the API more than once every N minutes. Default: 5 min
📌 On API Failure — What to do if the API doesn't respond: AllowTrade proceeds anyway, BlockTrade blocks the trade. Default: AllowTrade
📌 External Min Score Buy — Minimum external score to allow a long. Default: 20
📌 External Max Score Sell — Maximum external score to allow a short. Default: -20
📌 Send OHLCV Data to API — Includes candle data in the payload. Default: on
📌 OHLCV Bars to Send — Number of bars included in the payload. Default: 20
📡 Expected response format: { "score": -100..100, "signal": "buy|sell|neutral", "confidence": 0.0-1.0 } The parser is flexible and accepts several variants.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 TRENDLINE — CALCULATION
📌 Previous Candles Number — Bar window used to calculate support and resistance. More bars = slower, more robust trendlines. Default: 185
📌 Support Price Source — HighLow uses candle lows, Close uses closing prices. Default: HighLow
📌 Resistance Price Source — HighLow uses candle highs, Close uses closing prices. Default: HighLow
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ TRENDLINE — VALIDATION
📌 Use Touch Validation — The trendline must have been touched at least N times to be considered valid. Default: off
📌 Min Touches Required — Minimum touches required (including the 2 defining points). Default: 7
📌 Touch Tolerance (Pips) — Tolerance to count a touch as valid. Default: 1.3 pips
📌 Use Slope Filter — Rejects trendlines with angles that are too flat or too steep. Default: off
📌 Min Slope Angle — Minimum acceptable angle in degrees. Default: 8.2°
📌 Max Slope Angle — Maximum acceptable angle. Default: 18.2°
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 SUPPORT ACTIONS
What the bot does when price interacts with the support trendline.
📌 Action on Support Breakout — Price breaks support to the downside. Default: Invert (Buy) 📌 Action on Support Touch — Price touches support and bounces. Default: NoAction 📌 Action on Support Approach — Price approaches support within the configured distance. Default: ContinueTrend (Buy)
🎯 RESISTANCE ACTIONS
What the bot does when price interacts with the resistance trendline.
📌 Action on Resistance Breakout — Price breaks resistance to the upside. Default: NoAction 📌 Action on Resistance Touch — Price touches resistance and reverses. Default: ContinueTrend (Sell) 📌 Action on Resistance Approach — Price approaches resistance. Default: NoAction
💡 ContinueTrend = trades in the natural direction. Invert = trades the opposite way. NoAction = ignores the signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔴🟢 STOP LOSS / TAKE PROFIT
📌 Stop Loss Long — Default: 2500 pips 📌 Take Profit Long — Default: 3000 pips 📌 Stop Loss Short — Default: 2500 pips 📌 Take Profit Short — Default: 3600 pips
Set to 0 to disable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚖️ BREAK-EVEN
📌 Use Break-Even — Moves SL to breakeven (or into profit) once triggered. Default: off 📌 BE Trigger (Profit Pips) — Profit in pips that triggers the move. Default: 1401 📌 BE Extra Pips — Additional pips beyond entry price (SL is placed in profit, not exactly at breakeven). Default: 530
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📏 TRAILING STOP
📌 Use Trailing Stop — Protects profit by following the price. Default: on 📌 TS Trigger (Profit Pips) — Minimum profit before the trailing activates. Default: 801 📌 TS Distance (Pips) — Trailing distance from the current price. Default: 1401
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔺 PYRAMIDING
📌 Use Pyramid — Adds positions in the same direction. Default: off 📌 Pyramid after BreakEven — Adds a position when break-even is triggered. Default: off 📌 Pyramid on Retrace (Pips) — Adds a position when price retraces N pips from the best price reached. Default: 381 📌 Pyramid Lot Multiplier — Volume multiplier for each pyramid level. Default: 1.5x 📌 Max Pyramid Long Entries — Maximum additional long positions. Default: 3 📌 Max Pyramid Short Entries — Maximum additional short positions. Default: 3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 POSITION MANAGEMENT
📌 Max Initial Long Entries — Maximum initial long positions (non-pyramid). Default: 1 📌 Max Initial Short Entries — Maximum initial short positions. Default: 1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 TREND FILTER (MA)
📌 Use Trend MA Filter — Only allows Buy above MA, Sell below MA. Default: off 📌 MA Period — Moving average period. Default: 20 📌 MA Type — Moving average type. Default: Simple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 RSI CONFIRMATION FILTER
📌 Use RSI Confirmation Filter — Additional RSI-based entry confirmation. Default: off 📌 RSI Confirmation Period — RSI period. Default: 8 📌 RSI Confirm Level Buy (>=) — Minimum RSI to allow a Buy. Default: 43 📌 RSI Confirm Level Sell (<=) — Maximum RSI to allow a Sell. Default: 68
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📉 ADX FILTER (SIDEWAYS MARKET)
📌 Use Sideways ADX Filter — Blocks trades when ADX is below threshold. Default: off 📌 ADX Period — ADX period. Default: 14 📌 ADX Threshold Level — Trading is blocked below this value. Default: 2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ TREND OVERRIDE (ATR / MANUAL)
📌 Force Always ContinueTrend (Manual) — Manually forces breakout direction on all trades, bypassing filters and configured actions. Default: off
📌 Use ATR Override — When volatility (ATR) is above average, the bot enters high-volatility mode. Default: on
📌 ATR Panic Mode — In high volatility, bypasses ALL filters and trades in the breakout direction. ⚠️ Use with caution. Default: off
📌 ATR Direction Only — In high volatility, forces breakout direction but keeps all filters active. Default: off
📌 ATR Period — ATR period for volatility detection. Default: 8
📌 ATR Average Period — ATR moving average baseline period. Default: 4
📌 ATR Threshold Multiplier — If current ATR > average ATR × this value, the override activates. Default: 0.7
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 TECHNICAL NOTES
🔸 AccessRights.None — no elevated permissions required, HTTP calls use cTrader's native interface 🔸 Single .cs file, no external dependencies 🔸 Compatible with any cTrader broker (hedging and netting) 🔸 Works on forex, metals, indices, crypto — any asset and timeframe
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 REQUIREMENTS
🔸 cTrader 4.x or higher 🔸 Demo or live account on any cTrader broker 🔸 (Optional) AI API endpoint for external sentiment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📩 For custom configuration, parameter optimization or AI API integration, contact support.
DynamicTrendlineProBot V24 — AI Sentiment Edition © Algotrend