Quantum Trend System Strategy
Quantum Trend System Strategy is the auto-trading version of the Quantum Trend System indicator for MetaTrader 4. It runs the exact same Pivot Point Supertrend trend engine you already see on the chart - plus the two entry paths built on top of it - and then executes those signals for you as real broker orders. With matching inputs, the Strategy trades precisely the entries the indicator prints; nothing extra is invented.
Key benefits
- Trades the signals you already trust - identical trend engine and entry logic to the Quantum Trend System indicator, so every entry is one you could have seen on the chart first.
- Two entry paths in one system - a Fibonacci pullback (STR) after every trend change, and a continuation entry when price returns to trend and breaks back through the center line - each with its own signal cap so neither path floods your account with trades.
- Hands-off execution - the Strategy watches each closed bar and places the order group the moment a valid signal fires.
- Position sizing built in - choose a fixed lot or risk a fixed percentage of equity; sized from the ATR stop distance so risk stays consistent across instruments.
- Every target is its own order - each enabled take-profit (TP1/TP2/TP3) is placed as a separate broker ticket sharing one stop.
- Automatic stop management - once TP1 is banked, the remaining legs move to breakeven.
How it works
On every completed bar the Strategy rebuilds a recursive center line from confirmed pivots and derives ATR-based trailing bands around it, which decide the current trend direction. After every trend flip, it waits for the first confirmed swing and builds a Fibonacci retracement zone from that swing - a pullback into the zone followed by a break back out the trend side fires an STR signal. Independently, a pullback into the zone between the trailing stop and the center line, followed by a close back through the center line in the trend direction, fires a Continuation signal. A valid signal opens the trade with an ATR-based stop and up to three R:R targets. Full rules and every input are in the Manual.
What's included
- MetaTrader 4 auto-trading Strategy file (.ex5)
- The same Pivot Point Supertrend engine, STR pullback and Continuation entry logic as the indicator
- Fixed-lot or risk-percent position sizing
- ATR stop with up to three R-multiple targets, each as its own broker order
- Stop-to-breakeven, always-on anti-stacking
- Full manual with the complete input reference and installation steps
Best for
Trending instruments on intraday to swing timeframes, for traders who want a defined trend filter with two distinct, capped entry styles rather than one continuous signal stream.
Get started
Browse the ZynAlgo marketplace
Trading involves risk; no strategy predicts the market. Quantum Trend System Strategy is an automated trading tool, not financial advice, and past performance does not guarantee future results.
Quantum Trend System Strategy
What the Strategy actually does
Quantum Trend System Strategy is the auto-trading version of the Quantum Trend System indicator for MetaTrader 4, ported directly from the NT8 engine (STRATEGY-MT-CONVERSION-RULES.md section 1: NT8 is the confirmed-running reference, so the port reads from it rather than the Pine source). The trend engine, the STR pullback logic and the Continuation logic are identical to the indicator, and bit-for-bit identical to the MT5 version of this same Strategy. With matching inputs, the Strategy opens trades on exactly the signals you would see printed on the chart.
What the Strategy adds on top of the indicator's on-chart simulation is a real-money execution layer:
- Lot sizing - fixed, or a fixed percentage of equity risked against the stop
- Each enabled take-profit placed as its own broker order (a min-lot-aware split) sharing one stop
- Stop-to-breakeven once TP1 is banked
- Anti-stacking - the source indicator has no Stability Mode toggle, it always tracks a single position, so the Strategy always keeps at most one trade group open
Everything else - how the trend is defined, how each entry path is scored and capped - works exactly as described in the Quantum Trend System indicator manual.
How a signal becomes a trade
On every completed bar, the Strategy replays the full engine over recent history (InpLookbackBars) and re-derives the current signal, non-repainting (the still-forming bar is excluded). When a valid entry fires on the most recently closed bar, the Strategy:
- Takes the entry as the close of the signal bar.
- Sets the stop ATR(14) x the Distance multiple away from entry.
- Derives each enabled target as an R-multiple of that stop distance (TP1/TP2/TP3).
- Sizes the total position - fixed lot or risk percent - from the stop distance.
- Splits that size across the enabled targets, one broker ticket per target, all sharing the single stop.
- Opens the order group, tagged with the Strategy's Magic number.
While the group is live, the Strategy manages it: once TP1 is banked, the remaining legs' stops move to the entry price. A new group is only opened after the current one has closed.
The trend engine (Pivot Point Supertrend)
- A confirmed pivot high or low (
InpStructureDepthbars each side) feeds a recursive center line:center = (center x 2 + pivot) / 3, so the line follows structure but only moves a third of the way to each new pivot. - Two ATR-based trailing bands (
InpTrendExpansionx ATR(InpVolatilityLength)) sit above and below the center line and only ever tighten in the trend's favour, never loosen against it. - Trend flips to up when price closes above the lower band, and to down when price closes below the upper band; the active band becomes the trailing stop line.
- Every trend flip resets both entry paths below: their signal counters, their cooldown, and the STR zone.
Path 1 - STR Pullback (Fibonacci)
- After a trend flip, the engine waits for the first confirmed 3-bar swing that forms after the flip.
- On an uptrend, the zone runs from that swing high back down to the lowest low saved from the prior downtrend, using
InpFibLower/InpFibUpperas the retracement band (mirrored for a downtrend, from the swing low up to the prior uptrend's highest high). - A close inside the zone arms it; a later close back outside the zone on the trend side fires the signal. A close that instead breaks out the wrong side cancels the zone with no signal.
- Capped independently by
InpMaxStrSignalsPerTrendand the sharedInpMinBarsBetweenSignalscooldown, both reset on every trend flip.
Path 2 - Continuation
- Independent of the STR zone: whenever price pulls back into the area between the current trailing stop and the center line, that is "in zone".
- From in-zone, a close back through the center line in the trend direction fires the signal; a close back through the trailing stop instead cancels it with no signal.
- Capped independently by
InpMaxContSignalsPerTrendand the same sharedInpMinBarsBetweenSignalscooldown.
The full definition of the trend engine and both entry paths is in the Quantum Trend System indicator manual. The Strategy trades it unchanged.
Inputs
Trend Structure
InpStructureDepth(default4): Bars required on each side of a swing for it to count as a confirmed pivot feeding the center line.InpTrendExpansion(default3.0): ATR multiple that sets how far the trailing bands sit from the center line.InpVolatilityLength(default10): ATR period used for the trend bands (separate from the ATR(14) used to size the stop).
STR Settings
InpFibUpper(default0.618): Upper edge of the retracement zone, as a fraction of the swing-to-extreme range.InpFibLower(default0.382): Lower edge of the retracement zone.
Signal Control
InpMaxStrSignalsPerTrend(default2): Cap on STR pullback signals within a single trend, reset on every flip.InpMaxContSignalsPerTrend(default5): Cap on Continuation signals within a single trend, reset on every flip.InpMinBarsBetweenSignals(default20): Minimum bars between any two signals, shared by both paths, reset on every flip.
Take Profit / Stop Loss
InpAtrMultiplier(default2.8): Stop distance as a multiple of ATR(14) from the entry.InpEnableTp1(defaulttrue) /InpRR1(default1.0): First target and its reward-to-risk multiple.InpEnableTp2(defaultfalse) /InpRR2(default4.5): Second target.InpEnableTp3(defaultfalse) /InpRR3(default6.5): Third target.InpEnableSLtoBE(defaulttrue): Move the remaining legs' stop to the entry price once TP1 is banked. The trigger is always TP1 - matching the indicator's own breakeven, which never arms from TP2/TP3 alone.InpMaxTradeDuration(default200): Bars-in-trade cap used by the indicator's own dashboard/simulation only; reserved here, it does not force-close live broker orders.
Each enabled target becomes a separate broker ticket. With two or more targets enabled and TP1 funded, a breakeven stop activates on the remaining legs once TP1 is hit.
Trading (position sizing & execution)
InpLotMode(defaultRisk %): Position-sizing mode - fixed lot, or risk a percentage of equity against the stop.InpFixedLots(default0.01): Total group lot size in fixed-lot mode (also the fallback if a risk-percent calc cannot be resolved).InpRiskPercent(default1.0): Percent of account equity risked on the stop distance, in risk-percent mode.InpMagic(default574301): Magic number tagging this Strategy's orders.InpSlippagePoints(default20): Maximum price deviation allowed on order execution, in points.InpMaxSpreadPoints(default0): Maximum spread that still permits a new entry, in points. 0 disables the check.InpLookbackBars(default3000): How many closed bars are replayed on every tick to rebuild the trend engine and both entry paths before evaluating the latest bar.
License
InpAccessKey(default""): Your ZynAlgo access key. Optional if the installer has already droppedmarket.datinto the terminal's Common\Files.
Visuals & window
InpShowDash(defaulttrue): Show the on-chart dashboard - trend, position, last signal, entry/stop/TP1, and real trade count and Profit Factor from closed history.InpShowTrailingStop/InpShowCenterLine/InpShowTrendLabels: Chart-drawing toggles, cosmetic only - the trend engine itself always runs regardless of what is drawn.InpShowStrSignals/InpShowContinuationSignals(defaulttrue): Draw a BUY/SELL label per path when a group opens for that path.InpLabelAtrOffset(default1.0): Distance of that label from price, as an ATR multiple. Cosmetic only.
Position sizing and the target split
The Strategy first works out the total lots for the group. In risk-percent mode it divides the money at risk (equity x risk percent) by the loss-per-lot implied by the stop distance; in fixed mode it uses the fixed lot directly. That total is then split into one ticket per enabled target, each floored to the broker's lot step and never below the broker minimum. If the total size can only fund fewer legs than there are targets, the nearer targets are funded first; any rounding remainder is added to the furthest-target leg so the group total stays as close as possible to the request without exceeding it. Every leg shares the same ATR stop.
Stop-to-breakeven and anti-stacking
With InpEnableSLtoBE on and at least two targets enabled, the Strategy watches TP1. Once TP1 is no longer open - its target has been hit - the remaining legs' stops move to the group's entry price. If TP1 itself was never funded (for example only one leg could be opened), breakeven falls back to the nearest funded leg instead of never arming for the group.
Unlike Scalper Pro v4.1, Trendline v5.0 and Nexus Flow, this Strategy has no InpPreventSameDirection input to turn anti-stacking off - the source indicator tracks a single simulated position with no such switch, so the Strategy always keeps at most one trade group open per instrument, in either direction.
Unlike the MT5 version of this Strategy, MT4 has no netting-account mode to detect - every broker allows multiple orders on the same symbol, so TP1/TP2/TP3 always open as separate tickets here.
Installing and running it
- Copy the
ZynAlgoQuantumTrendSystemStrategy.ex4file into theMQL4/Expertsfolder inside your MetaTrader 4 data folder. - Refresh the Navigator panel and drag the Strategy onto the chart and timeframe you want to trade.
- In the dialog, allow live trading (Common tab) and allow DLL imports (Allow DLL imports - required for the license check).
- Enter your ZynAlgo access key in
InpAccessKey, or make sure the installer has placedmarket.datin the terminal's Common\Files. - Set your position-sizing mode and risk, choose which targets to enable, and confirm.
Make sure the terminal's global AutoTrading button is on so the Strategy can place orders.
License
Quantum Trend System Strategy requires a valid ZynAlgo access key at all times - there is no test build and no Strategy Tester bypass, so a key is required in every context, including the tester. The check runs through the ZynAlgo licensing library (the same compiled DLL used by the indicators), which is why Allow DLL imports must be enabled. The key is read from InpAccessKey first, and otherwise from the market.dat file the installer writes into Common\Files. On the backend the Strategy identifies itself with the slug quantum-trend-system and the file type mt4_strategy. If no valid key is found, the Strategy draws an "Access Denied" banner and does not trade.
Partial take-profit - how the TP toggles behave
Each target you enable (TP1, TP2, TP3) opens as its own broker ticket sharing one stop loss, so the position is scaled out in parts - the broker closes each ticket when price reaches that target (no partial-close call is used). Targets sit at Entry +/- R x Ratio, where R is the Entry-to-Stop distance. Defaults are TP1 = 1R, TP2 = 2R, TP3 = 3R, and "Move SL to breakeven" is armed after TP1.
Partial exit ON (two or more targets enabled):
- TP1 + TP2 + TP3 (default) - 3 orders, about 1/3 of the size each; scales out at 1R / 2R / 3R. After TP1 closes, the TP2 and TP3 stops move to breakeven.
- TP1 + TP2 (TP3 off) - 2 orders, about half each; scales out at 1R / 2R. After TP1 closes, the TP2 stop moves to breakeven.
- TP1 + TP3 (TP2 off) - 2 orders, about half each; scales out at 1R / 3R (2R skipped). After TP1 closes, the TP3 stop moves to breakeven.
- TP2 + TP3 (TP1 off) - 2 orders, about half each; scales out at 2R / 3R. The breakeven trigger falls back to the nearest enabled target (TP2); when it closes, the TP3 stop moves to breakeven.
Partial exit OFF (a single target enabled):
- TP1 only - 1 order at full size, closes at 1R. No partial exit; with one leg, breakeven has nothing left to protect.
- TP2 only - 1 order at full size, closes at 2R. No partial exit.
- TP3 only - 1 order at full size, closes at 3R. No partial exit.
- All targets off - no trades are taken. Keep at least one target enabled.
Good to know:
- If your lot size only funds fewer legs than the targets you enabled, only the nearest legs open (the Experts log notes this).
- On a netting account, same-symbol tickets merge into one position that runs to the furthest enabled target, so partial exits are not available there; the chart shows a banner. Use a hedging account for true partial take-profit.
Browse the ZynAlgo marketplace
Trading involves risk. Quantum Trend System Strategy is an automated trading tool, not financial advice, and past behaviour does not predict future results. Always test on a demo account first.
No release notes have been published yet.
Why trend pullbacks stop you out before the move continues
You spot the trend, wait for a pullback, enter, and get stopped out as price drifts deeper than expected before finally resuming. Quantum Trend System frames pullback entries around structure and volatility, not guesswork.
Why trend pullback entries get stopped out before the move resumes
You enter a pullback in the direction of the trend and get stopped out, only to watch the move resume minutes later. This article explains how to identify when a pullback stays inside the trend structure and when it actually breaks it.




















