FOLLOW THE TREND XAU EDITION — FULL GUIDE
Updated Version · cAlgo / cTrader
🎯
ENTRY
Automatic signals via MA4Cross, MACD or EMA. Manual mode also available via UI panel buttons.
📊
POSITION BUILDING
Grid (averaging down, optionally ATR-based) and Pyramid (scaling in) — two independent mechanisms.
💰
EXIT
Basket TP, Dollar Trailing, ATR Percentile Trailing, Hard Cap or Global Close. Minimum one required.
🛡️
PROTECTION
Soft SL, Daily Hard Loss, Max Basket Loss, Margin Protection, and Recovery Pauses.
📈
TREND FILTER
Higher timeframe MA4Cross filter ensures bot only enters in the direction of the dominant trend.
🎛️
AI UI PANEL
Interactive buttons on chart: manual trades, interactive Drag Break-Even lines, and AI 50% Sandwich Close.
HOW IT WORKS — LOGIC FLOW
📡
Entry Signal
(Auto/Manual)
🔍
Trend Filter
& Margin OK?
Open Base
Position
📊
Grid / Pyramid
add levels
💰
TP / Trailing
/ Hard Cap
Basket
Closed
⚠ Bot will NOT open a position if NO exit mechanism is configured (TP / Trailing / Hard Cap / Soft SL / Daily Loss = 0). Chart will display a static text warning if settings are conflicting or missing.
SETUP
BASIC CONFIGURATION & TREND
TRADING MODE
AUTO
Bot generates signals automatically using the selected trigger (MA4Cross / MACD / EMA). Fully hands-free.
MANUAL
Bot waits for BUY/SELL button click in the UI panel. Grid, Pyramid, and Exits run automatically after base opens.
PARAMETEROPTIONSDESCRIPTION
LabelFTTUnique identifier. All positions carry this prefix. Use different labels for multiple bots.
ModeAuto / ManualAuto = algorithmic signals. Manual = manual start via UI panel.
Auto TriggerMA4Cross / MACD / EMAAlgorithm generating entry signals in Auto mode.
Trading DirectionBoth / BuyOnly / SellOnlyRestricts trade direction globally.
TREND FILTER
Checks trend direction on a higher timeframe (TrendTimeFrame) and blocks entries against it.
PARAMETEROPTIONSDESCRIPTION
Trend Filter ModeOff / PlayWithTrendPlayWithTrend = bot only enters in the direction of the HTF trend.
Trend FilterNone / MA4CrossAlgorithm for trend assessment. MA4Cross = 4 Moving Averages crossover (High/Low bands).
Trend TimeFrameH4Timeframe evaluated for the trend (usually higher than bot chart).
MA Fast/Slow Period50 / 200Periods used for the Trend MA calculation.
MA4 Trend Min Spread (pips)35Minimum gap between MA4 bands to consider the trend active and strong.
💡 Recommended setup for Gold (XAU/USD): PlayWithTrend + MA4Cross on H4 timeframe. Powerfully filters out chop.
ENTRY TRIGGERS (AUTO MODE)
Trigger based on 4 MA lines. BUY signal when Fast band is above Slow band + price touches Fast High. Opposite for SELL.
PARAMETERDEFAULTDESCRIPTION
Fast / Slow Period9 / 21MA periods for the entry trigger.
MA4 Min Spread0Minimum band gap to generate a signal.
Classic MACD crossover. BUY when MACD crosses Signal upward at negative values (Signal rising).
PARAMETERDEFAULTDESCRIPTION
Long / Short / Period26 / 12 / 9Standard MACD settings.
Signal when price touches the fast EMA from the correct side (pullback entry).
PARAMETERDEFAULTDESCRIPTION
EMA Fast / Slow20 / 50Fast and slow EMA periods.
Min EMA Spread (pips)2.0Minimum gap to validate trend strength before touching.
PROFIT TAKING
DYNAMIC EXIT MECHANISMS
FIRST TP / GRID BASKET TP
Bot calculates the volume-weighted average entry price of the entire basket and sets one shared Take Profit level. Shifts dynamically when grid levels are added.
PARAMETERDEFAULTDESCRIPTION
Positions for First TP1How many positions in basket before switching to the larger Grid Basket TP.
First Position TP ($)4.20Target profit for a small basket (base position).
Grid Basket TP ($)5.70Target profit when basket grows (averaging active). Usually higher to cover swap/commissions.
Global Close All Profit ($)78.0Global ceiling: if combined profit of ALL positions (Buy + Sell) hits this, everything closes.
BASKET TRAILING STOP
Tracks the basket profit peak. Activates when profit reaches Trigger, then tracks each new high. Closes when profit drops by Trail Step from the peak.
Classic trailing using fixed USD values for Trigger and Step.
PARAMETERDEFAULTDESCRIPTION
Basket Trail Trigger ($)65.0Minimum basket profit before trailing starts tracking.
Basket Trail Step ($)10.0Fixed dollar amount profit can fall from peak before closing.
Advanced: Trailing Step is dynamic, calculated based on recent market volatility (ATR / True Range). Adjusts step width to current market speed.
PARAMETERDEFAULTDESCRIPTION
P75 - ATR Period (N)5How many recent bars to analyze for True Range.
P75 - Percentile (%)75.0Takes the X-th percentile of True Range (ignores extreme spikes).
P75 - Multiplier2.0Multiplier for the True Range value to define the USD Trail Step.
PARAMETERDEFAULTDESCRIPTION
Trailing Hard Cap ($)0Closes basket IMMEDIATELY when profit reaches this amount, ignoring trailing pullbacks.
GRID
AVERAGING DOWN (MARTINGALE / STEP)
GRID DISTANCE & ATR GRID
Grid opens additional positions when price moves AGAINST you, lowering the average entry price. New feature: ATR Grid Step expands grid distance automatically during high volatility.
PARAMETERDEFAULTDESCRIPTION
Grid Price Step ($)0.22Base distance between grid levels.
Grid Level Martingale Multiplier2.0Distance multiplier. 2.0 = next level is twice as far as previous.
Use ATR Grid StepFalseIf TRUE, dynamically increases Grid Step based on ATR.
ATR Period / Multiplier14 / 0.5ATR settings. Final Step = Base Step + (ATR * Multiplier).
ATR Min / Max Step ($)0.10 / 2.0Hard caps for the dynamic ATR grid distance.
GRID VOLUME
STEP — Each grid level = Base Lot + (Grid Step Volume × level). Example: Base=0.01, Step=0.01 → Grid_1=0.02, Grid_2=0.03...
MARTINGALE — Each level = Base Lot × (Martingale Multiplier ^ level). HIGH RISK!
FIX LOT — Every grid level has identical volume to the base position. Safest volume mode.
PYRAMID
SCALING IN WNNING TRADES
PYRAMID LOGIC
Unlike Grid, Pyramid opens new positions when price moves WITH you. It scales up your exposure during strong trends, moving SLs up to protect profits.
PARAMETERDEFAULTDESCRIPTION
Pyramid ModeTPSL / ReEntryTPSL: Divides Entry->TP range into segments. ReEntry: Waits for new trigger signals.
Pyramid Levels Count3Max number of pyramid positions to add.
Pyramid Price Step ($)0.10Distance between levels.
Pyramid Volume TypeSTEPWorks identical to Grid Volume (Step / Martingale / Fix Lot).
RISK MANAGEMENT
CAPITAL & ACCOUNT PROTECTION
LIMITS & SOFT SL
PARAMETERDEFAULTDESCRIPTION
Max Lot Size10.0Hard limit — no bot position will exceed this volume under any circumstances.
Soft SL Multiplier200SL = average entry ± (Grid Price Step × multiplier). Applies to entire basket.
Daily Hard Loss ($)200If daily realized + floating losses reach this amount, ALL bot positions close. Resets at midnight UTC.
Emergency Close Margin Level (%)0.0If account Margin Level drops below this %, bot force-closes all its positions to avoid Stop Out. 0 = disabled.
Margin Diagnostics: The bot monitors account free margin. If opening a Grid level would cause Margin Level to drop below broker's Stop Out level, the bot blocks the entry and flashes a "NO MONEY" warning on chart.
INTERACTIVE UI PANEL
ON-CHART TOOLS & CONTROLS
MANUAL TRADING & AI BUTTONS
Enable `Show UI Panel` to display the interactive box on your chart.
BUY / SELL
Instantly opens a base position at Market. Works regardless of `Mode` (Auto/Manual). Requires an exit strategy (TP/Trailing) to be configured in settings.
CLOSE B / CLOSE S
Panic buttons. Closes the entire Buy basket (CLOSE B) or Sell basket (CLOSE S) immediately at current market price.
AI BE+$5 (Drag Line)
Clicking this creates a dashed Drag_Line on the chart, placed exactly at the basket's Break-Even price + $5 profit target.

Interactive: You can grab the dot in the middle of the line and drag it to any price level! If the market touches your dragged line, the entire basket closes.
AI 50% C (Sandwich Close)
Click to reveal confirmation buttons (50% BUY / 50% SELL).

Logic: Executes a smart partial close of exactly 50% of the basket's volume. It pairs the best winning positions with the worst losing positions, neutralizing bad entries while locking in a portion of profit.
PROTECTION MAP
QUICK REFERENCE FOR ALL EXITS
MECHANISMTRIGGER CONDITIONACTION
Soft SL (Basket)Price hits average ± (Step × Multi)Closed by broker (hard SL on order)
Daily Hard LossDaily closed + floating ≤ -limitClose all bot positions instantly
Max Basket LossBasket floating P&L ≤ -limitClose specific basket (Buy or Sell)
Emergency MarginAccount Margin Level % < limitClose all bot positions to save account
Recovery PauseBasket closed at a lossBlocks grid entries for N candles
Shared Hard CapBasket profit ≥ Cap limitClose entire basket immediately
Max DurationOldest position > N hoursClose entire basket regardless of PnL