Backtest and Beyond? CT CPCV Research Lab v1.2 [Pine v6]CT CPCV Research Lab v1.2
One profitable backtest does not prove you've found a profitable trading strategy.
It proves only one thing: Your strategy worked once...on one version of history.
The real question is: Would it still work if history had unfolded differently?
Professional quantitative researchers have been asking that question for decades.
This framework brings that same question—and one possible way of answering it—to individual traders.
What this description covers
By the time you finish reading this description, you'll understand:
• Why a profitable backtest can be dangerously misleading
• Why professional quantitative researchers demand stronger evidence before trusting a strategy.
• Why Combinatorial Purged Cross-Validation (CPCV) has become one of the most respected validation techniques in quantitative finance.
• What this framework does.
• What it doesn't do.
• Why those differences matter.
So, if that sounds interesting...keep reading.
******
What Is CT CPCV Research Lab?
CT CPCV Research Lab is an open-source quantitative research framework built for PulseWire.
It allows complete trading strategies, not just individual indicators, to be evaluated using Combinatorial Purged Cross-Validation (CPCV) under consistent research conditions.
Rather than asking: "Which strategy produced the highest historical return?"
it asks: "Which strategy demonstrated the greatest robustness across many independent historical tests?"
The goal isn't to predict the future. The goal is to help you place more appropriate confidence in what the past may, or may not, be telling you.
If you've ever developed a trading strategy, you've probably followed a familiar process.
• Build some trading rules.
• Run a historical backtest.
• See a profitable equity curve.
• Assume you've found a trading edge.
Unfortunately, that's exactly how thousands of strategies fool their creators every day.
A traditional backtest answers only one question: "What would have happened if I had traded this one sequence of historical events?"
That's a useful question. It just isn't the only question that matters. The uncomfortable truth is that one backtest proves far less than most traders believe.
Built to Teach, Not Just Calculate
Most PulseWire scripts give you signals. Some give you statistics. Very few explain why those signals or statistics matter.
CT CPCV Research Lab was designed differently.
Throughout the framework you'll find:
• Plain-English explanations of the underlying research methodology.
• Educational comments describing the purpose of each major section.
• Input tooltips explaining not only what each setting does, but why you might want to change it.
• Built-in guidance that helps interpret CPCV results instead of simply displaying numbers.
Whether you're completely new to quantitative research or already familiar with CPCV, the goal is the same:
Every major part of this framework should either perform the research...or teach the research.
If understanding the research process is just as important to you as obtaining the results, this framework was built with that philosophy in mind.
Why great backtests often fail
Markets only give us one history. One sequence of bull markets, one sequence of bear markets, one sequence of crashes, recoveries, trends and sideways markets. When a strategy performs well on that single history, we don't automatically know why.
Did it discover a genuine market behaviour?
Or...
Did it simply get lucky?
Was it accidentally tailored to one particular period of history?
This is one of the biggest problems in quantitative finance. It is known as overfitting, and it is one of the main reasons strategies that look exceptional in historical testing often disappoint in live trading. The better a strategy becomes at explaining the past, the greater the risk that it has simply memorized the past rather than discovered something that persists into the future.
"I'll just use Out-of-Sample testing."
Good. That's already a major improvement. Out-of-Sample (OOS) testing separates historical data into two sections. One section is used to develop the strategy and the other section is hidden until the strategy is complete. Only then is the strategy evaluated on data it has never seen before.
This helps answer an important question: "Does my strategy still work on genuinely unseen data?"
That's far more honest than testing on everything, but it still has one important weakness.
You only get one Out-of-Sample test, one unseen historical period...and one result.
"I'll use Walk-Forward Analysis."
Even better. Walk-Forward Analysis repeats the process. The strategy is trained on earlier data, tested on the next unseen period, then the window moves forward and the process repeats.
Professional quantitative researchers have used Walk-Forward Analysis for many years because it is a significant improvement over a single backtest. But even Walk-Forward follows one continuous timeline.
History always unfolds in the same order, “Beginning...Middle...End.”
It creates many tests…but they're all built from the same historical journey. Walk-Forward Analysis remains one of the most respected validation techniques used by professional researchers today. CPCV should not be viewed as replacing Walk-Forward, but as answering a different and often more demanding research question.
Enter Combinatorial Purged Cross-Validation (CPCV)
Professional quantitative researchers wanted something even more demanding. Instead of relying on one backtest...or one Out-of-Sample period...or one Walk-Forward schedule...,they wanted to repeatedly evaluate a strategy across many different combinations of historical data. One of the best-known methods for doing this is called:
Combinatorial Purged Cross-Validation (CPCV)
Combinatorial Purged Cross-Validation was introduced by Marcos López de Prado in Advances in Financial Machine Learning (2018), where it was developed for validating machine-learning models in finance. This framework adapts its core principles, combinatorial train/test splits, purging, embargoing, and reconstructed out-of-sample paths, to the practical constraints of Pine Script.
Although the name sounds intimidating, the idea is surprisingly simple. Imagine interviewing someone for an important job. Would you hire them because they answered one interview question correctly?
Of course not. You'd ask many questions, test different skills, look for consistency.
Trading strategies deserve exactly the same treatment. A traditional backtest gives a strategy one interview. CPCV gives it dozens of different interviews.
If the strategy performs consistently across many independent historical tests instead of one lucky backtest, it earns greater confidence. Not certainty. Nothing in financial markets offers certainty.
Just stronger evidence.
What does "Combinatorial Purged Cross-Validation" actually mean?
The name sounds complicated, but each word simply describes part of the process.
Combinatorial: Instead of creating one train/test split, CPCV creates many different combinations of training and testing periods. This allows the strategy to be evaluated across many historical scenarios rather than relying on one convenient sequence.
Purged: Financial observations that occur close together often contain overlapping information.
Imagine two students sitting the same exam. If one student quietly glances at the other's answers before writing their own, the exam is no longer fair.
Purging removes nearby training observations that could accidentally leak information into the test period.
Cross-Validation: Rather than asking "Did this strategy work once?", Cross-Validation repeatedly asks
"Does this strategy continue working when tested on different unseen historical data?"
The goal isn't to find one impressive result. The goal is to see whether good performance remains consistent.
Why this framework exists
For many years, advanced quantitative validation techniques were used primarily by institutional researchers, hedge funds and quantitative investment firms. Retail traders rarely had access to these ideas, not because they were secret, but because they were often buried in academic research or implemented in specialist software.
This framework was built to present those same research principles in plain English so individual traders can understand them, question them, and apply them for themselves. Good research shouldn't depend on where you work. It should depend on how carefully you test your ideas.
A note about the Pine implementation
This implementation is designed to bring the core principles of institutional Combinatorial Purged Cross-Validation (CPCV) research into Pine Script while respecting the practical execution limits of the PulseWire environment.
Professional quantitative research platforms often have access to dedicated computing resources with relatively few practical limits on memory, processing time, data sources or dataset size.
PulseWire's Pine Script is designed for interactive chart analysis and therefore operates within execution-time, memory and resource limits so scripts remain responsive for all users. To make CPCV practical within those limits, this implementation makes several engineering choices, including limiting the number of chronological groups, reference strategies and stored observations. These are implementation constraints, not changes to the underlying CPCV methodology.
A note on purging and embargo in this implementation. These techniques exist to prevent information from a training observation's forward-looking label leaking into a nearby test period. The built-in candidate strategies use one-bar returns, so their natural leakage window is very short and the purge/embargo settings have limited effect on them. Their value grows substantially if you replace a candidate with a strategy that uses multi-bar holding periods or forward-horizon labels, where boundary leakage is a real risk. They are included so the framework remains methodologically complete and correct for the strategies you may add, not only the ones shipped by default.
The objective has always been to preserve the essential research principles of CPCV while delivering an educational framework that runs efficiently inside PulseWire. If you're learning quantitative strategy validation, understanding why CPCV works is far more valuable than simply increasing the number of groups from 8 to 20. Sound methodology will improve your research far more than simply making the computation larger.
How to Read the Tables
This framework displays its results in four tables rather than on the price chart, because CPCV evaluates research quality, not price action. Here's what each table shows and how to act on it.
Split Diagnostics
Each row is one training/test experiment. The engine holds out two chronological groups as unseen test data, selects the best candidate using the training data only, then measures how that choice performed on the held-out test data.
Read the columns left to right: which groups were held out, which candidate was selected, its score on training data, its score on test data, its test return, and its worst drawdown during the test period.
The single most important thing to look for is a candidate that scored well in training but poorly in testing. That gap is the fingerprint of overfitting. A strategy that looks brilliant in training and then collapses out-of-sample has told you something valuable, it just wasn't what you were hoping to hear.
Do not judge the framework by the best split. One good row is not evidence. Consistency across many rows is.
Path Diagnostics
Each row is one fully reconstructed out-of-sample history, assembled from test segments that the strategy never trained on. Instead of one backtest, you are looking at several independent reconstructions of history.
Four things deserve your attention, and the Results Guide lists them in order:
The median path tells you the typical outcome, not the luckiest one. The worst path tells you how bad an unlucky reconstruction looked, this is your pessimistic case, and a strategy that stays tolerable even here is showing real resilience. The positive-path rate tells you how many reconstructions finished profitable; a strategy profitable on one path and negative on the rest has not earned confidence. And return versus drawdown reminds you that a good return purchased with a brutal drawdown is not the same as a good return earned smoothly.
If the paths all look nearly identical, that usually means one candidate dominated selection across every split. That is normal and informative, it simply means CPCV is validating that one strategy.
Research Integrity
This panel does not measure whether your strategy is profitable. It measures how much confidence you should place in the research configuration itself, whether the sample was large enough, the coverage valid, the paths consistent, the worst case survivable, and the typical drawdown manageable.
Treat it as a credibility check on the test, not a prediction of the result. A high score means the validation has few obvious weaknesses. A low score means any attractive-looking performance should be treated with extra caution, because the setup itself may not support strong conclusions. The panel's own final row says it plainly: research confidence, not expected profit.
Results Guide
A permanent on-chart cheat sheet summarizing the reading order above and explaining the color coding, green when the median and worst case are both positive, yellow when the median holds up but the worst case is fragile, red when the median or most paths failed. If you remember nothing else, the guide is there to remind you: focus on the median and the worst case, not the single best split.
Configuring the Candidates
The most common first experience with this framework is to enable all ten candidates, run it on a favorite chart, and find every split selecting the same strategy and every path failing. That is not a malfunction and understanding why explains how to configure the framework properly.
CPCV can only reveal something interesting when the selection is contested, i.e., when different candidates genuinely compete to be chosen, and different ones win in different periods. If every candidate you enable behaves the same way, the framework isn't choosing between ideas. It's choosing the least-bad member of one idea.
Diversify the families, not just the parameters
Five EMA crossovers at different lengths are not five different strategies. They are one strategy at five speeds, and they are highly correlated…they mostly agree, so selection barely changes and the reconstructed paths become near-identical copies.
The candidates ship in two behavioral families:
Trend-following (the EMA crossovers, MACD, Donchian, Supertrend) profits when moves persist. Mean-reversion (RSI, Bollinger) profits when price snaps back toward an average.
These families tend to be opposites: when one struggles, the other often works, because trending and ranging are opposite market conditions. A balanced set, a few trend models alongside both reversion models, lets different candidates win in different periods, which is exactly what makes the paths diverge.
Test where regimes actually change
The framework can only display path dispersion if the data contains different conditions for different candidates to win in. A market in one long, clean trend will let a single slow trend-follower dominate every split, producing results that are consistent but undifferentiated. A market stuck in pure chop will punish every trend model at once, which is how an all-red board appears. The most revealing samples contain both trending and ranging periods, so widen the date range until it spans at least one full cycle of each, and consider instruments that move through both rather than sitting in a single prolonged trend.
Change the metric to change the winner
The selector ranks candidates using one training metric, and different metrics crown different winners. Sharpe rewards smoothness, Calmar rewards drawdown avoidance, Sortino favors directional trend-following, Omega favors skewed reversion payoffs. Running the same enabled set under different Optimization Metrics is a fast way to see selection shift, and watching which candidate wins under which metric is itself a lesson in how sensitive strategy selection really is.
What a good configuration looks like
Success here is not a green board. It is a contested one. In Split Diagnostics you want the MODEL column to show several different names rather than one name repeated down every row. In Path Diagnostics you want P1, P2, P3 and the rest to be visibly different numbers rather than clones, a genuine median sitting between a positive best case and a negative worst case. That spread is the CPCV signal. A board where one model wins everything is almost as uninformative as one where everything fails; both mean the selection was never truly contested.
One honest warning. Do not hunt through instruments and metrics until you find a green result and then treat that as proof. That is simply overfitting one level higher, cherry-picking the demonstration instead of the strategy. The purpose of a contested run is to watch the method work, red parts included. A result that mixes success and failure across its paths is not a disappointing outcome. It is the framework telling the truth.
Using Your Own Strategies
The ten built-in candidates are examples, not the point. The framework is designed so you can delete any of them and drop in your own logic, that is its intended use, not a hack.
To replace a candidate, keep to three rules:
First, produce a persistent desired-position series with exactly three possible values: +1 for long, 0 for flat, −1 for short. The framework evaluates this series, not your entry/exit orders, so your logic must hold a position until it decides to change it, rather than firing a one-bar signal.
Second, stay causal. Use only information available up to the current bar. Do not use future data, negative historical offsets, or lookahead on. The framework already lags exposure by one bar when simulating returns, so your job is simply to avoid look-ahead in the signal itself.
Third, wrap your output through the direction filter (f_direction) exactly as the existing candidates do, so the Long Only / Short Only / Long & Short control keeps working.
That's it. Anything that respects it, a moving-average system, an oscillator, a breakout rule, or something entirely your own, will be validated under the same CPCV conditions as the built-in examples. If your strategy uses multi-bar holding periods or forward-looking labels, this is also where purging and embargo begin to do real work, so set those values to match your strategy's actual horizon.
An important limitation
If you've read this far and concluded that CPCV is the ultimate solution... then this description has failed.
CPCV is one of the most rigorous historical validation techniques available, but it is not a crystal ball.
No historical validation method can predict the future.
Markets evolve
One of the biggest misconceptions in technical analysis is that indicators suddenly "stop working."
Most of the time, they don't. The mathematics haven't changed. A 50/200 EMA crossover calculates exactly the same way today as it did ten years ago.
RSI hasn't changed.
MACD hasn't changed.
Bollinger Bands haven't changed.
…the market changed.
Financial markets constantly move through different environments. Sometimes they trend strongly.
sometimes they move sideways for months, other times volatility explodes…and then it disappears. Periodically, liquidity is abundant…and inexplicably, it evaporates.
These and other changing environments are commonly called market regimes. Within every regime there are often shorter-lived shifts or states in market behavior that further influence strategy performance. The same trading strategy can perform exceptionally well in one regime and struggle in another, even if the strategy itself never changes. That's one of the most important lessons in quantitative research.
No technical indicator can know which market regime it is operating within. It simply continues performing the same calculation while the market itself changes around it.
What this framework can, and cannot, tell you
This framework is designed to answer one question: "How robust did this strategy appear across many independent historical tests?"
It is not designed to answer another: "Will this strategy continue working as markets evolve?" That requires continued observation, adaptation and research.
Do not be surprised if the same candidate is selected on every split. When one strategy scores highest across all training folds, CPCV effectively becomes a validation of that single strategy, and if it then fails out-of-sample on every path, that is not a malfunction. It is the framework doing its job: telling you the best-looking in-sample choice did not survive honest testing.
Good quantitative research is not about finding certainty. It is about reducing the chances that we fool ourselves before risking real capital.
One important clarification about what is being validated. This framework does not cross-validate each candidate strategy in isolation. It cross-validates a selection procedure: on every training split it picks the best-scoring candidate, then judges that choice on unseen test data. This matters because strategy selection is one of the most common places overfitting hides. A candidate that consistently looks best in training but fails in testing is exactly what CPCV is designed to expose.
The philosophy behind this project
Good quantitative research doesn't ask: "How can I prove this strategy works?"
It asks: "How hard can I try to prove that it doesn't?"
Every independent test that a strategy survives earns it a little more credibility. Not because it made more money, but because it had more opportunities to fail, and didn't.
That's the philosophy behind CT CPCV Research Lab.
A personal perspective
In my experience, market structure, liquidity, positioning, capital flows, and changing market regimes often explain market behavior more consistently than any individual technical indicator alone. This is where my own work has focused for many years — and, increasingly, on the fragility that builds inside a market before it shows up in price.
That does not mean technical analysis has no value. Millions of traders around the world continue to make decisions using technical analysis every day. Whether those decisions rest on enduring market truths or widely shared behavioral patterns is a separate question. Either way, when millions of participants respond to similar signals, those behaviors become part of the market itself.
For that reason alone, understanding how technical strategies behave — and how rigorously they should be tested — remains a worthwhile pursuit. If you're one of those traders, my hope is that this framework helps you evaluate technical strategies more honestly than a single backtest ever could.
Whether your strategy uses moving averages, RSI, MACD, Bollinger Bands, Donchian channels, or something entirely your own, it deserves to be tested honestly. And if this framework leaves you curious about why the same strategy thrives in one regime and dies in another — about the structural conditions that shift beneath price before price ever moves — then it has done something a backtest never could. That question is where my own work goes next.
If this project encourages even a few traders to question impressive-looking backtests, demand stronger evidence, and approach strategy development with greater intellectual honesty, then it has achieved exactly what it was created to do.
Good research doesn't eliminate uncertainty. It simply reduces the chances that we mistake luck for skill. If this framework helps even a handful of traders make that distinction, then it has served its purpose.
Disclaimer
CT CPCV Research Lab is provided for educational, informational, and analytical purposes only.
Nothing within this script, its outputs, tables, scores, grades, metrics, documentation, or associated materials constitutes financial advice, investment advice, trading advice, legal advice, or a recommendation to buy, sell, hold, or otherwise transact in any financial instrument.
Trading and investing involve substantial risk. Past performance is not indicative of future results, and no historical validation method, including Combinatorial Purged Cross-Validation, can predict future performance. Markets are inherently uncertain, and losses may occur.
Users are solely responsible for all trading and investment decisions made using information derived from this script. The developer makes no representations or warranties regarding accuracy, completeness, profitability, suitability, reliability, or fitness for any particular purpose.
CT CPCV Research Lab is a research and validation tool. It does not generate trade signals, is not an automated trading system, and must not be relied upon as the sole basis for any trading or investment decision. A high Research Integrity score reflects the credibility of a research configuration, not the likelihood of future profit.
By accessing or using this script, the user acknowledges and accepts all risks associated with its use and agrees that the developer shall not be liable for any direct, indirect, incidental, consequential, or special losses or damages arising from the use of the script or any information it provides.
Indicator

IQ Trend Beams [TradingIQ]🔹 OVERVIEW
IQ Trend Beams is a trend assistant that draws your trendlines the way a disciplined chartist would - and then holds them accountable. It maintains two channels, support and resistance , each always showing one working line. A line is born forming : it moves and re-shapes freely, polished every bar by a perceptual score toward the line a skilled trader would actually draw. When its geometry settles and it has earned enough tangency credit, it locks - and from that moment the ink is frozen forever; it never moves again. Locked ink extends until break evidence fires, then it is broken : restyled but never relocated, holding the screen as history until its successor locks.
Riding each live beam is its own forecast ; a calibration band, a reach profile, and ghost levels, all built from the volume that has actually traded around that line.
This is an honest visualization and modeling tool , not a signal service. It draws structure clearly and states its own confidence out loud; it is not a validated edge or a promise of profit. Read the limitations section - it is not window dressing.
🔹 THE TWO CHANNELS - AN AUDITED PROMISE
Most trendline tools quietly redraw the past so the line always looks right in hindsight. Trend Beams refuses to. A line lives through three visible states:
• Forming (dotted) - the assistant sketching. It is free to move and re-fit while it hunts for the right geometry. This is the only state in which a support/resistance line moves, and it is dotted precisely so you can tell a guess from a commitment.
• Locked (solid) - the geometry has stilled and earned its tangency credit, so the line is frozen . It will never move again. A locked beam is a promise the tool has to keep in public.
• Broken (restyled) - break evidence fired. The ink is re-styled to show it failed, but it is never relocated ; it holds its original slope as an honest record and, if you keep history on, dims into the background once its successor locks.
Because a locked line cannot move, what you saw at lock time is what you keep. This is the core design commitment of the tool.
Two rails, either direction by design. Support is the lower rail, fit to the swing lows on the underside of price; resistance is the upper rail, fit to the swing highs above it. Neither is locked to a single slope: in a falling market the support rail angles down with the lows (the floor of the down-channel), and in a rally the resistance rail angles up with the highs (the ceiling of the up-channel). That is deliberate. A tool that forces support to only ever point up would go blind to the lower boundary of a downtrend - and miss exactly the moves that matter. Trend Beams instead always draws both boundaries of the channel price is actually in , so a strong move is framed on both sides rather than half-missed. If you prefer to read it the classical way, follow the rail that agrees with the trend and treat the other as the opposite wall of the same channel.
🔸 HOW A LINE EARNS ITS LOCK
While forming, each line is scored every bar by a perceptual fit , a running measure of how well its geometry matches what a careful trader would draw against the recent swing structure, blended with a one-pole toward its fitted slope so it settles rather than twitches. A lock is granted only when the geometry has gone still for long enough, the line has accumulated real tangency credit (genuine touches, not a single graze), and it spans a minimum bar count - and it is refused outright if it would invert the channel. The Mode dial sets how much evidence this takes.
🔹 THE AUDIT BADGE
Locked ink can carry a small measurement badge that reports, in plain terms, how the line is actually holding up:
• Wick-through - recent piercing of the line, exponentially weighted, measured against the tool's 10% design target . A well-behaved line lets price kiss it, not knife through it.
• Survival probability - the current modeled odds that the line is still valid.
• Maturity - how far through its estimated total run the move is, so a young trend reads differently from an exhausted one.
The badge is the tool grading its own work on the chart, not a trade instruction.
🔸 THE FORECAST - EACH BEAM READS ITS OWN VOLUME
Every live beam carries its own forecast, built entirely from the volume that has traded around that line. Trend Beams bins the intrabar volume by its distance from the beam, smooths it into a continuous density (a kernel-density estimate), and renders three things that ride the line:
• Calibration band - translucent ribbons hugging the beam, one per density bin, showing where the trend has held its volume. Strength is encoded as colour vibrancy at a constant perceptual lightness (the Oklab principle - a dense core reads vivid, the thin tails fade), so nothing is made brighter or darker than its weight warrants.
• Reach profile - a smooth filled contour fanning into the future margin, where each level's forward extent is its density times the trend's estimated remaining length . It answers, at a glance: if this trend keeps going, how far - and around which prices - does its own volume say it reaches?
• Ghost levels - dashed lines at the distribution's densest peaks, riding parallel to the beam, marking the prices this trend keeps returning to.
The forecast attaches only to a beam's currently-visible live element - its forming sketch, or its locked ink - and keeps no history . It is a read of the present trend, refreshed at the live edge, not a replay of the past.
🔸 THE ENGINE DIALS
• Mode - the tempo. Fast locks, breaks and re-forms sooner (short swings); Slow demands more evidence and holds through more noise (long moves); Medium is the balanced reference.
• Precision - how much data the engine reads: the perceptual fit window and the intrabar sample rate. Higher tiers resolve finer structure at more load. Sampling is timeframe-aware and never drops below one minute.
🔹 LAYERS, COLOUR & LEGIBILITY
Every layer is a toggle - forming lines, broken history, audit badges, and the forecast - so you can run it as a bare two-line channel or a fully dressed read. Colours come from three clean anchors: Support , Resistance , and Chrome (badges and neutral furniture). The whole translucent forecast - band, profile, and ghost levels - is coloured in the Oklab perceptual space, so strength shows up as vibrancy at a constant lightness rather than as glare, and a single Contrast dial scales the entire forecast from a whisper to bold.
🔸 HOW TO READ IT
• Treat a forming (dotted) line as a hypothesis and a locked (solid) line as a committed level - the tool is telling you which is which on purpose.
• Watch the audit badge : rising wick-through and falling survival probability say a locked line is wearing out.
• Read a broken line as a failed level that still marks where the structure gave way.
• Use each beam's band to see where its trend has held its volume, its reach profile for how far the trend's own volume says it can run, and its ghost levels for the prices it keeps returning to.
🔹 INPUTS
• Trend Engine - Mode (tempo) and Precision (data depth).
• Layers - show forming lines, broken history, audit badges, and the forecast.
• Colors - Support, Resistance, and Chrome anchors, plus a Contrast control for the translucent forecast.
• Channels - enable the support and/or resistance side independently.
🔸 LIMITATIONS AND HONEST NOTES
• This is a drawing and modeling assistant , not a validated strategy. It makes no performance claim and no edge claim . Nothing here is financial, investment or trading advice.
• Locked and broken lines do not repaint - once a line locks, its geometry is frozen. Forming lines move by design (they are the live sketch, and are dotted to say so), and each beam's forecast (band, profile, ghost levels) refreshes at the live edge as new volume arrives and attaches only to the current live element. These are live reads, on purpose; none of them rewrites confirmed history.
• Survival probability, maturity, remaining length and the reach profile are model estimates from the trend's own statistics - projections, not guarantees, and not forecasts of price.
• Intrabar sampling is subject to your plan's intrabar data limits ; higher Precision tiers read more intrabar data.
• Drawing budgets are finite. The tool caps its lines, labels and polylines internally, but very long histories with everything enabled push against PulseWire's per-script drawing limits - trim the layers you don't need.
Indicator

Indicator

TargetExcursionLibLibrary "TargetExcursionLib"
Parent supplies origin price/scale, direction, and path high/low/close series.
Library derives no hidden source data.
Returns bands.ready, bands.status, bands.effectiveSupport, and bands.resolvedCount.
Before minimum support: status is exactly "band stats not ready yet" and all band levels are na.
f_input(direction, originPrice, originScale, predictionValid, directionProbability, externalReliability)
Construct a generic target input from series values.
Parameters:
direction (int)
originPrice (float)
originScale (float)
predictionValid (bool)
directionProbability (float)
externalReliability (float)
f_model_new(gridSize, outcomeCap, smoothing, halfLife, family, shrinkageAlpha, minSupport, supportScale, minTransparency, maxTransparency, transparencyGamma)
Construct an independent stateful model instance.
Parameters:
gridSize (int)
outcomeCap (float)
smoothing (float)
halfLife (float)
family (series DensityFamily)
shrinkageAlpha (float)
minSupport (float)
supportScale (float)
minTransparency (int)
maxTransparency (int)
transparencyGamma (float)
f_update(model, signal, pathHigh, pathLow, pathClose, horizon, currentBar, confirmed)
Parameters:
model (TargetModel)
signal (TargetInput)
pathHigh (float)
pathLow (float)
pathClose (float)
horizon (int)
currentBar (int)
confirmed (bool)
TargetInput
Fields:
direction (series int)
originPrice (series float)
originScale (series float)
predictionValid (series bool)
directionProbability (series float)
externalReliability (series float)
TargetBands
Fields:
ready (series bool)
status (series string)
direction (series int)
originPrice (series float)
originScale (series float)
mfeQ10 (series float)
mfeQ50 (series float)
mfeQ80 (series float)
mfeQ90 (series float)
mfeMode (series float)
maeQ10 (series float)
maeQ50 (series float)
maeQ80 (series float)
maeQ90 (series float)
maeMode (series float)
mfePriceQ10 (series float)
mfePriceQ50 (series float)
mfePriceQ80 (series float)
mfePriceQ90 (series float)
mfePriceMode (series float)
maePriceQ10 (series float)
maePriceQ50 (series float)
maePriceQ80 (series float)
maePriceQ90 (series float)
maePriceMode (series float)
effectiveSupport (series float)
intervalCoverageEstimate (series float)
reliability (series float)
transparency (series int)
pendingCount (series int)
resolvedCount (series int)
lastResolvedBar (series int)
PendingTarget
Fields:
originBar (series int)
resolutionBar (series int)
direction (series int)
originPrice (series float)
originScale (series float)
maxHigh (series float)
minLow (series float)
TargetModel
Fields:
pending (array)
pooledMae (array)
pooledMfe (array)
longMae (array)
longMfe (array)
shortMae (array)
shortMfe (array)
pooledMaeWeight (series float)
pooledMaeWeightSq (series float)
pooledMfeWeight (series float)
pooledMfeWeightSq (series float)
longMaeWeight (series float)
longMaeWeightSq (series float)
longMfeWeight (series float)
longMfeWeightSq (series float)
shortMaeWeight (series float)
shortMaeWeightSq (series float)
shortMfeWeight (series float)
shortMfeWeightSq (series float)
gridSize (series int)
outcomeCap (series float)
smoothing (series float)
halfLife (series float)
family (series DensityFamily)
shrinkageAlpha (series float)
minSupport (series float)
supportScale (series float)
minTransparency (series int)
maxTransparency (series int)
transparencyGamma (series float)
lastDecayBar (series int)
lastResolvedBar (series int)
resolvedCount (series int) Library

NeuPortal Empirical Range - measured bands, honest sample sizeMost volatility bands are drawn the same way: per-bar sigma times the square root of the horizon. That rule assumes returns are independent draws from one fixed distribution. Crypto returns are neither — volatility clusters, tails are fat at short horizons, and the shape of the distribution changes as the horizon grows.
This script measures instead, and draws the assumption next to the measurement so you can see the gap on your own symbol.
An example of why that matters. On BTCUSDT 4h with a 24-bar horizon, the empirical band comes out 0.95x the textbook one — slightly narrower. But at 48 bars the measured width is 1.70x the 24-bar width where root-t predicts 1.41x, and at 72 bars it is 2.03x against a predicted 1.73x. The formula is roughly right at one horizon and badly wrong at another, on the same symbol. On ETHUSDT the pattern is the opposite. You cannot know which case you are in without measuring.
WHAT IT PLOTS
- core 50% zone: the interquartile range of how this market has actually moved over your horizon
- wide 80% band: the 10th to 90th percentile, as risk context
- median of the measured distribution
- the textbook sigma x root-t band, for contrast
The band is drawn FLAT on purpose. It describes one moment in the future, not a path to it. A diagonal would be a claim about the route, and this makes no claim about the route.
WHAT IT DOES THAT OTHER BANDS DO NOT
Conditional bands. An unconditional band averages today's market with every regime the symbol has ever been in. Switch conditioning on and only windows whose starting volatility resembled today's are counted. The table shows how many windows survived, because a conditional band on 20 windows is worse than an unconditional one on 500.
Touch versus close probability. Type a price and get two numbers: the share of historical windows that FINISHED beyond it, and the share that TOUCHED it at any point on the way. These differ a lot. If you are asking whether a stop gets hit, the second number is the answer and the first is misleading. Both come from actual highs and lows of real windows, not from a closed-form approximation.
The honest sample size. Overlapping windows flatter a sample: 3,000 rolling 24-bar returns come from 125 genuinely independent windows, and quantile standard errors scale with the second number. Both are printed, and the small one is flagged when it gets thin.
Out-of-sample coverage. The band is fitted on the older part of the chart and tested on the newer part it never saw. Target 50% for the core, 80% for the wide. Both directions are marked as failures: a band that contains everything is not skill, and that is the failure mode that flatters the author. On some symbols this script will tell you its own band is too wide. That is the point.
Multi-horizon widths at 1x, 2x and 3x your horizon with the observed ratio against root-t's prediction, plus skew and excess kurtosis so you can see how far from Gaussian this symbol is at this horizon.
Alerts fire when price leaves the zone that was supposed to hold it half the time.
HOW TO USE IT
Set the horizon in bars — it means whatever your timeframe means. 24 bars on 1H is a day, 30 bars on 1D is a month. Give it as much history as the chart has. Then read the independent window count before you read anything else.
Works on any symbol and any timeframe. Nothing is hard-coded to a particular market.
WHAT IT DOES NOT DO
It says nothing about direction. There is no signal here and no entry. It is a description of uncertainty, measured rather than assumed.
Educational content - not financial advice. Indicator

NeuPortal Forecast - sealed distributions not pathsDraws a forecast as a DISTRIBUTION at a stated horizon, never as a path.
What it plots, from values you enter yourself:
- median for the horizon
- core 50% zone (25th to 75th percentile of the asset's own historical moves over the same horizon)
- wide 80% band (10th to 90th percentile)
- the seal: a vertical line at the bar the forecast was fixed on, so left of it is observed and right of it was unknown
- an explicit invalidation level
- a computed daily read (ADX, DI, RSI, MACD, %B, EMA structure, ATR) taken from the chart itself, so the table cannot drift from the price it sits on
There is deliberately no diagonal anywhere. A line drawn from today's price to a future price is read as a claimed route, and a distribution at a horizon is not a route. The size of the expected move is stated as a vertical dimension bracket instead.
Two ways to feed it. Fill the inputs by hand, or paste a single line into "Today's line" in the first settings group, in the form key=value;key=value - useful if you generate forecasts programmatically and do not want to retype twenty fields daily. Pasted values win, missing ones fall back to the manual inputs.
Free, open source, no gating, no signals, no DMs.
Educational content - not financial advice. Indicator

NeuPortal - Forecast: sealed distributions, not pathsDraws a forecast as a DISTRIBUTION at a stated horizon, never as a path.
What it plots, from values you enter yourself:
- median for the horizon
- core 50% zone (25th to 75th percentile of the asset's own historical moves over the same horizon)
- wide 80% band (10th to 90th percentile)
- the seal: a vertical line at the bar the forecast was fixed on, so left of it is observed and right of it was unknown
- an explicit invalidation level
- a computed daily read (ADX, DI, RSI, MACD, %B, EMA structure, ATR) taken from the chart itself, so the table cannot drift from the price it sits on
There is deliberately no diagonal anywhere. A line drawn from today's price to a future price is read as a claimed route, and a distribution at a horizon is not a route. The size of the expected move is stated as a vertical dimension bracket instead.
Two ways to feed it. Fill the inputs by hand, or paste a single line into "Today's line" in the first settings group, in the form key=value;key=value - useful if you generate forecasts programmatically and do not want to retype twenty fields daily. Pasted values win, missing ones fall back to the manual inputs.
Free, open source, no gating, no signals, no DMs.
Educational content - not financial advice. Indicator

NeuPortal - Forecast: sealed distributions, not pathsDraws a forecast as a DISTRIBUTION at a stated horizon, never as a path.
What it plots, from values you enter yourself:
— median for the horizon
— core 50% zone (25th–75th percentile of the asset's own historical moves over the same horizon)
— wide 80% band (10th–90th percentile)
— the seal: a vertical line at the bar the forecast was fixed on, so left of it is observed and right of it was unknown
— an explicit invalidation level
— a computed daily read (ADX, DI, RSI, MACD, %B, EMA structure, ATR) taken from the chart itself, so the table cannot drift from the price it sits on
There is deliberately no diagonal anywhere. A line drawn from today's price to a future price is read as a claimed route, and a distribution at a horizon is not a route. The size of the expected move is stated as a vertical dimension bracket instead.
Free, open source, no gating, no signals, no DMs.
Educational content — not financial advice. Indicator

Indicator

DOUBLE SUPERTREND PYRAMID STRATEGYDouble Supertrend Pyramid Strategy
This strategy trades off two Supertrend indicators calculated on independent, user-selected timeframes (defaults: 1-minute and 2-minute). A trade is only taken when both Supertrends agree on direction — when they align upward, the strategy goes long; when they align downward, it goes short. Each new alignment is treated as a new "plotted course," and the strategy tracks that course's direction so it doesn't re-enter on every bar, only on an actual flip.
Core Entry Logic
Long/Short/Both direction control, so you can restrict the strategy to one side of the market if desired.
A session time-window filter (with a timezone dropdown covering major global zones) lets you restrict trading to specific hours, with an option to auto-close everything when the window ends.
On a Supertrend flip, the strategy normally waits until the position is completely flat before entering the new direction — it does not force-close open tiered or pyramid contracts just because the trend flipped. (See "Exit At Next Supertrend Plotted Course" below for the opt-in alternative.)
Tiered Exit System
Three independent, fully self-contained profit-scaling tiers (Tier 1/2/3), each with:
A profit target (ticks) and contract quantity to scale out at that target
An optional Stop Loss, and an optional Trailing Stop with a separate activation threshold (ticks, own enable checkbox)
An "Exit At Next Supertrend Plotted Course" checkbox — when checked, that tier's contracts are force-closed the moment the trend flips; when unchecked (default), the tier runs entirely on its own Target/Stop/Trailing settings regardless of what the trend does next.
Pyramid Add-On System
Eight independent pyramid types can each be enabled separately to add contracts in the direction of an existing position when their own specific condition fires:
Turtle ATR Unit — adds every time price moves a set fraction of ATR in your favor from the last fill.
Swing Structure — adds on a new confirmed swing high/low in the trend direction.
Momentum Re-confirmation — adds when ADX is rising with DI+/DI- agreement and RSI holds past a threshold.
Breakout / Consolidation — adds on a fresh Donchian channel breakout.
Multi-Timeframe Alignment — adds only when a higher-timeframe EMA filter agrees with the trade direction.
Error-Function One-Tailed Test — adds when the current bar's move is statistically significant versus its recent return distribution (Normal or Student-T approximation).
KDE Percentile — adds when the current move ranks in the top percentile of a non-parametric kernel-density estimate of recent returns.
Viterbi Regime Detection — adds only while a 2-state Hidden Markov Model infers the market is in a "trending" (versus "ranging") regime.
Each pyramid type is fully self-contained: its own contracts-per-signal size, its own optional TP/SL/Trailing Stop, its own per-course contract and signal caps, a delay-between-signals timer, a minimum-distance-before-next-add gate (selectable as ATR multiple, percent, ticks, points, or dollars), and its own "Exit At Next Supertrend Plotted Course" checkbox. All types default to fully disabled.
Global Risk Controls (always active, override everything)
Max contracts per trade (position size cap across core + pyramid adds)
Master daily $ take-profit and $ max-loss halts
Volatility Exit — flattens everything if ATR expands beyond a multiple of its recent average
ATR Protective Stop — a catastrophic-loss stop measured off the position's average entry price
Reverse-At-Stop-Loss — an optional system that flips the core position to the opposite side when the per-course Stop Loss is hit, capped at a configurable number of reversals per course Strategy

ANIMATRIX: RED PILL_BLUE PILLANIMATRIX: RED PILL_BLUE PILL
A falling-code visualization styled after the Matrix "digital rain" look where every column isn't random — each one is a live market-condition lane, rendered as a cascading glyph instead of a traditional plot or oscillator.
How it works:
Each bar, the indicator evaluates a set of real technical conditions trend, momentum, volatility, volume, structure, pattern recognition, etc. built from dozens of underlying calculations.
When a condition fires, its dedicated glyph where each one is reserved and never reused elsewhere — drops into the grid and cascades in whatever direction you've set (top-to-bottom, bottom-to-top, left-to-right, or right-to-left).
No condition firing means an empty cell — silence is meaningful too, not just noise filling space.
Red Pill — 17 primary market-condition lanes (Trend, Pressure, Volatility, Divergence, Volume/Whale, Reversal/Pattern, Structure/Levels, Regime, Wyckoff Phase, Fair Value Gap, Breakout, Support/Resistance Flip, Momentum Exhaustion, Multi-Timeframe Alignment, Session Open Range, Trend Acceleration, and Liquidity Grab), plus a Confluence marker (fires when enough lanes align) and a Dormant marker (flags dead/flat stretches).
Blue Pill — 12 "preceding" early-warning and rarer sub-event lanes (building exhaustion, squeeze setups, liquidity sweep setups, extreme order flow, delta-price divergence, FVG extras, PDC reclaim/rejection, session bias flips, etc.), plus a Conflict Warning marker for when opposing signals fire at once.
Layout Mode — Fixed (each lane always in the same slot), Full Drift (lanes shuffle position each tick), or Neo (a hybrid of the two).
Global Sensitivity — one dial that scales every lane's trigger thresholds at once, on top of each lane's own individual settings.
Two on-chart legend tables (one per Pill) spell out what every glyph means, with independent visibility, size, and position controls.
Full styling control — glyph size, transparency, per-lane colors (all grouped in the Style section), and cascade speed/direction.
In short: it's a technical dashboard disguised as ambient code — glance at the chart and the pattern of glyphs tells you what's actually happening underneath, without reading a single number. Indicator

Indicator

CTZ Accumulation/Distribution**CTZ Accumulation/Distribution**
A volume-based indicator that tracks whether money is flowing into or out of an asset by measuring where price closes within each bar's range, weighted by volume.
**How it works**
Each bar, a Money Flow Multiplier is calculated from the close's position between the high and low (–1 to +1). This is multiplied by volume to produce Money Flow Volume, which is added to a running cumulative total — the A/D line. Closes near the high on heavy volume push the line up (accumulation); closes near the low on heavy volume push it down (distribution).
**Features**
- **A/D Line with trend colouring** — teal when above the signal EMA, red when below, giving an at-a-glance read on money flow direction
- **Signal EMA (default 21)** — smooths the A/D line and acts as a trend filter; crosses can be used as early momentum shifts
- **Automatic divergence detection** — pivot-based logic flags bullish divergence (price makes a lower low while A/D makes a higher low = hidden accumulation) and bearish divergence (price makes a higher high while A/D makes a lower high = distribution into strength)
- **Built-in alerts** — divergence signals and signal-line crosses in both directions
**How to use it**
Confirmation: when price and the A/D line rise together, the uptrend is supported by real buying pressure. When they fall together, the downtrend is genuine.
Divergence: when price and the A/D line disagree, treat it as an early warning. Bull labels suggest smart money is accumulating into weakness; Bear labels suggest distribution into rising prices. These work best on higher timeframes and near key levels — not as standalone entries.
**Settings**
Signal EMA length, pivot lookback (sensitivity of divergence detection), and max bars between pivots (how far apart two pivots can be and still count as a divergence) are all adjustable.
**Limitations**
The A/D line ignores gaps between bars — an asset gapping up overnight registers nothing if it then closes mid-range. Pivot-confirmed divergence labels print a few bars after the pivot by design. Best used alongside momentum tools (RSI, MFI) rather than in isolation. Indicator

FTA Daily Pro v4FTA Daily Pro v4 — Full Technical Analyzer
A comprehensive daily-timeframe dashboard that combines trend, momentum, volume, volatility, relative strength, and divergence analysis into a single panel.
WHAT'S NEW IN V4
- Graded trend scoring — instead of an all-or-nothing trend flag, each condition (price vs EMA20, EMA20 vs EMA50, EMA50 vs EMA200, price vs EMA200) contributes points. A stock above its short-term EMAs but still below EMA200 now receives a partial score rather than zero.
- Momentum measures direction only — RSI and Stochastic no longer lose their points when readings run hot. Overbought/oversold is surfaced separately as an Exhaustion warning instead of silently reducing the score.
- Volume and volatility act as a quality gate — signals require meaningful relative volume and ATR expansion, not just a small score deduction.
- RRG (Relative Rotation) row — shows where the symbol sits versus a benchmark: Leading, Weakening, Lagging, or Improving, with RS-Ratio / RS-Momentum values and a direction arrow.
- Higher-timeframe confirmation row — displays the weekly (configurable) trend state to help avoid counter-trend setups.
- Clearer scoring scale — Bull/Bear score is now out of 10.
FEATURES
- EMA 10 / 20 / 50 / 200 — trend direction and structure
- MACD — momentum regime and fresh crossovers
- RSI (14) — zone reading with overbought/oversold background
- Stochastic K/D — momentum confirmation
- Relative Volume — participation filter
- ATR % — volatility filter
- RRG — relative strength quadrant versus a configurable benchmark (default SPY)
- HTF confirmation — higher-timeframe trend state
- Exhaustion flag — warns when momentum readings are stretched
- RSI Divergence — bull/bear divergence labels on chart
- Scoring system — Bull/Bear score out of 10
SIGNALS
Buy triggers on an EMA10/EMA20 crossover or a fresh MACD crossover, provided the score threshold and quality gate are met. Sell is symmetric. Score thresholds are adjustable in settings.
Dashboard displays real-time status of all components in one panel (top right). Alerts available for Buy, Strong Buy, Sell, Strong Sell, Bullish Divergence, Bearish Divergence, and RRG quadrant entries.
Best used on the Daily timeframe. Works across stocks, forex, crypto, and commodities, though the volume filter is most meaningful on symbols with reliable volume data.
NOTE
This is a technical analysis and visualization tool. It has not been backtested as a standalone trading system, and the scoring reflects current conditions rather than a validated edge. It does not constitute financial advice — always do your own research before making trading decisions. Indicator

FTA Daily Pro v4FTA Daily Pro v4 — Full Technical Analyzer
A comprehensive daily-timeframe dashboard that combines trend, momentum, volume, volatility, relative strength, and divergence analysis into a single panel.
WHAT'S NEW IN V4
- Graded trend scoring — instead of an all-or-nothing trend flag, each condition (price vs EMA20, EMA20 vs EMA50, EMA50 vs EMA200, price vs EMA200) contributes points. A stock above its short-term EMAs but still below EMA200 now receives a partial score rather than zero.
- Momentum measures direction only — RSI and Stochastic no longer lose their points when readings run hot. Overbought/oversold is surfaced separately as an Exhaustion warning instead of silently reducing the score.
- Volume and volatility act as a quality gate — signals require meaningful relative volume and ATR expansion, not just a small score deduction.
- RRG (Relative Rotation) row — shows where the symbol sits versus a benchmark: Leading, Weakening, Lagging, or Improving, with RS-Ratio / RS-Momentum values and a direction arrow.
- Higher-timeframe confirmation row — displays the weekly (configurable) trend state to help avoid counter-trend setups.
- Clearer scoring scale — Bull/Bear score is now out of 10.
FEATURES
- EMA 10 / 20 / 50 / 200 — trend direction and structure
- MACD — momentum regime and fresh crossovers
- RSI (14) — zone reading with overbought/oversold background
- Stochastic K/D — momentum confirmation
- Relative Volume — participation filter
- ATR % — volatility filter
- RRG — relative strength quadrant versus a configurable benchmark (default SPY)
- HTF confirmation — higher-timeframe trend state
- Exhaustion flag — warns when momentum readings are stretched
- RSI Divergence — bull/bear divergence labels on chart
- Scoring system — Bull/Bear score out of 10
SIGNALS
Buy triggers on an EMA10/EMA20 crossover or a fresh MACD crossover, provided the score threshold and quality gate are met. Sell is symmetric. Score thresholds are adjustable in settings.
Dashboard displays real-time status of all components in one panel (top right). Alerts available for Buy, Strong Buy, Sell, Strong Sell, Bullish Divergence, Bearish Divergence, and RRG quadrant entries.
Best used on the Daily timeframe. Works across stocks, forex, crypto, and commodities, though the volume filter is most meaningful on symbols with reliable volume data.
NOTE
This is a technical analysis and visualization tool. It has not been backtested as a standalone trading system, and the scoring reflects current conditions rather than a validated edge. It does not constitute financial advice — always do your own research before making trading decisions. Indicator

Library

Denies Kresna Zigzag 4This indicator is a simplified version inspired by the ZigZag Plus algorithm, designed to focus only on the features that matter most: ZigZag swing detection and Support & Resistance levels.
All non-essential components such as volume analysis, alerts, labels, bar coloring, and candle markers have been removed to provide a clean and lightweight charting experience.
Features
Automatic ZigZag swing detection
Dynamic Support and Resistance levels
Lightweight implementation for better performance
Clean chart with no unnecessary visual clutter
How it Works
The indicator identifies swing highs and swing lows using the original trend-switching logic. Every confirmed swing creates a new support or resistance level:
Swing High → Resistance
Swing Low → Support
Support and resistance levels remain active until they are invalidated by price.
Best Used For
Market structure analysis
Identifying swing highs and lows
Support & Resistance trading
Trend reversal confirmation
Price action trading
Notes
This script is intentionally minimalistic. It does not include volume analysis, breakout alerts, candle coloring, or other visual enhancements found in the original implementation.
The goal is to provide a fast, clean, and easy-to-read ZigZag indicator focused purely on market structure. Indicator

Move Strength IndexOverview
An accurate relative-volume indicator with a genuinely clear signal:
column height shows the relative-volume multiple, color intensity
separately highlights which of those bars are actually unusual for that
specific symbol, and a distinct compression color flags the specific
case where heavy volume produces almost no range — a classic
effort-without-result signature that often precedes a sharp move.
How it's calculated
Relative volume is current volume divided by a smoothed (RMA) average of
the *prior* bars — the still-forming bar is excluded from its own
baseline (a common flaw in naive relative-volume scripts, which quietly
dampens real spikes), and the smoothed baseline decays gradually rather
than using a fixed rolling window, avoiding the "step" artifact that
occurs when an old outlier bar abruptly exits a fixed-length SMA window.
Color intensity is driven by the bar's percentile rank against its own
trailing history (default 100 bars), not a fixed multiple — a fixed
brightness cutoff only produces contrast if the symbol regularly reaches
that multiple, whereas percentile rank self-calibrates so the loudest
days for any given symbol are always vivid and quiet days are always
dim.
Direction is close vs. open — the same test used to color the candles on
the price chart itself, so MSI's green/red always agrees with what the
candle next to it shows.
A bar is recolored yellow (compression) when its volume ranks high
(top percentile, same threshold used for alerts) but its high-low range
is unusually narrow relative to ATR — heavy participation that isn't
moving price, which typically means one side is being absorbed at that
level. The live, still-forming bar is dimmed by default, since its
partial volume will always understate true relative volume until the
bar closes.
How to use it
Column height is the relative-volume multiple directly — a bar at 2.0
traded at twice its recent baseline volume. Brightness tells you whether
that reading is actually unusual for this symbol; a tall but dull column
means the symbol just runs volatile volume normally, while a vivid
column is a genuine standout. Green/red tells you which side controlled
the bar. A yellow bar is the one to watch closely — high volume with
nothing to show for it in price, often the setup before a breakout or
breakdown. Alerts fire separately for strong buying, strong selling, and
compression. On a symbol with no real volume data, the script raises a
clear error instead of rendering a blank pane. Indicator

Indicator

FractalMemoryLib [Jayadev Rana]FractalMemoryLib packages the pattern-memory engine used by the Fractal Memory Projection indicator and the Fractal Memory Strategy so any script can import it.
WHAT IT DOES
The library finds the historical window whose movement shape most resembles the most recent bars (mean squared distance between stdev-normalized log returns), replays what followed that window as a projected close path, and sizes stops and targets adaptively by volatility regime.
EXPORTED FUNCTIONS
logRet(src) - one-bar log return of a series.
bestMatch(src, winLen, scanDepth, gapAhead) - scans up to scanDepth bars back and returns the offset of the most similar window plus a 0-100 similarity score. gapAhead reserves bars after the match for a projection.
analogPath(src, offset, fcLen, scaleF) - array of fcLen projected closes built by replaying the returns that followed the match, rescaled by scaleF (for example current ATR over ATR at the match).
adaptiveR(atrLen, rankLen, base) - volatility-adaptive unit risk: ATR times (base plus its 0-1 percentile rank), plus the rank itself. Call on every bar.
volRegime(volRank) - "Low", "Normal" or "High" label from the rank.
targets(entry, dirSign, unitR, slMult) - stop loss and TP1/TP2/TP3 at 1R, 2R and 3R.
USAGE NOTES
Call adaptiveR on every bar for ta consistency. bestMatch and analogPath are loop-heavy; for display purposes call them on the last bar only, and make sure the chart has at least scanDepth plus gapAhead bars of history. When the library itself is added to a chart it draws a small demo projection line from the best analog.
The analog projection is a statistical reference to a similar past episode, not a prediction, and not financial advice. Library

COT Category Screener [invincible3]COT Category Screener — Participant Select
The COT Category Screener is a professional Commitment of Traders dashboard designed to compare positioning across multiple futures markets from one compact table.
It uses Legacy COT data and allows traders to analyze either Non-Commercial or Commercial participants. Every displayed metric—including net positioning, historical indices, score, bias, ranking, and weekly history—automatically adapts to the selected participant.
MARKET CATEGORIES
The screener supports the following groups:
• Metals
• Energy
• Grains & Oilseeds
• Soft Commodities
• Livestock
• Equity Indices
• Cryptocurrencies
• Major Currencies
• Emerging-Market Currencies
Depending on the selected category, the dashboard compares up to eight markets simultaneously.
PARTICIPANT SELECTION
Choose between:
Non-Commercial
Primarily reflects speculative positioning from large traders such as funds and institutional market participants.
Commercial
Reflects the positioning stance of commercial participants and hedgers.
Commercial mode represents the Commercial participant-side perspective . It should not automatically be interpreted as a contrarian market signal.
When Commercial and Non-Commercial positioning spreads are symmetrical, their displayed scores and bias states will naturally appear opposite.
DASHBOARD METRICS
OI — Open Interest
Displays the total number of outstanding contracts reported for the selected market.
NET — Net Position
Calculated as:
Long Positions − Short Positions
A positive value indicates net-long positioning, while a negative value indicates net-short positioning.
ΔNET — Weekly Net Change
Measures the change in the selected participant’s net position compared with the previous COT report.
It helps identify whether participants are:
• Adding long exposure
• Reducing long exposure
• Adding short exposure
• Covering short exposure
L% and S%
Displays the selected participant’s long and short positions as a percentage of total open interest.
FLIP%
Calculated as:
Long% − Short%
A positive Flip% indicates stronger long exposure, while a negative Flip% indicates stronger short exposure.
HISTORICAL DIFFERENCE MODEL
The screener calculates the historical position of the spread between the selected participant and the opposite participant over three report windows:
• D13 — 13-report difference index
• D26 — 26-report difference index
• D52 — 52-report difference index
These values range from 0 to 100.
In the screener’s model:
• Lower Difference values contribute to a more bullish score.
• Higher Difference values contribute to a more bearish score.
The three windows are weighted as follows:
• D13: 20%
• D26: 30%
• D52: 50%
The longer-term D52 component therefore carries the greatest influence.
COT POSITION INDICES
I52
Shows the selected participant’s current net position relative to its historical range over the previous 52 reports.
I3Y
Shows the same relative position over 156 reports, approximately three years of weekly COT history.
Values near 0 indicate positioning near the lower end of the historical range.
Values near 100 indicate positioning near the upper end of the historical range.
These indices describe historical positioning extremes and should be interpreted together with the participant type, Difference readings, weekly net change, and overall bias.
COMPOSITE SCORE
The screener converts the weighted D13, D26, and D52 readings into a normalized score ranging from:
• +100 — Strong bullish positioning setup
• 0 — Neutral or mixed positioning
• −100 — Strong bearish positioning setup
The score is designed for relative comparison and ranking across markets within the selected category.
BIAS STATES
▲ BUY
Positioning has reached a potential bottom-zone setup.
This identifies an extreme condition, but it does not confirm that positioning has already reversed.
↗ BULL TURN
Short- and medium-term positioning has begun turning upward from a bullish extreme.
▲ LONG BUILD
A bullish turn is supported by a positive weekly change in net positioning, indicating that the selected participant is actively building long exposure.
▲ LONG BIAS
Positioning remains within the bullish side of the model, although a fresh turning condition is not present.
↘ LONG UNWIND
The broader positioning structure remains bullish, but net exposure declined during the latest report.
↗ SHORT COVER
The broader structure remains bearish, but net positioning increased, suggesting that short exposure may be reducing.
▼ SHORT BIAS
Positioning remains within the bearish side of the model without a newly confirmed bearish turn.
◇ TOP RISK
Positioning has reached a potential upper-zone or overcrowded extreme.
This is a risk condition rather than an immediate sell confirmation.
↘ BEAR TURN
Short- and medium-term positioning has begun turning downward from a bearish extreme.
▼ SHORT BUILD
A bearish turn is supported by a negative weekly change in net positioning, indicating active short-position accumulation or long-position reduction.
• NEUTRAL
Positioning is mixed and does not meet the defined bullish or bearish thresholds.
— NO DATA
Sufficient historical COT observations are not yet available for the selected calculation.
WEEKLY POSITIONING HISTORY
The final column displays a compact 10–15 week Flip% sparkline .
Each vertical character represents one COT reporting week:
• The oldest report appears on the left.
• The most recent report appears on the right.
• Taller bars represent stronger relative Flip% readings.
The history can be normalized independently for each market or displayed using a fixed percentage range.
Hover over the history cell to view the underlying weekly values.
SORTING OPTIONS
Markets can be arranged by:
• Category Order
• Bullish → Bearish
• Bearish → Bullish
• Strongest Extreme
This makes it easier to identify the strongest relative opportunities or risks within a market group.
VISUAL DESIGN
The dashboard uses neutral table surfaces with value-colored typography rather than full-cell heatmap coloring.
It automatically adapts to light and dark chart themes and includes detailed hover tooltips for:
• CFTC market codes
• Raw positioning values
• Difference readings
• Historical indices
• Composite scores
• Bias calculations
• Weekly Flip% history
DATA OPTIONS
The user can select between:
• Futures Only
• Futures and Options Combined
All calculations are based on weekly COT reports and are not intended to represent real-time positioning.
SUGGESTED USE
This screener is designed for:
• Identifying historically crowded positioning
• Comparing related futures markets
• Detecting positioning accumulation or distribution
• Monitoring speculative and commercial behavior separately
• Locating potential medium-term bottom or top setups
• Confirming broader macro or price-action analysis
COT positioning is generally more suitable for contextual and medium-term analysis than precise entry timing.
Signals should be combined with price structure, trend, momentum, volatility, and appropriate risk-management rules.
DISCLAIMER
This indicator is an analytical tool and does not constitute financial advice.
Historical positioning extremes do not guarantee a market reversal or continuation.
Indicator

HTF Volume Profile Map - POC, VAH, VAL and DeltaHTF Volume Profile Map - POC, VAH, VAL and Delta
HTF Volume Profile Map estimates where trading volume was concentrated inside higher-timeframe candles and displays those value areas directly on an intraday chart.
The indicator builds a separate volume-at-price profile for each completed higher-timeframe candle. For example, traders can view four-hour volume distributions while working from a 5-minute, 15-minute, or 1-hour chart.
It highlights the prices that attracted the greatest estimated participation rather than relying only on the higher-timeframe candle’s open, high, low, and close.
Main features
Higher-timeframe volume-at-price profiles
Point of Control, or POC
Value Area High and Value Area Low
Configurable value-area percentage
Developing POC, VAH, and VAL
Projection of the latest completed value area
Estimated directional volume delta
Buy/sell-colored profile rows
Automatic ATR-based row sizing
Manual tick-based row sizing
Configurable profile width and history
Dashboard showing location, flow, levels, and calculation quality
Alerts for value-area entry and POC crosses
How it works
The script retrieves lower-timeframe OHLCV data using request.security_lower_tf() and groups those intrabars inside the selected higher-timeframe period.
Each intrabar’s volume is distributed across the price rows touched by its high-to-low range. Upward intrabars contribute to estimated buying volume, while downward intrabars contribute to estimated selling volume. Doji intrabars are classified using their movement relative to the preceding intrabar.
The row with the greatest accumulated volume becomes the POC.
The value area begins at the POC and expands toward adjacent rows with greater volume until it contains the selected percentage of total profile volume. The conventional default is 70%.
Reading the profile
POC
The price row containing the highest estimated volume. It can represent an important acceptance level or price magnet.
VAH
The upper boundary of the value area. Trading above VAH can indicate an auction attempting to establish higher value.
VAL
The lower boundary of the value area. Trading below VAL can indicate an auction attempting to establish lower value.
Estimated Delta
The difference between estimated buying and selling volume:
Positive delta indicates greater upward intrabar volume.
Negative delta indicates greater downward intrabar volume.
A relatively small delta is classified as balanced value.
Dashboard states
Above Value
Price is above the latest completed HTF value area.
Below Value
Price is below the latest completed HTF value area.
Value / Upper
Price is inside value and above the POC.
Value / Lower
Price is inside value and below the POC.
Buy Dominant / Sell Dominant
Estimated delta exceeds the directional threshold.
Balanced Value
Neither side has established significant directional dominance.
Practical applications
Traders can use the indicator to study:
Acceptance or rejection around prior HTF value
POC retests
Failed auctions above VAH or below VAL
Rotation from one value boundary toward the other
Confluence with market structure, liquidity, supply/demand, or session levels
Differences between price direction and estimated volume delta
The indicator identifies context and reference levels. It does not generate automatic buy or sell signals.
Suggested configuration
For a 15-minute chart:
Higher Timeframe: 240 minutes
Intrabar Sampling: 1 minute
Row Size: Auto
Value Area: 70%
For a 5-minute chart:
Higher Timeframe: 60 or 240 minutes
Intrabar Sampling: 1 minute
Value Area: 70%
Increase profile width if the histograms appear too narrow. Increase the row size or reduce the automatic target-row setting if the dashboard displays “Widen Rows.”
Important limitation
This is an estimated volume profile, not an exchange-level bid/ask footprint.
PulseWire’s native footprint API requires a qualifying higher-tier subscription. This script instead uses lower-timeframe OHLCV data, allowing it to operate without the native footprint request.
Because the precise transaction price of every trade is unavailable, each intrabar’s volume is distributed across the price rows covered by that intrabar. The resulting POC, value area, and delta should therefore be treated as analytical estimates.
Historical depth also depends on the selected sampling timeframe and PulseWire’s available intrabar data.
The script processes confirmed chart bars and discards the first incomplete HTF profile loaded at the beginning of the dataset. Completed HTF profiles remain fixed, while developing levels can change until their HTF candle closes. Indicator

Short Pressure IndexOverview
A composite 0-100 "short pressure" score built from three independently computed components (volume climax, MA deviation, and bearish-bar momentum), with optional automatic exchange routing for crypto and FINRA short-volume data substitution for stocks — so the same score means something comparable across very different asset classes.
How it's calculated
1. Volume pressure: the fraction of high-significance volume (climax or above-average bars, per a PVSRA-style multiplier check) that occurred on bearish closes over a rolling window. For US stocks with FINRA short volume enabled, this component is swapped for the actual reported short-volume ratio instead.
2. MA deviation pressure: how far below (in ATR multiples) price sits from its moving average, rescaled to 0-100 over a rolling window.
3. Momentum pressure: the % of the last N bars that closed bearish.
The three are averaged and smoothed with an EMA to produce the SPI line, which gets its own signal-line EMA and histogram. For crypto, price/volume can be routed to a more liquid exchange feed (e.g. Bitfinex) since the chart's native feed may be sparse; unsupported symbol types can be suppressed entirely rather than plotting a meaningless value.
How to use it
Readings above the high threshold (default 70) suggest broad short-side pressure building across all three components; below the low threshold (default 30) suggests minimal short pressure. The histogram and signal-line crosses give earlier, more granular entries than waiting for a threshold cross. For US equities, "Use FINRA Short Volume" swaps in real reported short-sale data for a more direct read than the volume-climax proxy alone. Indicator
