Fractal Memory Strategy [Jayadev Rana]Fractal Memory Strategy trades the same engine as the Fractal Memory Projection indicator: it looks for the historical episode most similar to current price action, and only takes trend flips that agree with how that episode played out. Exits scale out at three volatility-adaptive targets.
HOW IT DECIDES
An ATR trailing stop tracks the trend. When it flips, the last 30 closes are converted to normalized log returns and compared against past windows by mean squared distance. The bars that followed the best analog give a net direction; the flip is only traded when the analog direction agrees (the filter can be disabled). Orders are processed on bar close, so no lookahead is involved. For visual context the strategy also draws the 50-candle ghost projection beyond the last bar - it is display-only and never affects order logic.
ENTRIES AND EXITS
On a confirmed bullish flip with agreement the strategy closes any short and enters long; the mirror applies to shorts. One unit of risk R equals ATR times (1.2 plus the ATR percentile rank over 200 bars), so targets and stops widen in volatile regimes and tighten in quiet ones. Position exits: one third at 1R, one third at 2R, the remainder at 3R, with a stop at 1.5R (all adjustable). Direction can be restricted to long-only or short-only.
PROPERTIES USED IN THE PUBLISHED BACKTEST
10,000 initial capital, 10 percent of equity per trade, 0.01 percent commission per order, 2 ticks slippage, no pyramiding, orders on close. These are deliberately conservative; adjust them to match your own broker before drawing any conclusion.
PANEL
Match similarity, volatility regime, forecast direction, closed trade count and win rate.
NOTES
The analog projection is a statistical reference, not a prediction, and past behaviour does not guarantee anything about the future. Results vary by symbol and timeframe; test on your own market with realistic costs before considering any live use. This is an educational tool, not financial advice. Strategy

HalfTrend Long/Short Signal Engine [BigBeluga]HalfTrend Long/Short Signal Engine is an institutional-grade trend tracking toolkit built for PulseWire. It filters out minor market noise to deliver definitive, non-repainting long and short entry signals based on asset volatility and structural swing pivots.
Instead of displaying standard lag-heavy moving averages, this system uses an adaptive directional engine to lock onto clean trend lines and overlay automatic risk-management matrices directly onto your chart. It calculates real-time win rates and scans multiple assets simultaneously so you can trade with systematic statistical backup.
🔵 MAIN ENGINE & MARKET CALCULATION MECHANICS
1. Pure HalfTrend Price Filter Matrix
Swing Pivot Trackers: The engine scans local high and low data using an adjustable lookback filter ( Amplitude ) to find actual structural swing points rather than temporary price spikes.
Volatility-Adjusted Bands: It establishes dynamic outer channel boundaries using a 100-period Average True Range calculation divided by two ( ATR/2 ). The total channel width automatically scales using your custom risk buffer parameter ( Channel Deviation ).
Regime Flip Architecture: The system locks into a Bullish Regime when price crosses above structural highs, shifting the main tracking baseline to Green. When price slips below structural lows, it forces a Bearish Regime and changes the tracking baseline to Red.
2. Automated Risk Matrix & Multi-Asset Scanner
Algorithmic Trade Execution: The moment a new trend regime initializes, the engine projects a strict trade tracking matrix showcasing an entry line, a clear stop-loss boundary, and three tiered profit targets (TP1, TP2, and TP3).
Live Performance Dashboard: An integrated on-screen table calculates real-time historical metrics, tracking active wins, losses, current target risk-to-reward ratios ($1:3$), and overall system win rate percentages.
Screener Security Matrix: The background engine leverages real-time multi-asset queries to stream concurrent trend statuses for five separate configurable symbols directly into a secondary visual dashboard.
// Automated Trade Risk & Multi-Asset Tracking Snippet
if buySignal
float dist = atr2 * baseRiskMult
activeSL := close - dist
activeTP1 := close + dist
activeTP2 := close + (dist * 2)
activeTP3 := close + (dist * 3)
tradeState := 1
entryPx := close
t1 = request.security(sym1, timeframe.period, trend)
🔵 WHY IT IS USEFUL
Elimination of Market Noise: Standard moving averages constantly whip back and forth during consolidations. The HalfTrend calculation filters out minor intraday fluctuations, only shifting when a definitive structural high or low is broken.
Mathematical Execution Blueprint: It takes the emotion out of trade management. Every signal comes equipped with dynamic, visually mapped stop losses and a $1:3$ risk-reward profit map that fills with real-time gradient paths.
Macro Market Synchronicity: The multi-asset side-panel allows you to keep an eye on major market drivers (like BTC, ETH, Gold, or major FX pairs) simultaneously, ensuring your trades line up with broader institutional market direction.
🔵 HOW TO USE THE SYSTEM
Trading Long Breakouts: When the system transitions from a bearish regime into a bullish regime, a Green LONG label will print beneath the breakout candle. Execute your position at the white entry line, setting your dynamic stop-loss boundary inside the red risk gradient.
Trading Short Breakdowns: Monitor the system for a shift into a bearish regime, indicated by a Red SHORT label appearing above the asset price. Execute short orders relative to the entry line and utilize the upper red gradient zone to map your protective risk ceiling.
Managing Exits and Targets: Take partial profits sequentially as the asset price moves through the Green target lines (TP1, TP2, and TP3). If a sudden trend reversal prints an opposing signal before your final targets are satisfied, the script automatically triggers a reversal exit rule to preserve accumulated gains.
Streamline your trade execution, manage portfolio risk systematically, and screen multiple sectors at once with the HalfTrend Long/Short Signal Engine workspace. Indicator

Verdict Calibrator Edge vs Base RateOverview
A meta-tool that answers one honest question about any signal: does it actually beat chance?
Point it at another indicator's output (via the source input) or use a built-in reference signal, and it forward-tests every long/short call with a triple-barrier outcome, compares the hit rate to the unconditional base rate of the same move, and only calls an edge "proven" when a confidence-interval lower bound clears that base rate. It splits the result by side (long vs short) and by regime (trend vs range).
It grades a signal; it does not make one.
Why this exists
Most "win rate" readouts are misleading. 60% right means nothing until you know how often the same move happened anyway — if price rose 60% of the time regardless, your signal has an edge of exactly zero. And a 60% on 12 samples is noise, not evidence.
This tool is built so it can only ever say "no proven edge" when there isn't one. The base-rate comparison and the significance gate make false confidence structurally hard to produce.
Why these parts are ONE tool
Signal as a parameter. Connect any plot on your chart through the source input, or pick a built-in reference. The signal is an input, not baked in — so you can audit your indicators, not just this one. The ten built-ins span the families traders actually use:
FamilyBuilt-insTrend-followMA cross · MACD cross · Supertrend flipMomentumRSI 50-cross · Stochastic crossBreakoutDonchian breakout · VWAP crossMean-reversionRSI 30/70 reversal · Bollinger fadeControlRandom (coin flip)
The random control — the tool's own self-test. A deterministic coin flip that by construction has no edge. Grade it and the verdict should read "Not proven" with an Edge near zero. If a random signal ever comes back "PROVEN", the harness is broken — distrust the tool, not the market. No other calibrator on PulseWire ships with a falsification test built in. It is also the single fastest way for a sceptical user to satisfy themselves that this thing is honest.
Triple-barrier outcome. From each signal: did price reach +target, −target, or neither within the horizon? A well-defined outcome, not a vague "did it go up eventually".
Base-rate comparison. The honest yardstick — the unconditional rate of the same outcome, matched to the signal's own side and regime mix. Edge = Hit% − Base%, never raw Hit%.
Significance gate. A score-interval lower bound must clear the base rate before an edge is called proven — which matters most at small samples, exactly where point estimates lie.
Regime and side split. Edge is reported for long vs short and trend vs range separately, because a real edge usually lives in one and not the other.
Remove any one and the tool can be fooled into reporting confidence it hasn't earned.
How to use it
Pick the signal (external source or a built-in), set the outcome (horizon + target in ATR), and read the verdict: PROVEN +X% ★ / Not proven / Gathering data.
The two plotted lines are the running Hit % (of the signal) and Base % (unconditional) — the gap between them IS the edge, and you can watch it stabilise as samples accumulate. Switch the dashboard to Pro to see where the edge lives (long/short, trend/range).
If it says "no proven edge", believe it. That's the tool working, not failing.
Data & scope
Works on any symbol and timeframe — it needs only OHLC, no volume. Give it enough history to reach the minimum sample count, or the verdict will honestly read "Gathering data". Because the base rate is measured on the same chart, the yardstick always matches the instrument you're on.
Non-repainting & honest limits
Confirmed-bar reads; samples log at the signal bar and resolve on closed bars.
This is an in-sample, forward-from-signal study aid — NOT a walk-forward backtest. No costs or slippage. Overlapping forward windows correlate samples (the minimum-gap setting mitigates this; it does not eliminate it). Small-n edges are provisional even when starred. A proven in-sample edge is not a guarantee out-of-sample. Nothing here predicts price.
Concept credits
Built on standard, published techniques — triple-barrier forward labelling (M. López de Prado), base-rate / skill-vs-chance evaluation (a long tradition in forecast verification), the efficiency-ratio regime read (Perry Kaufman), and the Wilson score interval for a proportion (Edwin B. Wilson). The signal-agnostic intake, the coupling and the plain-language verdict are this script's own. No third-party Pine code is reused.
Disclaimer
Research and educational tool only. Not financial advice, no recommendation, no guarantee of results. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability. Indicator

DCA + DRIP Simulator [WynTrader]DCA + DRIP Simulator
Hello my friend
This tool simulates real effect of an investment plan when a disciplined DCA+DRIP strategy compounds growth, compared to simply investing and pocketing the dividends. It applies to all kind of security with or without dividend paid, so you can compare what tickers you want..
This isn't a simplified estimate. It reads real price, dividend, and split data directly from PulseWire — bar by bar, month by month — and reconstructs what a real investor would have experienced. Apply it to any security — dividend-paying or not, stock, ETF, closed-end fund — and see the picture side by side: with DRIP and no DRIP.
█ CONCEPTS
This indicator illustrates clearly that DCA+DRIP can build more wealth over time than a standard monthly investment approach where dividends are simply cashed out with no plan in mind.
— Dollar Cost Averaging (DCA) means investing a consistent amount every single month, no matter what the market does. When prices drop, your money buys more shares automatically. Over time, this discipline lowers your average cost and keeps emotion out of the equation.
— Dividend Re-Investment Plan (DRIP) means every dividend payment goes straight back into buying more shares, instead of sitting idle. Those extra shares generate their own dividends, which buy more shares — a compounding effect that grows the longer you stay invested.
Together, DCA + DRIP compound together over time.
█ HOW IT WORKS
Set your chart to MONTHLY intervals, else the table is set to zero.
Once configured, the indicator reads price, dividend, and split data directly from PulseWire and simulates what a real investor would have experienced: buying every month (DCA), collecting dividends, reinvesting them automatically (DRIP) and adjust data with Splits.
█ FEATURES
Configurable DCA Parameters
Set your initial deposit, monthly contribution, and an optional annual DCA increase (e.g. +5%/yr to reflect salary growth and inflation over time). A withholding tax rate can also be applied for US-listed securities (e.g. 15% for ZQQ).
Flexible Date Range
The simulation runs from your chosen: a) Number of years to date; b) Start date to date; c) Visible chart from Start/End dates of your chart screen.
Side-by-Side Comparison
Every result is shown in two columns simultaneously — With DRIP and No DRIP. Capital, monthly dividend income, total dividends received, net gain, and share count — all at a glance.
Fully Customizable Table Display
Position, text size, and all colors are adjustable directly from the settings panel, so the table fits cleanly on any chart layout.
█ CONCLUSION
Load this indicator on any security — stock, ETF, closed-end fund, with or without dividends. DCA+DRIP Simulator applies to all of them, though DRIP's effect is most visible on dividend-paying securities, where reinvested dividends compound over time.
The difference between With DRIP and No DRIP can be significant over time.
█ WynTrader
I am not a Pine Script programmer — I am an investor who builds tools to support my own analysis, and maybe helps others. A few anomalies may have slipped through and there is likely room for improvement.
Hope you find this little tool useful. Enjoy!
WynTrader Indicator

Indicator

Supertrend Parameter Sensitivity 3D [LuxAlgo]The Supertrend Parameter Sensitivity 3D indicator is a powerful optimization tool that executes 100 simultaneous Supertrend backtests bar-by-bar to visualize how different ATR Lengths and Multipliers impact performance across various metrics.
By projecting this data onto a 3D surface and a heatmap dashboard, it allows traders to identify "stable" parameter zones and avoid over-optimized "peaks" that may lead to curve-fitting.
🔶 USAGE
This tool is designed to help traders find the most robust settings for the Supertrend indicator on any given timeframe or asset. Instead of manually guessing settings, users can see a holistic view of the parameter space.
🔹 3D Surface Projection
The 3D surface is rendered directly on the chart, where the X-axis represents the Multiplier, the Y-axis represents the ATR Length, and the Z-axis (height) represents the chosen performance metric.
Gold Highlight: Marks the absolute "Best" parameter combination based on the selected metric.
Blue Highlight: Marks the "Stable Area," which is the region where the average performance of a 3x3 parameter window is highest. This helps identify settings that remain profitable even if market conditions shift slightly.
🔹 Optimization Dashboard
The dashboard provides a detailed heatmap of the 100 tested combinations.
Value Distribution: An ASCII histogram at the top shows the distribution of all results, helping you understand if the "best" setting is an outlier or part of a consistent trend.
Heatmap Matrix: Displays the exact values for every combination. Hovering over any cell in the table reveals a tooltip with specific data, including the total number of trades for that combination.
Color Scaling: The colors are normalized relatively. Green represents the best results in the current set, while red represents the worst, allowing for clear visual distinction even if all results are negative or positive.
🔶 DETAILS
🔹 Bar-by-Bar Evaluation
The script manages 100 independent Supertrend states simultaneously. On every bar, it calculates the ATR and trailing stop levels for every combination in the sensitivity matrix. It simulates "Always-in-Market" trades (flipping long/short on direction changes) to track performance data without needing a separate strategy execution.
🔹 Optimization Metrics
Users can choose from 9 different metrics to optimize the 3D surface and Dashboard:
Win Rate: Percentage of trades that resulted in a profit.
Net Profit: Total gross profit minus total gross loss.
Profit Factor: Ratio of gross profit to gross loss.
Total Trades: The raw volume of signals generated.
Average Trade: The mean percentage return per trade.
Reward/Risk Ratio: The average win divided by the average loss.
Gross Profit: Total sum of all winning trades.
Total Wins: The absolute count of profitable trades.
Win/Loss Ratio: The count of wins divided by the count of losses.
🔶 SETTINGS
🔹 Main Indicator
ATR Length: The length used for the primary Supertrend line plotted on the chart.
Multiplier: The multiplier used for the primary Supertrend line plotted on the chart.
🔹 Sensitivity Ranges
Length Start: The starting ATR length for the 10x10 matrix.
Length Step: The increment added to the length for each subsequent row.
Multiplier Start: The starting Multiplier for the 10x10 matrix.
Multiplier Step: The increment added to the multiplier for each subsequent column.
🔹 Optimization
Metric: Selects the performance data used to determine the Z-height of the surface and the colors of the heatmap.
🔹 3D Surface Style
High/Low/Wire/Stable Colors: Customize the visual appearance of the 3D projection.
X/Y/Z Spacing & Scale: Adjusts the physical dimensions and height of the 3D surface on the chart.
🔹 Dashboard
Enable Dashboard: Toggles the visibility of the heatmap table.
Position/Size: Controls where the dashboard appears and how large it is on the screen.
Indicator

Apex Edge - Trend Breakout V1.1Apex Edge — Trend Breakout
A with-trend channel breakout system with a 30-symbol radar and a dual-window, cost adjusted backtest.
Indicator Guide · Apex Edge
This guide explains exactly what the indicator does, how every number is calculated, why the backtest is built the way it is, and how to trade it. Nothing here is hidden behind a black box — the whole point of the tool is that you can see the workings and judge the edge for yourself.
1. What it is
Apex Edge — Trend Breakout is a single overlay indicator that does four jobs at once:
• Signals trades when price breaks the recent range in the direction of the dominant trend.
• Manages the trade with a chandelier trailing stop, so winners are allowed to run and losers are cut quickly.
• Scans a 30-symbol watchlist (the Radar), ranking what is trending and flagging what is about to break.
• Tests the rules on the chart symbol across two separate date windows and reports the result as average R and sample size — then auto-grades it Red, Amber or Green.
The thesis. Most price action is noise. Occasionally a market trends, and when it does, a break of the recent range tends to continue. The edge of such a system does not come from being right often — it comes from a fat right tail: many small losses when breaks fail, paid for by the occasional large runner that the trailing stop rides for multiples of the initial risk. The tool is built end-to-end to find that behaviour and to stop you fooling yourself about whether it is really there.
2. What appears on your chart
• Green and red rails — the upper and lower edges of the breakout channel. A close beyond a
rail is a potential trigger.
• Up / down triangles — confirmed entries (a close-break that agrees with the trend).
• Orange line — the live trailing stop for the most recent signal. This is where your protective
order goes.
• HUD (top-right by default) — the chart symbol's trend, distance to its rail, current setup state, last signal and a running long/short signal count.
• Radar (top-left) — the 30-symbol scanner with score, direction, state and a Red/Amber/Green
“Go” column.
• Backtest panel (bottom-right) — two date windows side by side, each showing average R and
trade count per side, plus an automatic verdict.
3. The entry signal — how it is calculated
3.1 The breakout channel
The rails are the highest high and lowest low of the last N bars (default 20), measured up to the
previous bar so they never repaint:
upBreak = highest(high, 20) of the prior bar
dnBreak = lowest(low, 20) of the prior bar
A long trigger is a close crossing above the upper rail; a short trigger is a close crossing below the lower rail. Because the test is on the close, an intrabar wick through a rail that closes back inside does not trigger — only a genuine close beyond the range counts.
3.2 The dominant-trend filter
A breakout alone is not enough; it must agree with the trend. Trend is defined by a long EMA (default 200) and that EMA's slope, so a flat market counts as no trend:
Uptrend = close > EMA(200) AND EMA(200) rising over the last 5 bars
Downtrend = close < EMA(200) AND EMA(200) falling over the last 5 bars
Requiring both price position and EMA slope filters out the chop that ruins most breakout systems: if the EMA is flat, neither condition is true and no trades are taken.
3.3 Optional higher-timeframe agreement
You can additionally require the higher timeframe (default daily) to agree, using its last closed bar's EMA so it cannot repaint. With it on, a 4H long also needs the daily to be pointing up. Off by default.
3.4 The final rule
Long = close-break of the upper rail AND dominant uptrend
Short = close-break of the lower rail AND dominant downtrend
With “with-trend only” enabled (the default), counter-trend and flat-market breaks are blocked entirely.
The triangle only prints when both halves line up.
4. The exit — chandelier trailing stop, and what “R” means
Risk is defined the moment you enter. The initial stop sits a multiple of Average True Range away from entry (default 1.5 × ATR(14)). That distance — entry to initial stop — is one R.
Every outcome the tool reports is measured in multiples of that initial risk.
Once in the trade, the stop trails using a chandelier: it hangs a multiple of ATR (default 3 × ATR)
below the highest high reached since entry (mirrored for shorts). It only ever moves in your favour - it ratchets, never loosens. You exit when price touches the line.
• A loss is roughly −1R: the break fails and price falls back to the initial stop.
• A win is whatever the trail captures — often small, occasionally very large when a real trend
develops. There is no fixed profit target; capping the winners would throw away the exact tail
the system exists to harvest.
Note Live, you place a resting stop on the orange line and step it along as the line moves. The
backtest exits on the same intrabar touch, so what you test is what you trade.
5. The Market Radar — how the scan is built
The Radar pulls 30 symbols on the scan timeframe (default 4H) and ranks them so you watch the right markets. Four numbers drive it.
5.1 Trend-strength score
The score blends how cleanly a market is moving with how strongly:
• Efficiency Ratio (ER) — net distance travelled divided by the total path taken, over a lookback
(default 20). A straight move scores high; a market that thrashes back and forth to end up in the same place scores low.
ER = |close − close | / sum of |bar-to-bar moves over 20| (as a %)
• ADX — the standard directional-strength index (default 14).
The two are scaled and blended 55% ER / 45% ADX, calibrated so a market in a genuine trend reads roughly 60–70. Only symbols above the score threshold (default 50) are shown, strongest first.
5.2 Direction, NEAR and the Go grade
• Direction comes from the same dominant-EMA logic as the chart (up, down, or flat).
• NEAR flags a symbol that is trending and within a set distance of its breakout rail in the trend
direction (default 0.5 × ATR) — i.e. about to trigger.
• Go (Red / Amber / Green) is read from your own curated lists. You tell the indicator which
symbols you trade long and short at Green (confirmed) and Amber (testing) confidence; the Go
column then lights up only for those symbols in that direction.
Note The Radar does not grade edges for you — you populate the Green/Amber lists from your own backtest sweep (Section 6). The Go column simply surfaces your decisions on the live scan.
6. The backtest engine and the Auto verdict
This is where you decide whether a symbol earns a place on your lists. For the chart symbol, the engine replays every historical signal forward (up to 60 bars), simulates the exact chandelier trail with intrabar touch exits, deducts your cost per trade, and records each result in R.
It does this across two independent date windows and reports, for each window and each side
(long / short / all):
• Avg R — the average result per trade, net of cost. This is the system's expectancy.
• N — the number of trades in that window. This tells you whether to believe the Avg R.
The Auto column then turns that into a verdict using two thresholds (defaults shown), applied to both windows:
Verdict Condition
GREEN Avg R ≥ 0.10 AND N ≥ 50 in BOTH windows — a real, repeatable edge
AMBER Qualifies in one window, or only marginally — promising, not proven
no Fails the bar — no demonstrated edge this way
A Green therefore is not a single good run; it is an edge that survived two separate market periods with a large enough sample in each. That is the bar a symbol must clear before it goes on your Green list.
Note Cost is entered in price units and applies to the chart symbol, so set it to that instrument's
realistic round-trip spread before trusting a marginal (Amber) result. A couple of pips is what flips a thin edge from positive to negative — which is exactly the truth you want before risking money.
7. Why those default backtest dates?
The two windows default to 2019–2021 and 2022–present, and the split is deliberate. These are not two halves of one stretch — they are two genuinely different market regimes:
• 2019–2021 spans the late-cycle calm, the COVID crash and the violent recovery — a high volatility, strong-trend era.
• 2022–present is the rate-hiking regime: broad USD strength, a real equity bear in 2022, and a
different volatility character.
A set of rules that prints a profit in one regime might simply be tuned, by luck or by hand, to that regime. The only honest test is whether the same untouched rules also work in a different one.
Requiring an edge to clear the bar in both windows is the out-of-sample check built directly into the panel. The dates are adjustable — what matters is that the two windows cover different conditions, not the exact years.
8. Why we judge by R and N, not win rate
Win rate is the most quoted and least useful statistic in trading. On its own it tells you almost nothing, and for a system like this it actively misleads.
8.1 Win rate hides the size of wins and losses
Two systems can have wildly different win rates and the opposite profitability. Expectancy — average R per trade — is what actually ties to your account:
System Win rate Expectancy Reality
“High win rate” (avg win 90% +0.5R Loses Money
+0.5R, avg loss −5R)
Trend breakout (avg win 40% +0.60R Strong edge
+3R, avg loss −1R)
The 90%-winner loses on the rare 5R disaster; the 40%-winner thrives because its winners dwarf its losers. Judge either by win rate and you draw the wrong conclusion. Expectancy = (win% × avg win) − (loss% × avg loss), expressed in R, is the number that matters.
8.2 This system is meant to be a low win-rate system
A trend-breakout-with-trail design is designed to win less than half the time. Most breakouts fail and cost ~1R; a minority become trends and the trail rides them for many R. The profit lives entirely in those few big winners — the fat right tail. Win rate cannot see that tail; only average R can.
Optimising for win rate would push you to cap winners and widen stops, destroying the very edge the tool is built to capture.
8.3 N is what makes the average believable
An average R is only as trustworthy as the number of trades behind it. A +0.8R average on 8 trades is a coin landing heads a few times in a row — it tells you nothing. The same average on 120 trades is a genuine signal. That is why the Auto grade refuses to certify anything below N ≥ 50 per window, no matter how attractive the Avg R looks. Small samples are where traders fool themselves most, so the tool simply will not show Green there.
8.4 How to read an Avg R figure
Avg R (net of cost) Read it as
≤ 0 (negative) A losing side — shown red and correctly left off your lists
+0.05 to +0.15 Marginal — cost and slippage can erase it
+0.15 to +0.35 A solid, tradeable edge
+0.35 to +0.80 Strong — and normal for this let-run design when a market trends cleanly
+0.80 and up Exceptional — sanity-check it before you believe it (see below)
Two cautions. First, R is signed. A side can be negative, meaning that direction lost money over the test — it is shown in red, and the Auto verdict only turns green for positive R that clears the bar in both windows. A red number is not a high score you should chase; it is a losing side the tool is keeping you out of.
Second, because this design lets winners run, a healthy average is usually carried by a minority of large trades rather than spread evenly across all of them. That is expected behaviour for trend following, not a flaw — but it means a very high figure deserves a look at the trade distribution, and a check for look-ahead, before you treat it as durable. High positive R here is the system working; it is only suspect when it is extreme or rests on a handful of trades.
9. How to trade it
The workflow separates the slow, careful job (deciding what to trade) from the fast one (executing when it triggers).
1. Weekly — curate. Flick through your watchlist. On each symbol read the Auto panel and note
the verdict per side. Add Green symbols to the matching Green list (long or short) in settings,
and Amber symbols to the Amber lists. Skip the reds.
2. Set once — the blanket alert. On a 4H chart create the “Watchlist near breakout” alert, set to Once Per Bar Close. It pings only for your Green/Amber symbols when one is trending and
nearing its rail.
3. On the ping — find the trade. Open the Radar. Confirm the symbol shows Green/Amber Go +
NEAR + the right direction.
4. Arm the entry. On that symbol's chart set the “Breakout Long/Short” alert, also Once Per Bar
Close, so only a close beyond the rail can fire it (no wicks).
5. Enter. When the triangle prints, take the trade and place your stop on the orange trailing line.
6. Manage. Step the stop along with the line as it moves your way — never against you. Exit on the touch. No fixed target; let the trail decide.
10. Trading rules and risk discipline
• Trade Green in the validated direction. Amber is watch-and-small-size. Red is no trade.
• A break against the trend is not your trade. Skip it, however tempting.
• Judge over a batch of trades, never one. A single loss says nothing about a positive expectancy system; variance is the cost of admission.
• One settings set for all symbols. Never tune the inputs per symbol to flatter the past — that is
curve-fitting. If you change a strategy setting, re-test both windows before trusting it again.
• Size correlated instruments as one position. A basket of yen crosses, or a basket of equity
indices, is one bet wearing several names. Three 1% longs that all rise and fall together is a 3%
bet on one theme, not three diversified trades.
11. Settings reference
Setting Defaults and What they mean:
Breakout channel 20 Bars - used for the high/low rails
Near-break heads-up 0.5 ATR - How close to the rail counts as NEAR
Dominant EMA 200 - The trend reference line
EMA slope lookback 5 Bars - used to judge the EMA's slope
With-trend only On - Blocks counter-trend and flat-market breaks
Higher timeframe Off / 1D - Optionally require the daily to agree
Initial stop 1.5 ATR - Defines one R (entry to stop)
Chandelier trail 3.0 ATR - Trailing distance below the running extreme
Trade window 60 bars - How far the backtest follows each signal
Cost per trade 0 - Round-trip cost in price units (set per instrument)
Test windows A / B 2019–21 / 22–now - The two regimes the Auto grade checks
Qualify Avg R / N 0.10 / 50 - Thresholds for a Green verdict, per window
Scan timeframe 4H - Timeframe the Radar evaluates
Score threshold 50 - Minimum trend score to appear on the Radar
12. Non-repainting, and honest limitations
Non-repainting by design. Signals use closed-bar prices and the prior-bar channel, the higher timeframe pull uses the last closed bar, and the backtest only ever replays bars that were already in the past relative to each signal. What you see on history is what you would have seen live.
What a backtest can and cannot tell you. The replay is a simulation. It assumes fills at the touched price and a fixed cost; live trading adds variable spread, slippage, gaps and partial fills. Treat the Avg R as an estimate of edge and direction, not a promise of returns. Forward-test before you scale.
• The Green/Amber lists are your inputs — the tool surfaces your decisions, it does not validate
them for you.
• Correlated symbols inflate the apparent number of edges; the count is not the same as
diversification.
• A strong directional drift in an asset class (equities up, for example) can make a one-sided
system look better than the rule itself is.
This indicator is a decision-support and research tool. It is not financial advice and does not place trades.
Markets carry risk; past performance does not guarantee future results. You are responsible for your own decisions and risk.
Apex Edge - Trend Breakout - Radar finds the trend - Auto/Go says if it pays - Arrow times entry - Orange line manages - exit Indicator

Trend Volatility RegimeThe Trend Volatility Regime is an all-in-one trend-following model that identifies changes in the market regime by combining moving-average crossover signals with volatility-adaptive trailing stops. It features an integrated backtesting engine that provides institutional-grade insights into historical strategy performance, along with a built-in alert system that notifies investors in real time when regime changes occur. The model integrates seamlessly into the price chart and presents backtest results in a clear, color-coded table benchmarked against buy-and-hold.
At its core, the model combines two complementary trend detection components to determine the prevailing market regime. The first component identifies the underlying structural trend using a volatility-adjusted moving-average crossover based on the spread between fast and slow moving averages. The second component identifies trend reversals using an adaptive trailing stop based on changes in price and volatility. Bullish and bearish regimes occur when both crossover and volatility signals are directionally aligned, while conflicting signals result in neutral regimes.
Bullish Crossover Signal = (Fast MA – Slow MA) > (ATR × Trend Margin)
Bearish Crossover Signal = (Fast MA – Slow MA) < –(ATR × Trend Margin)
Bullish Volatility Signal = Price > (Highest Price – (Volatility × Stop Factor))
Bearish Volatility Signal = Price < (Lowest Price + (Volatility × Stop Factor))
By default, the model applies an asymmetric regime design in which conflicting signals default to a bullish regime unless half-equity positions are enabled in the menu. This asymmetric design reflects the tendency of risk assets to deteriorate gradually while recovering more abruptly. The moving-average component captures the slower deterioration typically observed during market tops, while the trailing stop component responds more dynamically to faster reversals typically observed at market bottoms. This helps reduce overreaction to corrections during uptrends while still allowing for faster re-entry following sharp recoveries. To evaluate the performance of different parameter configurations, the model includes a built-in table with the following metrics:
CAGR = Compounded Annual Growth Rate.
Excess = CAGR in excess of buy-and-hold.
Sharpe = CAGR per unit of standard deviation.
Sortino = CAGR per unit of downside deviation.
Calmar = CAGR relative to maximum drawdown.
Max DD = Largest peak-to-trough decline in value.
Alpha (α) = Excess annualized risk-adjusted returns.
Win Rate = Ratio of profitable trades to total trades.
Profit Factor = Total gross profit per unit of losses.
Expectancy = Average expected return per trade.
Turnover = Average annualized change in exposure.
This indicator is designed with flexibility in mind, enabling users to specify the start date of the backtesting period, the preferred trend type, volatility type, and regime visualization. Supported regime visualizations include line, candle, and shaded background. Supported moving-average types include the Exponential Moving Average (EMA), Simple Moving Average (SMA), Wilder’s Moving Average (RMA), and Weighted Moving Average (WMA). Supported volatility types include the Average True Range (ATR), Standard Deviation (SD), and Mean Absolute Deviation (MAD). Supported price sources include Close, HL2, HLC3, and OHLC4. The table follows an intuitive color-coded logic that allows for quick performance comparison against buy-and-hold (B&H):
CAGR = Green indicates above 0%, while red indicates below 0%.
Excess = Green indicates above 0%, while red indicates below 0%.
Sharpe = Green indicates better than B&H, while red indicates worse.
Sortino = Green indicates better than B&H, while red indicates worse.
Calmar = Green indicates better than B&H, while red indicates worse.
Max DD = Green indicates better than B&H, while red indicates worse.
Alpha (α) = Green indicates above 0%, while red indicates below 0%.
Win Rate = Green indicates above 50%, while red indicates below 50%.
Profit Factor = Green indicates above 2, while red indicates below 1.
Expectancy = Green indicates above 0%, while red indicates below 0%.
In summary, the Trend Volatility Regime is a comprehensive trend-following tool designed to help investors stay on the right side of the market by identifying key changes in the market regime. By combining volatility-adjusted moving-average crossover signals with adaptive volatility-based trailing stops, the model seeks to maximise participation during uptrends while reducing exposure during sustained downtrends. While the model provides valuable historical insights, users should remain mindful that past results may not necessarily persist under future market conditions. Indicator

EMA Edge - Multi-EMA Backtest Table with Golden/Death CrossEMA Edge — Multi-EMA Backtest Table with Golden/Death Cross
A clean, all-in-one performance dashboard that backtests 6 long-only strategies side-by-side against a Buy & Hold benchmark — 5 single-EMA crossover strategies plus a classic Golden Cross / Death Cross strategy — with on-chart cross markers and built-in alerts.
Instead of guessing which EMA length works best for a given stock or timeframe, this indicator runs the math for you and shows the answer in a single glance, ranked against simply holding the asset.
What It Does
For each of 5 user-defined EMA lengths, the indicator simulates a simple long-only strategy:
Buy when price closes above the EMA (when flat)
Sell when price closes below the EMA (when long)
Equity starts at 100 and compounds across trades using the close-to-close return of each trade
A 6th strategy row tests the classic Golden/Death Cross:
Buy when the fast EMA crosses above the slow EMA (Golden Cross)
Sell when the fast EMA crosses below the slow EMA (Death Cross)
Special first-bar handling: if the fast EMA is already above the slow EMA at the start of your backtest window (i.e., we're mid-trend with no fresh Golden Cross to wait for), the strategy enters immediately at that bar's opening price. This avoids the unrealistic outcome of sitting in cash for years waiting for a cross that already happened.
All strategies are compared against a Buy & Hold baseline that starts at the close of the first in-range bar. If a position is open at the last bar, its equity is marked-to-market so every strategy is compared on equal terms — fully invested vs. partially invested at the cutoff.
Features
5 configurable EMAs — defaults 9 / 21 / 50 / 100 / 200, fully editable
Golden/Death Cross strategy — uses independent fast/slow EMA inputs (default 50 / 200)
Performance table showing Return %, delta vs. Buy & Hold, and Outperform / Underperform status per strategy
Flexible backtest window — X weeks, X years, or full chart lifetime
On-chart GC / DC markers with optional subtle background tint on cross bars
Built-in alerts for both Golden Cross and Death Cross events
Fully customizable table — 9 position options, 6 text sizes, all colors exposed as inputs
Soft, light color palette designed not to dominate the chart
Optional EMA plotting (off by default to keep the chart clean)
How To Read The Table
ColumnMeaningStrategyThe rule being testedReturnTotal % return of the strategy over the chosen windowVs StockDifference between the strategy's return and Buy & HoldStatus▲ Outperform if the strategy beat Buy & Hold, ▼ Underperform if not
Green-tinted rows = strategy beat Buy & Hold
Red-tinted rows = strategy underperformed Buy & Hold
Cream row = the Buy & Hold baseline itself
How To Use
Add the indicator to any chart — works on stocks, ETFs, crypto, forex, any timeframe.
Choose your backtest window (e.g., 1 Year, 5 Years, or Lifetime).
Scan the table to see which strategy historically beat Buy & Hold on this asset.
Use the on-chart GC / DC labels to spot historical and live cross events. Right-click any marker → Add Alert to be notified on new crosses.
Tip: Test the same EMA lengths across daily and weekly timeframes and across different assets. You'll usually find that what works on a steady index like SPY does not work on a volatile single stock, and vice versa. That's the entire point of the table — to make those differences visible instead of assumed.
Key Inputs
EMA 1–5: Lengths for the 5 single-EMA strategies
Show EMAs: Plot EMAs on chart (off by default)
Use Lifetime Performance: Backtest from the very first bar instead of a fixed window
Performance Timeframe Type / Value: Weeks or Years lookback
Crosses group: Toggle GC/DC display, set fast/slow EMA lengths, customize colors
Table Style group: Position, text size, background and text colors
Notes & Limitations
All strategies are long-only — no shorts, no leverage, no stops, no commissions, no slippage. This is a clean rule-based comparison, not a turnkey trading system. Live results will differ.
Entries and exits use close prices, except for the GC/DC strategy's first-bar entry when already in a golden state, which uses open.
Open positions at the last bar are marked-to-market so the comparison vs. Buy & Hold is apples-to-apples.
Past performance is not indicative of future results. Use this as a research and screening tool.
The GC/DC strategy uses separate EMA lengths from the 5 table EMAs by design, so you can run 9/21/50/100/200 in the table while still testing the classic 50/200 cross.
Alerts Available
Golden Cross: Fast EMA crossed above Slow EMA
Death Cross: Fast EMA crossed below Slow EMA
If you find this useful, a boost is appreciated. Suggestions and feedback welcome in the comments.
Open-source — feel free to study, fork, and adapt. Indicator

Tension Flow Trend [BigBeluga] - Historical RRTension Flow Trend is a high-performance trend-following framework that treats price action like a reactive elastic system. By moving beyond static averages, this indicator introduces "Price Tension"—a sophisticated measurement of how overstretched a trend is relative to its baseline—now enhanced with a live Historical RR (Risk:Reward) backtesting engine.
By combining the ultra-low-lag properties of the Hull Moving Average (HMA) with real-time Z-Score volatility analysis, this indicator visualizes not just the direction of the market, but the mathematical "exhaustion" of every move.
🔵 THE ELASTICITY FRAMEWORK
The Ultra-Responsive HMA Baseline: At the heart of the system is a 50-period Hull Moving Average. Specifically engineered to eliminate the lag found in traditional SMAs, the HMA provides a "true north" that reacts instantly to structural shifts without the usual delay.
Price Tension (Z-Score Engine): The indicator measures the vertical distance between price and the HMA, normalizing it using standard deviation. This Z-Score represents the "Tension" of the trend—showing you exactly when the market has deviated too far from its mean.
Dynamic Transparency Feedback: As price enters an extreme Z-Score range, the trend ribbon’s transparency increases. A bright, solid ribbon indicates compressed, high-probability energy, while a fading ribbon warns that the "elastic band" is stretched to its limit.
🔵 PERFORMANCE & RISK INTELLIGENCE
Automated RR Projection: Upon every "START" signal, the script automatically plots dynamic Risk:Reward boxes. It calculates an ATR-based stop loss and projects a take-profit target based on your custom RR ratio, visualizing the trade's path in real-time.
Rolling Performance Tracker: The indicator features a built-in backtester that tracks the win/loss history of the most recent trades. It calculates your Win Rate based on a rolling sample size, allowing you to see how the strategy is performing under current market conditions.
Signal Cooldown Logic: To eliminate "whipsaw" noise, a configurable cooldown engine ensures that signals only trigger during significant structural shifts. This prevents signal clustering in sideways or choppy markets.
🔵 DUAL-DASHBOARD SYSTEM
Energy Monitor (Bottom-Right): Tracks the numerical Z-Score and categorizes the market status. "Strong" indicates healthy momentum, while "Overextended" warns of an imminent mean-reversion risk.
RR Performance Table (Top-Right): Provides an institutional-grade breakdown of your strategy performance, including total Wins, Losses, and the current Win Rate percentage for the specified trade window.
🔵 STRATEGIC APPLICATION
The Momentum Breakout: Look for "START" labels that appear when the HMA slope aligns with a price crossover. These represent the birth of a new trend cycle where tension is low and expansion is likely.
Managing Trend Exhaustion: When the ribbon begins to fade and the Energy Dashboard hits "Overextended," it is time to tighten stops or take partial profits. High tension usually precedes a sharp snap-back to the baseline.
Confirming with Win Rate: Use the Performance Dashboard to gauge market regime. If the rolling Win Rate is high, the market is respecting the trend envelopes; if it drops, the market may be entering a consolidation phase where you should wait for better alignment.
Mean Reversion Targets: For contrarian traders, the HMA baseline serves as a natural "magnet." When price is significantly overextended, look for price to be pulled back into the HMA "Neutral Zone."
Tension Flow Trend transforms your chart into a map of market stress and opportunity. By visualizing the tension behind every candle and providing real-time performance feedback, it ensures you stay on the right side of the trend while trading with professional-grade risk management. Indicator

Strategy Sensitivity MatrixThe Strategy Sensitivity Matrix is an institutional-grade backtesting tool designed to evaluate the robustness and parameter sensitivity of trend-following strategies. It enables users to compare the historical performance of a broad range of parameter combinations across multiple metrics to assess the overall stability of the selected strategy. The model displays the complete backtest landscape in a structured, color-coded matrix that allows investors to quickly identify robust parameter regions and evaluate historical performance stability across parameter combinations.
At its core, the matrix systematically evaluates a wide range of parameter combinations, where every individual cell represents the backtest result for one unique parameter configuration. Users can switch between volatility-based strategies and moving-average strategies. In volatility mode, the matrix rows represent volatility lengths and the matrix columns represent volatility factors. In crossover mode, the rows represent fast moving-average lengths and the columns represent slow moving-average lengths. Supported volatility types include the Average True Range (ATR), Standard Deviation (SD), and Mean Absolute Deviation (MAD). Supported moving-average types include the Exponential Moving Average (EMA), Simple Moving Average (SMA), Wilder’s Moving Average (RMA), and Weighted Moving Average (WMA). Supported display metrics include:
CAGR = Compounded Annual Growth Rate.
Sharpe = CAGR per unit of standard deviation.
Sortino = CAGR per unit of downside deviation.
Martin = CAGR relative to the Ulcer Index (UI).
Calmar = CAGR relative to maximum drawdown.
Max DD = Largest peak-to-trough decline in value.
Alpha (α) = Excess annualized risk-adjusted returns.
Expectancy = Average expected return per trade.
Profit Factor = Total gross profit per unit of losses.
Win Rate = Ratio of profitable trades to total trades.
Trades/Year = Average number of trades per year.
The matrix follows an intuitive percentile-based coloring framework that dynamically compares the relative performance and stability of all parameter combinations. Stronger values above or equal to the matrix median are highlighted in green, with bright green representing the top 10% of all parameter combinations. Weaker values below the matrix median are highlighted in orange, while red represents objectively weak performance based on the selected metric. Broad clusters of consistently strong results generally suggest lower parameter sensitivity and potentially greater robustness, while isolated peaks generally suggest elevated parameter sensitivity.
The summary table displayed above the matrix provides a broader distribution-level statistical overview of results across all parameter combinations. This structure allows investors to evaluate whether strong historical performance appears statistically widespread or narrowly concentrated across the parameter landscape. Stable parameter landscapes generally exhibit lower standard deviation, similar median and average values, and smaller performance gaps between the best and top 10% parameter combinations. The summary table includes the following sections:
Start = Start month and year of the selected backtest period.
End = End month and year of the selected backtest period.
Metric = Performance metric currently displayed in the matrix.
B&H = Buy-and-hold performance for the selected metric.
Best = Best-performing parameter combination in the matrix.
Top 10% = Average value of the top 10% parameter combinations.
Median = Median value across all parameter combinations.
Average = Average value across all parameter combinations.
Std Dev = Standard deviation of all parameter combinations.
≥ B&H = Percentage of combinations equal or better than B&H.
In summary, the Strategy Sensitivity Matrix is a powerful robustness analysis tool designed to help investors make data-driven decisions when evaluating parameter combinations across trend-following strategies. By evaluating the full parameter landscape, investors can quickly determine whether strong historical performance appears broadly distributed across stable parameter regions or narrowly concentrated within isolated parameter combinations. While historical robustness can provide valuable insight into past market behavior over the selected backtest period, users should remain mindful that market structures evolve over time and that historically stable parameter regions may not necessarily persist in future market conditions. Indicator

eXeTRADE Main Dual Score Signal Indicator# eXeTRADE-Main — Dual-Score Signal Indicator
**Trend • Support/Resistance • Higher-Timeframe • Backtest — all in one score**
---
## What it does
eXeTRADE-Main is a multi-factor signal indicator built for medium-to-experienced traders on **1H, 4H, and Daily** timeframes. It calculates **Long and Short scores independently** from five weighted layers — Trend, Support/Resistance, Momentum, Higher Timeframe, and Risk/Reward — and produces three signal grades:
- **Strong Buy / Sell** — score ≥ 90
- **Normal Buy / Sell** — score ≥ 75
- **Range Buy / Sell** — when R:R ≥ 3.0
The indicator is designed for **plan-driven, low-risk trading**. It auto-detects trend lines and parallel channels, ranks the top three S/R levels by strength, runs a weekly Best-MA backtest, and applies a **Proximity Gate** that penalises signals fired too close to a strong opposing level — the most common cause of immediate reversals.
## Key features
- Dual scoring — Long and Short calculated independently (0–100 scale)
- 14-MA + Best-MA weekly backtest (Trade / Long / Short / S/R averages auto-tuned)
- 3-layer trend line + parallel channel auto-detection with break tracking
- Pivot-based S/R with touch counting and violation tracking; top 3 selected by strength
- HTF context — EMA50/200, RSI, pivot, Ichimoku cloud, and volume folded into the score
- **Proximity Gate** — soft-block or hard-block when entry sits within 0.5×ATR of opposing S/R
- Built-in backtest engine with S/R trailing stop
- Position-management panel for manual entry / TP / SL tracking
- Single consolidated master alert (one alert covers every signal and trail event)
## How to read the chart
Numbered markers on the cover image:
1. **Score Panel** — current Long/Short scores with delta arrows, ATR, and trail status
2. **Top S/R Levels** — three strongest levels, ranked by point score
3. **Backtest Results** — trade count, win/loss, win rate, total P/L, max drawdown
4. **Buy Signal** — green triangle marks Strong / Normal / Range Buy entries
5. **Trail Exit** — yellow × marks where the trailing stop was hit
6. **Auto Trend Lines** — multi-layer trend with parallel channels
## Important settings
- **Backtest Period** — 1 Mo / 3 Mo / 6 Mo / 1 Yr / All
- **Entry Mode** — Single (one position) or Multi (pyramiding)
- **Signal Levels** — Strong (default 90) and Buy/Sell (default 75) thresholds
- **Proximity Gate Mode** — Off / Warning / Soft Block / Hard Block
- **HTF Auto-Bump** — automatically lifts the HTF reference one level if the chart TF matches HTF
## Alerts
A single **master alert** is recommended — it fires for every signal and trail event in one channel. Individual alerts (Strong Buy, Strong Sell, Trail Hit, Channel Break, etc.) are also available if granular control is preferred.
## Best on
4H and Daily timeframes for **Forex pairs, XAUUSD, XAGUSD, and major equities**. Not recommended below 1H — short-timeframe noise reduces score reliability.
## Disclaimer
This indicator is a decision-support tool, not financial advice. **Always define stop-loss and exit plan before entry.** Past performance does not guarantee future results. Trade at your own risk.
---
*Comments and feedback are welcome.*
Indicator

Volatility Stop SelectorThe Volatility Stop Selector is a comprehensive trend-following tool designed to automatically identify the optimal volatility stop strategy. It features adjustable parameters and an integrated backtester that delivers institutional-grade insights into the recommended strategy. The model continuously adapts to new data in real time by evaluating multiple volatility length and factor combinations, determining the best-performing configuration, and presenting the backtest results in a clear, color-coded table that benchmarks performance against the buy-and-hold strategy.
At its core, the model systematically backtests a wide range of volatility stop combinations to identify the configuration that maximizes the selected optimization metric. Users can choose to optimize for absolute returns or risk-adjusted returns using metrics such as the Sharpe, Sortino, Martin, or Calmar ratios. The Martin ratio is particularly well suited for volatility-based risk management strategies, as it evaluates returns relative to the Ulcer Index, capturing both the depth and duration of drawdowns and therefore favoring smoother equity curves. Alternatively, users can enable manual optimization to test custom volatility length and factor settings and view the corresponding backtest results. The label displays the Compounded Annual Growth Rate (CAGR) of the strategy, with the buy-and-hold CAGR in parentheses for comparison. The table presents the backtest results based on the volatility length and factor displayed at the top:
Sharpe = CAGR per unit of standard deviation.
Sortino = CAGR per unit of downside deviation.
Calmar = CAGR relative to maximum drawdown.
Max DD = Largest peak-to-trough decline in value.
Beta (β) = Return sensitivity relative to buy-and-hold.
Alpha (α) = Excess annualized risk-adjusted returns.
Win Rate = Ratio of profitable trades to total trades.
Profit Factor = Total gross profit per unit of losses.
Expectancy = Average expected return per trade.
Trades/Year = Average number of trades per year.
This indicator is designed with flexibility in mind, enabling users to specify the start date of the backtesting period, the preferred volatility type, and the price source. Supported volatility types include the Average True Range (ATR), Standard Deviation (SD), and Mean Absolute Deviation (MAD). Supported price sources include Close, Heikin Ashi, HL2, HLC3, and OHLC4. To minimize overfitting, users can define constraints such as a minimum and maximum number of trades per year, as well as an optional optimization margin that prioritizes more robust combinations by requiring more reactive combinations to exceed this threshold. The table follows an intuitive color-coded logic that enables quick performance comparison against buy-and-hold (B&H):
Sharpe = Green indicates better than B&H, while red indicates worse.
Sortino = Green indicates better than B&H, while red indicates worse.
Calmar = Green indicates better than B&H, while red indicates worse.
Max DD = Green indicates better than B&H, while red indicates worse.
Beta (β) = Green indicates better than B&H, while red indicates worse.
Alpha (α) = Green indicates above 0%, while red indicates below 0%.
Win Rate = Green indicates above 50%, while red indicates below 50%.
Profit Factor = Green indicates above 2, while red indicates below 1.
Expectancy = Green indicates above 0%, while red indicates below 0%.
In summary, the Volatility Stop Selector is a powerful tool designed to help investors make data-driven decisions when selecting volatility-based trend-following strategies. By optimizing for risk-adjusted returns, investors can identify the best configurations using institutional-grade metrics. While results are based on the selected historical period, users should be mindful of overfitting, as past results may not persist under future market conditions. Since the model continuously recalibrates to incorporate new data, the recommended length and factor may evolve over time. Indicator

Indicator

Backtest Template [Backtest Terminal]Overview — What Is This Script?
Backtest Template (BTT) is an open-source strategy framework designed to let traders test their own indicator logic without building the backtest infrastructure from scratch. Instead of writing stop loss management, session filters, alert systems, and trailing stops yourself, BTT handles all of that automatically. You bring your signal idea — BTT handles the rest.
The template is designed for all markets: stocks, Forex, gold (XAUUSD), crypto spot, and crypto futures. It ships with a pre-built Moving Average Cross trigger and Moving Average Trend filter as working examples that you replace with your own logic.
What Makes It Original
Most backtest templates on PulseWire are fixed strategies that test one specific indicator. BTT introduces a User Zone architecture: a single clearly marked section near the top of the script where the user replaces one pre-built trigger and one pre-built filter with their own Pine Script code. The engine below reads four fixed variable names and runs automatically — the user never needs to touch strategy orders, stop management, session logic, or the alert system.
This design means a complete beginner can run their first backtest by changing fewer than ten lines of code, while an advanced user can plug in arrays, multi-timeframe calculations, or complex signal logic and the engine handles it identically.
What The Engine Handles Automatically
Once your signal is connected through the User Zone, the following run without any additional code:
Stop Loss and Take Profit — three unit modes: percentage of price, fixed points (Forex / CFD), or fixed dollar amount (crypto / stocks)
Stop Mode — Fixed (original level), Trailing (follows price), or Breakeven (moves to entry price)
Trailing Stop — configurable distance and activation offset, each with matching %, point, and dollar unit inputs consistent with your Stop/Target Mode selection
Breakeven Stop — configurable activation offset in the same unit system
Disable Take Profit — when using Trailing mode, an optional toggle removes the fixed TP so the trailing stop becomes the sole exit
Trade Direction — Long only, Short only, or Both
Backtest Date Range — start and end date inputs
Trading Day Filter — enable or disable any day of the week
Trade Session Hours — exchange server time filter (HHMM-HHMM format)
Trade Windows — four configurable local-time windows each independently set to Off, Blackout, or Trade Only mode with full timezone support
Entry Signal Markers — green and red triangles that only appear when all conditions pass, so chart visuals exactly match what the strategy trades
App Alerts — pre-formatted alert messages with ticker, direction, stop and target prices
Custom JSON Alerts — four separate input fields for webhook bot integration, one per order event
How To Use It — Quick Start
Open the script in Pine Editor
Find the User Zone near the top — it is clearly marked with a visual border and is the only section you need to edit
Replace the pre-built Moving Average Cross trigger block with your own indicator signal, assigning your long condition to userLong and your short condition to userShort — always add and confirmed to both
Replace the pre-built Moving Average Trend filter block with your own market condition, assigning to userFilterLong and userFilterShort
Add to chart and open Strategy Tester
User Zone Contract
The engine connects to your signal through exactly four variables. Do not rename them:
userLong → true on the bar you want to enter Long
userShort → true on the bar you want to enter Short
userFilterLong → true when Long entries are allowed
userFilterShort → true when Short entries are allowed
Always add and confirmed (barstate.isconfirmed) to userLong and userShort. This ensures the signal locks in only when the bar closes, preventing signals from changing value mid-bar.
Setting userFilterLong = true disables the Long filter entirely. Setting it to a condition like close > ta.ema(close, 200) means Long entries are only allowed when price is above that EMA. Long and Short filters are independent — you can filter one direction while leaving the other open.
Stop Loss and Take Profit — Three Unit Modes
The Stop/Target Mode setting controls how SL and TP distances are measured:
% (Percentage) — distance as a percentage of price. Suitable for stocks and crypto. Stop source can be the close price or the candle High/Low. Take profit is derived from stop distance × Risk:Reward ratio.
Point - Forex / CFD — distance in instrument ticks (syminfo.mintick). Suitable for XAUUSD, EURUSD, and other Forex/CFD instruments. Example: 100 points on EURUSD (mintick = 0.00001) = 1 pip.
Dollar - Crypto / Stock — fixed dollar distance from entry. Suitable for BTCUSD and US stocks.
All trailing and breakeven offset inputs follow the same three-unit system. Use the , , or input that matches your selected Stop/Target Mode. Using the wrong unit input will result in a mismatch between your intended stop distance and the actual calculation.
Stop Mode — Fixed, Trailing, Breakeven
Fixed — stop loss stays at the original level from entry until hit or TP is reached
Trailing — stop follows price at a configurable distance, locking in profit as price moves. The trailing activation offset controls how far price must move before trailing begins (shown as a yellow line on chart). Enable "Disable Take Profit" to let the trailing stop manage the entire exit without a fixed TP ceiling
Breakeven — stop moves to the exact entry price once price moves a configurable distance in your favour (shown as a white line on chart)
Trade Windows — Off, Blackout, Trade Only
Each of the four time windows (Tokyo, London, New York, Custom) has an independent mode selector:
Off — this window has no effect on entries (default for all four)
Blackout — block all new entries while the current time is inside this window. Useful for avoiding high-volatility opens or news events
Trade Only — only allow new entries while the current time is inside this window. Useful for targeting specific sessions or news event windows such as NFP or Fed announcements
All times are entered in your local timezone selected from the My Timezone dropdown. The engine converts to UTC internally.
Logic rules:
Multiple Blackout windows use AND NOT logic — entries are blocked if the current time is inside any Blackout window
Multiple Trade Only windows use OR logic — entries are allowed when the current time is inside any one Trade Only window
If no windows are set to Trade Only, there is no time restriction on entries (same as all Off)
Blackout and Trade Only can be combined: for example, set London to Trade Only and New York to Blackout to only trade the London session while avoiding NY volatility
Trading Day and Session
Trading Days — enable or disable any individual day of the week. Disabling a day prevents new entries — open positions are still managed on disabled days.
Trade Session — set allowed hours in exchange server time (HHMM-HHMM format). Default 0000-0000 means 24 hours with no restriction. This uses exchange server time, not your local time.
Alert System — App Alert and Custom JSON
How to activate alerts:
Set the alert mode to App Alert or Custom in the settings panel
Create a PulseWire alert on the chart (right-click → Add Alert)
In the alert message box, paste exactly: {{strategy.order.alert_message}}
This placeholder delivers the correct message for each order event automatically
App Alert mode sends a pre-formatted text message for each event:
ENTRY LONG : {price}
STOP LOSS : {stop level}
TARGET PRICE : {target level}
Exit alerts include a PNL percentage. No additional setup is required.
Custom mode — JSON webhook for bot integration:
Four separate input fields accept a single-line JSON string — one per order event:
Long Entry — fires when a Long position opens
Long Exit — fires when a Long position closes (TP, SL, or trailing stop)
Short Entry — fires when a Short position opens
Short Entry — fires when a Short position opens
Short Exit — fires when a Short position closes (TP, SL, or trailing stop)
Paste your JSON as a single line into each field. PulseWire's input.string stores the content as a single line regardless of how it was formatted, making it safe for all webhook receivers.
Settings Guide — Commission, Slippage, Margin
Default values are conservative starting points. Edit the strategy() declaration at the top of the script to match your broker and market. Detailed inline comments in the script explain every parameter.
Commission defaults (0.1% per side, 2 ticks slippage):
Stocks zero-commission broker → 0.0%
Stocks SET Thailand → 0.16%
Crypto spot (Binance) → 0.1%
Crypto futures (Binance taker) → 0.04%
XAUUSD $7 per standard lot → change commission_type to strategy.commission.cash_per_contract and commission_value to 0.07 ($7 ÷ 100 oz)
Position sizing (default 2% of equity):
For lot-based markets (Forex, XAUUSD) change default_qty_type to strategy.fixed and default_qty_value to the number of units. On XAUUSD: 1 unit = 1 oz, so 0.01 lot = value of 1, 0.10 lot = value of 10, 1.00 lot = value of 100.
Margin/leverage simulation:
Both margin_long and margin_short are 0 by default (no margin simulation). Formula: margin value = 100 / leverage ratio. Example: 1:500 leverage → margin_long = 0.2. These values cannot be set from the input panel — edit them directly in the strategy() call.
Repainting Warning
Before connecting any indicator to the User Zone, verify it does not repaint. A repainting indicator places signal arrows on past bars using data from future bars that did not exist at the time — backtest results will look excellent while live trading produces nothing like it.
How to check using Bar Replay:
Open the indicator on your chart and find a signal arrow in the past
Open Bar Replay and rewind to before that signal appeared
Step forward one bar at a time using Shift + →
Do not use the Play button (Shift + ↓) — bars move too fast to catch a disappearing arrow
If the arrow appears and stays permanently → safe to use. If the arrow appears then disappears or moves as you advance → repainting confirmed, do not use in a strategy.
How to check using Alert Log:
Enable the indicator's built-in alert, wait for it to fire on a live bar, then compare the alert log entry to the signal arrow on the chart. If they do not match in timing or direction → repainting.
Disclaimer
This script is published for educational purposes only. It is a framework and template — not a complete trading system and not financial advice. Backtest results shown in Strategy Tester reflect historical data only and do not guarantee future performance. Past performance is not indicative of future results.
All trading involves significant risk of loss. Do not trade with money you cannot afford to lose. The results produced by this template depend entirely on the signal logic the user provides — the author accepts no responsibility for any trading decisions made using this script or any modifications of it.
Before using any strategy in live trading, you should fully understand how it works, verify its logic independently, and test it thoroughly on a demo account. Always consult a qualified financial advisor before making investment decisions.
The pre-built Moving Average Cross trigger and Moving Average Trend filter included in the User Zone are provided as examples only — they are not recommendations to trade any specific method. Strategy

ATR Trend Strategy with Moving Average | Fixed TP/SL version📈 ## ATR Trend Strategy with Moving Average
# Overview
This strategy combines a **Moving Average trend filter** with an **ATR-based breakout channel** to identify directional market movements. It is designed for traders who prefer **systematic trend-following strategies with clearly defined risk management**.
The script builds an adaptive channel around a selected Moving Average using **Average True Range (ATR)**. When price moves beyond the ATR band and the move is confirmed for a defined number of bars, a trend state is established. Trade entries can then occur either on the initial breakout or on a pullback to the Moving Average.
The strategy also includes **fixed percentage Take Profit and Stop Loss levels**, allowing users to evaluate performance under consistent risk parameters.
---
⚙️ # Key Features
• **Multiple Moving Average types**
Supports EMA, SMA, WMA, Hull MA, VWMA, RMA, and TEMA.
• **ATR-based dynamic channel**
Uses ATR to create adaptive upper and lower boundaries around the Moving Average.
• **Two entry methods**
Users can choose between breakout entries or Moving Average pullback entries.
• **Trend confirmation filter**
Signals are confirmed only after a configurable number of bars remain beyond the ATR boundary.
• **Built-in risk management**
Includes fixed percentage Take Profit and Stop Loss levels.
• **Trade visualization**
Displays the TP/SL zone directly on the chart for each trade.
• **Performance statistics panel**
Shows key strategy metrics such as:
* Total trades
* Win rate
* Profit factor
* Net profit
* Expectancy
* Average R
* Maximum drawdown
---
🧠 # Strategy Logic
The strategy follows a simple **trend-following structure** :
1️⃣ A Moving Average defines the market's baseline trend.
2️⃣ An ATR multiplier builds a dynamic volatility channel around the Moving Average.
3️⃣ When price breaks above or below this channel and remains there for a specified number of bars, a trend is confirmed.
4️⃣ Entries can occur via:
**Breakout Mode**
* Long when price breaks above the upper ATR band.
* Short when price breaks below the lower ATR band.
**MA Cross Mode**
* After a confirmed trend, entries occur on pullbacks that cross the Moving Average.
5️⃣ Risk is controlled using **fixed percentage Take Profit and Stop Loss levels**.
---
⚙️ # Inputs
Moving Average
* MA Type
* MA Length
* MA Source
ATR Signal
* ATR Type
* ATR Length
* ATR Multiplier
Trend Confirmation
* Number of confirmation bars
* Confirmation price source (Close or High/Low)
Entry & Risk Management
* Entry method (Breakout or MA Cross)
* Take Profit (%)
* Stop Loss (%)
---
📊 ## Usage Notes
This strategy is designed for **trend-following market conditions** and may perform best in environments with sustained directional movement.
Users are encouraged to **experiment with different Moving Average types, ATR multipliers, and confirmation settings** to adapt the strategy to different markets and timeframes.
---
⚠️ ## Disclaimer
This script is provided for **educational and research purposes only**.
Past performance does not guarantee future results.
---
Strategy

RSI Fibonacci Analysis [UAlgo]RSI Fibonacci Analysis is an oscillator based Fibonacci mapping tool that projects Fibonacci ratios directly onto RSI swings instead of price swings. The script identifies meaningful pivot highs and pivot lows on RSI, draws a Fibonacci ladder between the most recent alternating swing pair, and then enriches each level with historical retest statistics. This approach aims to answer a practical question: when RSI transitions from one swing extreme to the next, which retracement ratios tend to attract RSI retests most often.
The indicator is built for clarity and repeatability. Swing points are detected using a pivot depth setting that confirms highs and lows only after a defined number of bars, reducing noise. A minimum bar gap filter ensures that the Fibonacci anchor points are not too close together. Once a new swing is confirmed, the script draws a connector line between anchors and plots the Fibonacci levels as horizontal lines across the swing window.
The distinguishing feature is the integrated statistics engine. Over a configurable lookback of past swing sequences, the script measures how often RSI retests each Fibonacci ratio within a tolerance band. It tracks bullish and bearish swing sequences separately, then shows level strength both on chart labels and in a compact dashboard table. The result is an RSI Fibonacci tool that is not only visual but also descriptive of historical behavior.
🔹 Features
1) RSI Centered Fibonacci Projection
Instead of projecting Fibonacci levels on price, the script projects Fibonacci ratios across RSI swing ranges. This can be useful for traders who treat RSI as a structure tool, where oscillator retracements and reactions often precede or confirm price continuation.
2) Pivot Based Swing Detection with Adjustable Depth
Swing highs and swing lows are detected on RSI using pivot logic. Swing Depth controls how many bars are required to confirm a pivot. Higher depth creates fewer swings and stronger anchors. Lower depth reacts faster but may produce more frequent levels.
3) Minimum Bar Gap Filter for Cleaner Anchors
A minimum distance in bars is enforced between the swing anchors used to draw the current Fibonacci. This avoids drawing ladders on very small micro swings and keeps levels meaningful.
4) Customizable Fibonacci Level Set
The script uses a standard Fibonacci set:
0, 0.236, 0.382, 0.5, 0.618, 0.786, 1
Each level is drawn as a horizontal line between the start and end swing timestamps, with an optional thickness adjustment based on statistical strength.
5) Level Strength Statistics with Bull and Bear Separation
A built in statistics engine scans historical swing triplets to identify valid zig zag sequences and measures whether the third swing retests near a Fibonacci ratio. Hits are counted separately for bullish swing ranges and bearish swing ranges, producing direction specific behavior profiles.
If enabled, the script appends a percent value to each level label, showing how often that level was retested relative to all counted hits for that direction.
6) Strength Weighted Line Thickness
When statistics are enabled, the script increases the line width of a Fibonacci level when it represents a larger share of total hits. This provides an at a glance read of which levels historically attract more retests.
7) RSI Gradient Coloring and Context Lines
The RSI plot uses a gradient scheme:
Above 50, the gradient shifts toward green as RSI approaches higher values
Below 50, the gradient shifts toward red as RSI approaches lower values
Overbought and oversold reference lines at 70 and 30 are also plotted for context.
8) Dashboard with Directional Hit Breakdown
A table dashboard can be displayed in a selectable corner of the chart. It lists each Fibonacci level along with:
Bull hits and bull percentage
Bear hits and bear percentage
Optional row highlighting emphasizes levels that exceed a threshold share of hits on either side, making dominant ratios easier to spot.
🔹 Calculations
1) RSI Computation and Visualization
RSI is calculated on a selectable source with a selectable length:
float rsiValue = ta.rsi(rsiSource, rsiLength)
A gradient color is applied based on whether RSI is above or below 50:
color rsiGradient =
rsiValue > 50
? color.from_gradient(rsiValue, 50, 80, color.new(color.green, 50), color.green)
: color.from_gradient(rsiValue, 20, 50, color.red, color.new(color.red, 50))
plot(rsiValue, "RSI", color=rsiGradient, linewidth=2)
Context lines:
hline(70, "Overbought", color=color.new(color.gray, 50), linestyle=hline.style_dotted)
hline(30, "Oversold", color=color.new(color.gray, 50), linestyle=hline.style_dotted)
2) RSI Swing Detection Using Pivots
Swings are detected using pivot highs and pivot lows on RSI:
float ph = ta.pivothigh(rsiValue, swingDepth, swingDepth)
float pl = ta.pivotlow(rsiValue, swingDepth, swingDepth)
When a pivot is confirmed, it is stored as a Swing object with price, bar index, and direction:
if not na(ph)
allSwings.unshift(Swing.new(ph, bar_index - swingDepth, true))
if not na(pl)
allSwings.unshift(Swing.new(pl, bar_index - swingDepth, false))
The swing list is capped to prevent excessive memory growth.
3) Fibonacci Levels and Current Fib Drawing
The script draws a Fibonacci ladder between the most recent pair of alternating swings, with a minimum bar gap condition:
Swing lastSwing = allSwings.get(0)
Swing prevSwing = allSwings.get(1)
if lastSwing.isHigh != prevSwing.isHigh
if math.abs(lastSwing.barIdx - prevSwing.barIdx) >= minBarGap
Swing start = prevSwing
Swing end = lastSwing
Levels are derived from the swing range:
float diff = end.price - start.price
float levelPrice = start.price + (diff * lvl.ratio)
A connector line between anchors is also drawn for visual context.
4) Historical Retest Statistics Engine
On each new confirmed swing, the script recomputes statistics over a lookback of past swings. It iterates through swing triplets:
sStart, sEnd define the fib range
sRetest is a later swing used to test retests
A valid pattern requires alternating swing types:
bool isValidPattern =
(sStart.isHigh != sEnd.isHigh) and (sEnd.isHigh != sRetest.isHigh)
For valid triplets, it computes the fib range and tests whether the retest swing is close to any fib level. The tolerance is 5 percent of the total range:
float lvlPrice = sStart.price + (fibRange * lvl.ratio)
float dist = math.abs(sRetest.price - lvlPrice)
if dist < (math.abs(fibRange) * 0.05)
if isBullish
lvl.hitsBull += 1
else
lvl.hitsBear += 1
Interpretation:
A hit is counted when a retest swing lands within the tolerance band around a Fibonacci ratio
Hits are accumulated separately for bullish ranges and bearish ranges
5) Strength Normalization and Label Percentages
When drawing the current fib, the script computes total hits for the current direction and converts each level’s hits into a percent:
int totalHits = 0
for lvl in levels
totalHits += isBullish ? lvl.hitsBull : lvl.hitsBear
int pct = int((hits / float(totalHits)) * 100)
labelText += " (" + str.tostring(pct) + "%)"
Line width is also increased when a level’s strength exceeds thresholds:
Strength greater than 20 percent increases width
Strength greater than 30 percent increases width further
6) Dashboard Totals and Percent Columns
On the last bar, the dashboard computes totals and level percentages separately for bull and bear hits:
int totalBull = 0
int totalBear = 0
for lvl in fibLevels
totalBull += lvl.hitsBull
totalBear += lvl.hitsBear
float pctBull = totalBull > 0 ? (lvl.hitsBull / float(totalBull)) * 100 : 0
float pctBear = totalBear > 0 ? (lvl.hitsBear / float(totalBear)) * 100 : 0
These values are printed in the table. Optional highlighting can be applied when either pctBull or pctBear exceeds a threshold, helping dominant levels stand out. Indicator

SuperTrend AI Adaptive - Strategy [BTC]+2,091% returns. 1.94 profit factor. 28% max drawdown.
Buy and hold returned ~785% over the same period with 75%+ drawdowns. This strategy returned 2,091% with less than a third of the drawdown. Consistent upward equity curve through bull markets, bear markets, and sideways chop.
This is the strategy version of SuperTrend AI . Same regime-adaptive engine, same AI scoring, now with full entries, exits, and risk management built in.
◈ How It Works
The strategy detects market regime shifts (trending, volatile, ranging) and adapts the SuperTrend multiplier automatically. Every trend flip is scored 0-100 by a 5-factor AI engine. Only high-scoring flips become trade entries.
The 5 scoring factors:
Volume Surge: was there conviction behind the flip?
Displacement: how far did price break through the band?
Trend Alignment: does the EMA agree with the direction?
Regime Quality: trending regimes score highest, ranging get penalized
Band Distance: how far did price travel to reach the flip point?
Low-scoring flips are skipped entirely. This is the main edge. Standard SuperTrend enters on every flip. This strategy is selective.
◈ Regime Adaptation
TRENDING regime: multiplier stays at base. Normal conditions, normal entries.
VOLATILE regime: multiplier widens automatically. Prevents noise-driven entries. Band turns amber on chart.
RANGING regime: multiplier tightens slightly. Entries are blocked by default because SuperTrend gets chopped in ranges.
The regime filter alone eliminates most of the losing trades that kill standard SuperTrend strategies.
◈ Risk Management
Three stop loss modes:
ATR-based (default): dynamic stop that adjusts to current volatility
Percent: fixed percentage stop
SuperTrend: exit only on trend flip
Take profit modes:
Risk:Reward ratio (default 2.5:1): TP based on SL distance
Percent: fixed percentage target
None: hold until stop or flip
Optional trailing stop for locking in profits on extended trends. All parameters are adjustable.
◈ Why It Beats Buy and Hold
Buy and hold works in hindsight. In real time, you sit through 50-75% drawdowns hoping for recovery. This strategy:
Shorts during bear markets instead of bleeding. The 2022 and early 2026 bear legs were profitable, not just survivable.
Stays flat during ranging markets. No entries when conditions are bad.
Compounds gains from both directions. Longs in uptrends, shorts in downtrends.
The equity curve tells the story. Consistent staircase up with controlled pullbacks vs the rollercoaster of buy and hold.
◈ Default Settings (optimized for BTCUSDT 4H)
SuperTrend: ATR 10, Base Multiplier 3.0
Regime: Lookback 40, ADX 14, Threshold 20
AI Engine: Trend EMA 50, Volume MA 20, Min Score 65
Risk: SL Mode ATR, SL ATR Mult 6.0, TP Mode RR 2.5:1
Filters: EMA Trend Filter on, Skip Ranging on, Volume Filter on, Cooldown 5
Position: 80% of equity per trade
Commission: 0.06% (Binance futures level), 2 ticks slippage
◈ Adapting to Other Assets
These defaults are tuned for BTCUSDT 4H. For other assets, adjust:
Other crypto (ETH, SOL) 4H: Same settings, may need Min Score 60
Forex 1H to 4H: Lower position size to 20-30%, tighten SL to 2.5-3.0 ATR, trend following works less well on forex
Indices 1H: SL ATR 3.0-4.0, position size 30-50%
SuperTrend strategies work best on assets that trend. Crypto on higher timeframes trends the hardest.
◈ Backtest Notes
Period: Jan 2015 to Feb 2026 (10+ years, includes multiple bull and bear cycles)
Initial capital: $10,000 USDT
Commission: 0.06% per trade (realistic for Binance futures)
Slippage: 2 ticks
Position sizing: 80% of equity (compounding)
No pyramiding. One position at a time.
Signals are non-repainting. Entries on confirmed bar close only.
Returns are compounded. The 2,091% figure reflects reinvesting profits at 80% equity per trade. Without compounding, the raw edge is captured by the profit factor (1.94) and win rate (46% at 2.5:1 RR).
◈ Key Metrics
Total P&L: +2,091%
Profit Factor: 1.94
Win Rate: 46.10% (71 of 154 trades)
Max Drawdown: 28.16%
Average trade count: roughly 15 per year
◈ Features
✓ Regime-adaptive SuperTrend with automatic multiplier adjustment
✓ AI signal scoring filters out low-quality trend flips
✓ Three SL modes (ATR, Percent, SuperTrend flip)
✓ Three TP modes (Risk:Reward, Percent, None)
✓ Optional trailing stop
✓ EMA trend filter, regime filter, volume filter
✓ Realistic commission and slippage included
✓ Dashboard showing trend, regime, position status, and signal score
✓ Non-repainting entries on confirmed bar close
✓ 100% original code
◈ Companion Indicator
This strategy is built on the SuperTrend AI indicator. Use the indicator for live chart analysis and the strategy for backtesting and validation. Both available free on my profile.
◈ Disclaimer
Past backtest performance does not guarantee future results. All backtests have inherent limitations including look-ahead bias in parameter selection. These settings were optimized on the full sample period. Always forward-test before risking real capital. Use proper position sizing and risk management. This is not financial advice.
Happy trading. Strategy

ORB Visual Backtester [MTF]This indicator is designed to help traders visualize and backtest the Opening Range Breakout (ORB) strategy with precision and flexibility. Its primary goal is to facilitate rapid visual backtesting , allowing traders to instantly see how price action behaved around the opening range on historical dates and refine their strategies accordingly without needing complex replay modes.
A key feature of this script is its Multi-Timeframe (MTF) capability. It allows you to view the ORB levels of a higher timeframe (e.g., 60-minute or 15-minute) while trading or analyzing on a lower timeframe (e.g., 1-minute or 5-minute chart).
Key Features
Visual Backtesting Optimized: By keeping the ORB box visible for a set duration on past sessions, you can easily scroll back through history to analyze win/loss rates and price behavior at a glance.
Multi-Timeframe Support: Define the ORB candle on any timeframe (e.g., 15m) and view it seamlessly on lower timeframes.
Custom Session Duration: The ORB box does not clutter the chart indefinitely. It stays visible for a specific duration (default: 390 minutes/full session) and then stops, keeping your chart clean.
Precise Timing: Users can set the exact Start Hour and Start Minute to match any market open (e.g., NYSE, London, or crypto sessions).
Weekend Filter: The indicator automatically skips Saturdays and Sundays to prevent invalid drawings during weekend gaps.
Settings & Configuration
1. ORB Settings
ORB Timeframe: Select the resolution used to calculate the Opening Range (e.g., "15" for a 15-minute ORB).
Start Hour (0-23) & Minute (0-59): The exact time the market session begins (e.g., 09:30).
Box Duration (Minutes): How long the box should extend to the right. The default is 390 minutes (6.5 hours), covering a standard trading session.
2. Visual Settings
Box Background Color: Sets the fill color and transparency of the ORB zone.
Border Color / Width: Customizes the outline of the box.
Show Price Labels: Toggles the visibility of price labels extending from the High and Low of the range.
How to Use for Strategy Building
Set the ORB Timeframe (e.g., 15 min).
Scroll back to previous days on your chart.
Observe whether the price respected the range, faked out, or broke out cleanly.
Use this visual data to determine the most profitable breakout rules for your specific asset.
Note: This Pine Script code and the description text above were generated with the assistance of Artificial Intelligence. Indicator

Axis-Pro System | Trend Structure + Fibonacci Pullbacks Axis-Pro System is a comprehensive Trend Following strategy designed to trade high-probability pullbacks. Unlike indicators that merely chase price, this system patiently waits for market structure alignment before seeking an entry.
The system is built on the premise of "Quality over Quantity", utilizing volatility and structure filters to avoid choppy markets (ranges) and false breakouts.
🧠 Strategy Logic
The system makes decisions based on a strict 4-step hierarchy:
Higher Timeframe (HTF) Bias:
Analyzes the trend on a higher timeframe to ensure we are trading in the direction of the dominant flow.
Structure & BOS (Break of Structure):
Identifies clear impulses that break previous highs or lows. Once a BOS is confirmed, the system "arms" the trade and waits.
Fibonacci Zone Pullback:
It does not chase the breakout. Instead, it waits for a pullback into the "Discount Zone" (Golden Zone, configurable between 0.382 and 0.618) to improve the Risk/Reward ratio.
Validation & Trigger:
Uses an ATR expansion check to filter out low-volatility periods.
Requires candle confirmation and alignment with fast EMAs before pulling the trigger.
🛡️ Risk Management
The system incorporates advanced position management using a split execution model (50/50):
Dynamic Stop Loss: Automatically calculated using an ATR multiplier or the recent Swing High/Low (whichever offers better protection).
TP1 (Take Profit 1): Closes 50% of the position at a fixed R-multiple (e.g., 1.5R) to lock in profit and moves the Stop Loss to Break-Even.
TP2 (Runner): The remaining 50% is left to run for higher targets (e.g., 3.0R) or until the trend bends, maximizing gains during strong moves.
Trailing Stop: Optional feature to trail price with a fast EMA once the first target is hit.
⚙️ Settings & Features
The script is highly customizable for different assets (Crypto, Forex, Indices):
Date Range Filter: Includes a date selector to perform precise Backtesting on specific periods (e.g., testing specifically during a Bear Market vs. Bull Market).
Auto Trendlines: Automatically draws relevant trendlines for visual support.
Quality Filters: Options to toggle the EMA 200 filter and breakout buffers.
⚠️ Disclaimer
This strategy is a tool for analysis and backtesting purposes. Past performance does not guarantee future results. It is highly recommended to test the strategy on a Demo account first and adjust parameters according to the volatility of the specific asset being traded. Always use responsible risk management. Strategy

Golden BOS Strategy - ChecklistA clean, mechanical on-chart checklist designed for multi-timeframe traders using the Golden BOS / Institutional Retracement Framework.
This tool helps you stay disciplined by tracking each requirement of the strategy in real time:
Included Criteria
4H Bias: Bullish or bearish macro structure
1H Structure: Push/pull phase + golden zone retracement
5M Entry Model:
Break of Structure (BOS)
5M golden zone retracement
POI validation (OB/FVG/Breaker)
Final micro BOS or rejection confirmation
Risk Filters:
Session validity (London / NY)
Red news avoidance
Stop-loss placement check
Liquidity-based target confirmation
Purpose
This overlay ensures every trade meets strict criteria before execution, removing emotion and improvisation. Ideal for backtesting, forward testing, and staying consistent during live market conditions.
Golden BOS Strategy — Description
The Golden BOS Strategy is a structured, multi-timeframe trading system designed to capture high-probability continuation moves during London and New York sessions. The strategy combines institutional concepts with Fibonacci-based retracements to identify discounted entry zones aligned with higher-timeframe direction.
Using the 4H timeframe, traders establish the daily macro bias and identify the dominant trend. The 1H chart is then used to confirm the current phase of market structure, distinguishing between impulsive “push” moves and corrective “pullback” phases. A Fibonacci retracement is applied to the most recent 1H impulse leg to define a high-value discount or premium zone where entries become valid.
Execution takes place on the 5-minute chart. Once price reaches the 1H golden zone (61.8–78.6%), a Break of Structure (BOS) is required to confirm a shift in short-term momentum. A second Fibonacci retracement is then drawn on the 5M impulse leg that caused the BOS, and price must retrace back into the 5M golden zone. Traders refine their entry using a confluence point of interest (POI) such as a Fair Value Gap (FVG), Order Block, Breaker Block, or Inverse FVG, ideally accompanied by a final micro BOS or rejection candle.
Risk management is strict and rule-driven. Stop loss is placed beyond the extreme wick of the POI, while take-profit targets are set at logical liquidity pools in the direction of the higher-timeframe trend. The strategy avoids red-folder news and only allows trades during active sessions to ensure optimal volatility and reliability.
The Golden BOS Strategy is designed to impose discipline, reduce discretionary errors, and give traders a repeatable, mechanical framework for navigating trending markets with precision. Indicator

Adaptive Trend SelectorThe Adaptive Trend Selector is a comprehensive trend-following tool designed to automatically identify the optimal moving average crossover strategy. It features adjustable parameters and an integrated backtester that delivers institutional-grade insights into the recommended strategy. The model continuously adapts to new data in real time by evaluating multiple moving average combinations, determining the best performing lengths, and presenting the backtest results in a clear, color-coded table that benchmarks performance against the buy-and-hold strategy.
At its core, the model systematically backtests a wide range of moving average combinations to identify the configuration that maximizes the selected optimization metric. Users can choose to optimize for absolute returns or risk-adjusted returns using the Sharpe, Sortino, or Calmar ratios. Alternatively, users can enable manual optimization to test custom fast and slow moving average lengths and view the corresponding backtest results. The label displays the Compounded Annual Growth Rate (CAGR) of the strategy, with the buy-and-hold CAGR in parentheses for comparison. The table presents the backtest results based on the fast and slow lengths displayed at the top:
Sharpe = CAGR per unit of standard deviation.
Sortino = CAGR per unit of downside deviation.
Calmar = CAGR relative to maximum drawdown.
Max DD = Largest peak-to-trough decline in value.
Beta (β) = Return sensitivity relative to buy-and-hold.
Alpha (α) = Excess annualized risk-adjusted returns.
Win Rate = Ratio of profitable trades to total trades.
Profit Factor = Total gross profit per unit of losses.
Expectancy = Average expected return per trade.
Trades/Year = Average number of trades per year.
This indicator is designed with flexibility in mind, enabling users to specify the start date of the backtesting period and the preferred moving average strategy. Supported strategies include the Exponential Moving Average (EMA), Simple Moving Average (SMA), Wilder’s Moving Average (RMA), Weighted Moving Average (WMA), and Volume-Weighted Moving Average (VWMA). To minimize overfitting, users can define constraints such as a minimum and maximum number of trades per year, as well as an optional optimization margin that prioritizes longer, more robust combinations by requiring shorter-length strategies to exceed this threshold. The table follows an intuitive color logic that enables quick performance comparison against buy-and-hold (B&H):
Sharpe = Green indicates better than B&H, while red indicates worse.
Sortino = Green indicates better than B&H, while red indicates worse.
Calmar = Green indicates better than B&H, while red indicates worse.
Max DD = Green indicates better than B&H, while red indicates worse.
Beta (β) = Green indicates better than B&H, while red indicates worse.
Alpha (α) = Green indicates above 0%, while red indicates below 0%.
Win Rate = Green indicates above 50%, while red indicates below 50%.
Profit Factor = Green indicates above 2, while red indicates below 1.
Expectancy = Green indicates above 0%, while red indicates below 0%.
In summary, the Adaptive Trend Selector is a powerful tool designed to help investors make data-driven decisions when selecting moving average crossover strategies. By optimizing for risk-adjusted returns, investors can confidently identify the best lengths using institutional-grade metrics. While results are based on the selected historical period, users should be mindful of potential overfitting, as past results may not persist under future market conditions. Since the model recalibrates to incorporate new data, the recommended lengths may evolve over time. Indicator

Portfolio Strategy TesterThe Portfolio Strategy Tester is an institutional-grade backtesting framework that evaluates the performance of trend-following strategies on multi-asset portfolios. It enables users to construct custom portfolios of up to 30 assets and apply moving average crossover strategies across individual holdings. The model features a clear, color-coded table that provides a side-by-side comparison between the buy-and-hold portfolio and the portfolio using the risk management strategy, offering a comprehensive assessment of both approaches relative to the benchmark.
Portfolios are constructed by entering each ticker symbol in the menu, assigning its respective weight, and reviewing the total sum of individual weights displayed at the top left of the table. For strategy selection, users can choose between Exponential Moving Average (EMA), Simple Moving Average (SMA), Wilder’s Moving Average (RMA), Weighted Moving Average (WMA), Moving Average Convergence Divergence (MACD), and Volume-Weighted Moving Average (VWMA). Moving average lengths are defined in the menu and apply only to strategy-enabled assets.
To accurately replicate real-world portfolio conditions, users can choose between daily, weekly, monthly, or quarterly rebalancing frequencies and decide whether cash is held or redistributed. Daily rebalancing maintains constant portfolio weights, while longer intervals allow natural drift. When cash positions are not allowed, capital from bearish assets is automatically redistributed proportionally among bullish assets, ensuring the portfolio remains fully invested at all times. The table displays a comprehensive set of widely used institutional-grade performance metrics:
CAGR = Compounded annual growth rate of returns.
Volatility = Annualized standard deviation of returns.
Sharpe = CAGR per unit of annualized standard deviation.
Sortino = CAGR per unit of annualized downside deviation.
Calmar = CAGR relative to maximum drawdown.
Max DD = Largest peak-to-trough decline in value.
Beta (β) = Sensitivity of returns relative to benchmark returns.
Alpha (α) = Excess annualized risk-adjusted returns relative to benchmark.
Upside = Ratio of average return to benchmark return on up days.
Downside = Ratio of average return to benchmark return on down days.
Tracking = Annualized standard deviation of returns versus benchmark.
Turnover = Average sum of absolute changes in weights per year.
Cumulative returns are displayed on each label as the total percentage gain from the selected start date, with green indicating positive returns and red indicating negative returns. In the table, baseline metrics serve as the benchmark reference and are always gray. For portfolio metrics, green indicates outperformance relative to the baseline, while red indicates underperformance relative to the baseline. For strategy metrics, green indicates outperformance relative to both the baseline and the portfolio, red indicates underperformance relative to both, and gray indicates underperformance relative to either the baseline or portfolio. Metrics such as Volatility, Tracking Error, and Turnover ratio are always displayed in gray as they serve as descriptive measures.
In summary, the Portfolio Strategy Tester is a comprehensive backtesting tool designed to help investors evaluate different trend-following strategies on custom portfolios. It enables real-world simulation of both active and passive investment approaches and provides a full set of standard institutional-grade performance metrics to support data-driven comparisons. While results are based on historical performance, the model serves as a powerful portfolio management and research framework for developing, validating, and refining systematic investment strategies. Indicator
