GENESIS//@version=5
indicator("SMAs + Confirmação 2ª Vela + ALERTA", overlay=true)
// Médias
len1 = input.int(8, title="SMA Rápida")
len2 = input.int(21, title="SMA Lenta")
sma1 = ta.sma(close, len1)
sma2 = ta.sma(close, len2)
// Plot
plot(sma1, color=color.green, linewidth=2)
plot(sma2, color=color.blue, linewidth=2)
// Cruzamentos
crossUp = ta.crossover(sma1, sma2)
crossDown = ta.crossunder(sma1, sma2)
// Contadores
var int countUp = 0
var int countDown = 0
if (crossUp)
countUp := 1
else if (countUp > 0)
countUp += 1
if (crossDown)
countDown := 1
else if (countDown > 0)
countDown += 1
// Reset
if (crossDown)
countUp := 0
if (crossUp)
countDown := 0
// Sinais na 2ª vela
buySignal = countUp == 2
sellSignal = countDown == 2
// Plot sinais
plotshape(buySignal, title="COMPRA", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="VENDA", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// ALERTAS 🚨
alertcondition(buySignal, title="ALERTA COMPRA", message="📈 COMPRA confirmada após 2ª vela!")
alertcondition(sellSignal, title="ALERTA VENDA", message="📉 VENDA confirmada após 2ª vela!") Indicador

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 TradingView.
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 TradingView 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 TradingView 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.
TradingView'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 TradingView. 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.
Indicador

Liquidity Thermodynamics Engine V9 LiteLiquidity Thermodynamics Engine V9 Lite is a macro-liquidity oscillator designed to highlight liquidity impulse, acceleration, compression, divergence, and follow-through conditions. It is a lite core version of a more heavy research model that explores liquid thermodynamic phase models as the physics corresponds to capital flows.
The indicator combines major liquidity inputs into a normalized composite, then tracks when liquidity impulse strengthens, compresses, diverges from price, or aligns with acceleration. The Lite version focuses on a clean chart experience while preserving an optional Flow Map for users who want to inspect the underlying liquidity drivers.
Primary signals include:
- Composite and signal line
- Positive and negative impulse histogram
- Bright positive impulse bars
- Acceleration markers
- Compression diamonds
- Bullish and bearish divergence markers
- Bright green follow-through triangle
- Optional energy exhaustion flag
- Optional Flow Map
This tool is intended for macro context and research. It is not financial advice and should not be used as a standalone trading system.
User Guide
Liquidity Thermodynamics Engine V9 Lite, or LTE Lite, is a macro-liquidity momentum oscillator designed to help users visualize when liquidity conditions are compressing, accelerating, diverging from price, or beginning to follow through.
The indicator is not designed to predict every short-term move. It is best used as a higher-timeframe liquidity context tool, especially on slower charts such as the 6D, weekly, or multi-day Bitcoin chart. Its strongest signals tend to come when liquidity impulse and acceleration align near important macro turning zones.
This guide explains what each signal means, how to read the chart, and how to use the tool responsibly.
1. What LTE Lite Measures
LTE Lite combines several macro liquidity series into a normalized oscillator:
- Federal Reserve total assets
- Treasury General Account
- Overnight reverse repo
- Reserve balances
- Optional inverse DXY overlay
The core model converts liquidity conditions into a composite line, then measures the speed and force of changes in that composite. The result is a compact view of liquidity pressure, impulse, acceleration, compression, divergence, and exhaustion.
In simple terms:
- The white line shows the liquidity composite.
- The yellow line smooths that composite into a signal line.
- The histogram shows liquidity impulse.
- Markers highlight important changes in pressure, momentum, divergence, and exhaustion.
2. The Core Lines
White Line — Composite Line
The white line is the main liquidity composite. It represents the current normalized liquidity condition.
When the white line rises, liquidity conditions are generally improving. When it falls, liquidity conditions are generally deteriorating.
The white line is more reactive than the yellow signal line.
Yellow Line — Signal Line
The yellow line is a smoothed version of the composite.
It helps users distinguish noise from directional liquidity movement. When the white line rises above the yellow line, liquidity momentum is improving. When the white line falls below the yellow line, liquidity momentum is weakening.
The signal line is not a trade trigger by itself. It is context.
3. Impulse Histogram
The histogram measures the rate of change in the liquidity composite.
Green Histogram Bars
Green bars show positive liquidity impulse.
This means liquidity pressure is improving relative to the prior bars.
Red Histogram Bars
Red bars show negative liquidity impulse.
This means liquidity pressure is deteriorating.
Bright Green Histogram Bars
Bright green bars mark stronger positive impulse.
By default, LTE Lite highlights positive impulse bars when they reach or exceed the Key Positive Impulse Level. In the current stock configuration, this level is set to `0.10`.
These bars are important because they often mark a stronger liquidity push rather than a minor improvement.
Important: a bright green histogram bar is not automatically a buy signal. Its value increases when it aligns with acceleration, compression release, improving structure, or price confirmation.
4. Acceleration Markers
Acceleration markers show when the impulse itself is accelerating.
Yellow `+`
A yellow plus sign marks positive acceleration.
This means liquidity impulse is not just positive; it is improving quickly enough to clear the acceleration threshold.
Positive acceleration can appear before a larger histogram impulse bar, or the impulse bar can appear first. LTE Lite watches for either order.
Yellow `-`
A yellow minus sign marks negative acceleration.
This means liquidity impulse is weakening quickly.
Negative acceleration can warn that a prior liquidity push is losing force.
5. Bright Green Triangle Signal
The bright green triangle is one of the most important Lite signals.
It fires when:
- A bright positive impulse bar occurs, and
- A positive acceleration signal occurs, and
- The two events happen within the configured window.
The default window is `7` bars.
On a 6D chart, 7 bars is roughly 42 calendar days. This gives the signal room to capture cases where acceleration leads impulse and cases where impulse leads acceleration.
Why This Signal Matters
This signal is designed to identify liquidity follow-through.
The idea is:
- A large positive histogram bar shows meaningful liquidity impulse.
- A `+` acceleration marker shows liquidity momentum is expanding.
- When both appear close together, the market may be entering a more supportive liquidity window.
This does not guarantee immediate upside. It means liquidity conditions have improved enough to deserve attention.
How to Use It
Best practice:
1. Watch for the green triangle on higher timeframes.
2. Check whether price is basing, breaking structure, or reclaiming key levels.
3. Confirm that the composite is stabilizing or rising.
4. Avoid treating the triangle as a standalone entry signal.
The green triangle is a context signal, not a mechanical trading command.
6. Compression Signal
Compression is shown as a small gray diamond around the zero line.
Compression appears when:
- Liquidity impulse is small, and
- Composite movement is also muted, and
- This quiet condition persists for the configured number of bars.
Compression means liquidity energy is coiling.
It does not tell direction by itself. It simply says the system is quiet enough that a larger move may be building.
How to Use Compression
Compression is most useful when followed by:
- Positive acceleration
- Bright green impulse
- A green triangle signal
- Composite reclaiming or curling upward
Compression followed by negative acceleration can instead warn of downside continuation.
7. Divergence Signals
Divergence compares price structure against liquidity structure.
Bullish Divergence
A bullish divergence marker appears when price makes a lower pivot low while the liquidity composite makes a higher pivot low.
This can suggest that price is weakening less efficiently because liquidity conditions are improving underneath the surface.
Bearish Divergence
A bearish divergence marker appears when price makes a higher pivot high while the liquidity composite makes a lower pivot high.
This can suggest that price is rising while liquidity support is weakening.
Divergence Mode
The default mode is:
`Price vs Liquidity + Impulse`
This is stricter than simple price-versus-liquidity divergence because it also checks impulse direction. The goal is to reduce noisy divergence signals.
Divergence is best used as a warning or confirmation tool, not as a standalone entry or exit.
8. Energy Exhaustion Flag
The Energy Exhaustion Flag is an optional marker.
It is designed to identify moments when internal liquidity energy has dropped sharply or clustered into a weak state.
By default in the current V9 Lite stock settings, this marker is turned off.
When enabled, it can help identify late-stage exhaustion after strong liquidity movement. It should be used carefully because exhaustion can persist before price responds.
9. Flow Map
The Flow Map is an optional visual layer.
It breaks liquidity movement into individual components:
- Fed flow
- Treasury flow
- RRP flow
- Reserve flow
The Flow Map helps users see which component is contributing most to liquidity movement.
Flow Map Modes
`Stacked Bars` shows all selected flow components.
`Dominant Bars` shows only the strongest component on each bar.
`Stacked + Dominant Marker` shows the flow bars and adds a marker to the dominant component.
How to Use the Flow Map
Use the Flow Map when you want to inspect what is driving the oscillator.
For example:
- Reserve flow may dominate during banking-system liquidity shifts.
- TGA changes may dominate around Treasury cash rebuilding or drawdowns.
- RRP shifts may dominate when reverse repo usage changes materially.
- Fed balance sheet changes may dominate during major policy/liquidity events.
For clean chart reading, leave Flow Map off. Turn it on when doing deeper diagnostics.
10. Suggested Timeframes
LTE Lite is designed primarily for higher-timeframe liquidity analysis.
Recommended starting points:
- Bitcoin 6D
- Bitcoin weekly
- Major index weekly
- Multi-day charts for macro context
Lower timeframes may produce more noise because macro liquidity data updates slowly relative to intraday price action.
The 6D chart can be especially useful because it balances signal sensitivity with macro smoothness.
11. Practical Reading Workflow
Use this sequence:
Step 1 — Identify the Liquidity Regime
Look at the white and yellow lines.
Is the composite rising, falling, basing, or rolling over?
Step 2 — Check Impulse
Look at the histogram.
Are bars green or red? Are green bars brightening? Is negative impulse fading?
Step 3 — Watch Acceleration
Look for `+` or `-` markers.
A `+` means liquidity momentum is accelerating. A `-` means it is decelerating.
Step 4 — Look for Follow-Through
The green triangle is the key combined signal.
It means strong positive impulse and positive acceleration have occurred within the configured window.
Step 5 — Confirm With Price
Do not use the indicator alone.
Look for price confirmation such as:
- Break of market structure
- Reclaim of key moving averages
- Higher lows
- Range breakout
- Failed breakdown
- Support reclaim
Step 6 — Manage Risk
Liquidity support can improve before price moves. It can also improve while price continues consolidating.
Use invalidation levels, position sizing, and a clear plan.
12. Signal Priority
Not all signals carry equal weight.
Highest priority:
1. Bright green triangle after or near positive acceleration
2. Bright green impulse bars appearing after compression
3. Bullish divergence near a major low
4. Composite rising above the signal line
Medium priority:
1. Positive acceleration without bright impulse
2. Compression alone
3. Flow Map showing improving dominant flow
Lower priority:
1. Small green histogram bars
2. Isolated divergence without impulse confirmation
3. A single marker against strong price downtrend
13. Common Mistakes
Mistake 1 — Treating Every Green Bar as Bullish Enough
Small green bars only show mild improvement. The brighter bars matter more.
Mistake 2 — Ignoring Timeframe
Signals on a 6D or weekly chart are not short-term scalping signals. They describe larger liquidity conditions.
Mistake 3 — Ignoring Price Confirmation
Liquidity can lead price, but price still needs to confirm.
Mistake 4 — Assuming the Triangle Means Immediate Upside
The triangle identifies a supportive liquidity window. It does not guarantee immediate price expansion.
Mistake 5 — Overloading the Chart
Keep Flow Map off unless you are diagnosing components. The cleanest read usually comes from the composite, signal line, histogram, acceleration markers, compression, divergence, and green triangle.
14. Default Settings Philosophy
The stock settings are tuned for a clean macro read.
The defaults prioritize:
- Higher-timeframe stability
- Fewer false signals
- Visibility of major impulse events
- Clean chart presentation
- Optional component diagnostics through Flow Map
If users modify settings, they should do so slowly and test across multiple cycles.
Risk Disclaimer
This indicator is for educational and research purposes only.
It does not provide financial advice, investment advice, or trading recommendations. Markets involve risk, and no indicator can guarantee future performance. Users should combine this tool with independent analysis, risk management, and their own decision-making process.
Past signal behavior does not guarantee future results. Indicador

Indicador

Indicador

Indicador

Indicador

HOD Break MarkersThis indicator identifies and tracks successive intraday highs of day on fast charts such as 10-second and 1-minute timeframes.
A new HOD is confirmed when:
1. A candle reaches the highest price of the tracking period.
2. The following candle closes with a lower high.
Once confirmed, the indicator places an outlined marker and an `HOD` label above the candle. If a later candle trades above that price—even briefly with its wick—the marker becomes filled and the horizontal level changes to its “broken” colour.
Customization
You can adjust:
- Marker shape: diamond, square, circle, triangle, or none.
- Marker size and `HOD` text size independently.
- Marker, text, and level colours.
- Custom label text, such as `HOD` or `High of Day`.
- Horizontal line style, width, and visibility.
- Whether levels stop at the end of the day or extend across future days.
Tracking windows
- Exchange day: Uses every visible chart bar and resets each exchange day.
- Custom session: Tracks only a selected session, such as `0400-2000` for US extended hours or `0930-1600` for the regular session.
Premarket highs require extended-hours bars to be enabled on the TradingView chart.
Alerts
The script provides alert conditions for:
- A newly confirmed HOD.
- Price breaking a confirmed HOD. Indicador

Indicador

Indicador

VWAP Mean Reversion Strategy with Session and Volume FilterDescription:
Volume Weighted Average Price, is one of the most referenced levels on any intraday chart. It appears on almost every institutional trading desk as a benchmark for execution quality: did you buy below VWAP or above it? Did you sell above it or below it? That institutional significance is what makes it useful as a trading level, not because it is a magical support and resistance line, but because enough participants are watching it and acting around it that it creates real, observable price behavior.
This strategy is built around one of the most consistent behaviors VWAP produces: mean reversion. In sessions with no strong directional trend, price tends to oscillate around VWAP rather than trending away from it indefinitely. When price moves significantly above VWAP in a non-trending session, institutional sellers often step in, bringing price back toward the average. When price moves significantly below VWAP, buyers who missed the open use VWAP as a reference level for value. The result is a gravitational pull back toward VWAP that is observable, repeatable, and, with the right filters, tradable.
What VWAP Actually Measures
VWAP is calculated by summing the product of price and volume for every transaction during a session, then dividing by total volume. The result is the average price at which the instrument has traded during the day, weighted by how much traded at each price. A stock trading at $102 when VWAP is $100 means that, on average, every share transacted during the session changed hands at $100, and the current price is 2% above that average. Whether that premium is justified depends on whether volume is expanding in the direction of the move or shrinking, which is exactly what this strategy checks.
VWAP resets every session. This is important: VWAP is an intraday concept. Using it on daily charts or holding positions across sessions removes the institutional context that makes it meaningful. This strategy trades only within the active session for that reason.
The Mean Reversion Logic
Entries fire when two conditions are met simultaneously. First, price must have moved a defined distance away from VWAP, measured in ATR multiples to scale the threshold to the instrument's actual volatility rather than a fixed percentage. Second, volume on the move away from VWAP must be declining relative to its recent average. This second condition is the critical filter. A price move away from VWAP accompanied by expanding volume suggests a real directional move with genuine participation, shorting into that is dangerous. A move away from VWAP on declining volume suggests the move is losing conviction and the pull back to VWAP is more likely.
When price is above VWAP by more than the ATR threshold and volume is declining, a short entry fires. When price is below VWAP by more than the ATR threshold and volume is declining, a long entry fires. The target for both is VWAP itself — not a fixed ATR level, but the actual VWAP value at the time the target would be hit. Stop-loss is placed at an ATR multiple beyond the entry in the opposite direction from VWAP.
Session Filter
The strategy only trades between 9:45 AM and 3:15 PM ET. The first 15 minutes after the NYSE open are excluded deliberately. The opening session is when the largest institutional orders are being executed, VWAP has barely formed, and the spread between price and VWAP frequently reflects genuine price discovery rather than mean reversion opportunity. Trading into the first 15 minutes with a mean reversion approach is trading against the most aggressive order flow of the day. The final 45 minutes are excluded because end-of-day institutional rebalancing often moves price away from VWAP and keeps it there through the close, a mean reversion entry in that window frequently doesn't have time to play out before the session ends and the position needs to be closed.
What This Strategy Works Best With
VWAP mean reversion is most effective on highly liquid instruments where institutional participation is consistently high, major equity indices, large-cap individual stocks, and equity index futures. On thinly traded instruments, VWAP is less meaningful as a reference level because the institutional volume that creates the gravitational pull isn't present. On crypto markets, VWAP mean reversion can work but requires adjusting the session definition since crypto trades continuously, not in defined daily sessions.
What to Watch in Backtesting
Performance will vary significantly by market regime. In strongly trending sessions, where a catalyst like an earnings surprise, a Fed announcement, or a macro data release drives sustained directional movement, mean reversion against the trend produces losing trades. This is expected and not a flaw. Check the strategy's performance separately on trending days versus range-bound days if you can identify them. The most useful insight from backtesting this strategy is often not the aggregate win rate but the distribution of trade outcomes across different session types.
Shared for educational purposes and community discussion. This is not investment advice. Always backtest on your own instruments and timeframes using realistic commission assumptions before drawing any conclusions. Estrategia

Indicador

Indicador

NOVA EMA/MACD V2## NOVA EMA/MACD V2
NOVA EMA/MACD V2 is a multi-timeframe retracement strategy designed to identify structured continuation opportunities using EMA touches, MACD confirmation, and higher-timeframe momentum filtering.
The strategy first waits for price to retrace to the selected EMA after a defined number of candles have remained clear of it. Once a valid touch is detected, the setup becomes armed and waits for confirmation from the entry-timeframe MACD.
A trade can be triggered in two ways:
* The entry-timeframe MACD crosses in the direction of the setup while the higher-timeframe MACD agrees.
* The higher-timeframe MACD flips into the setup direction while the entry MACD is already aligned.
An optional EMA-side filter requires buy entries to close above the EMA and sell entries to close below it.
### Trade management
The strategy opens three separate positions using risk-based position sizing.
Default targets:
* Position 1: **1.5R**
* Position 2: **2R**
* Position 3: **2.5R**
Stop-loss distance is calculated using the width of a configurable Keltner Channel. Break-even activates at **0.9R** by default.
An additional EMA early-exit system activates after price reaches 1R. The remaining position can then be closed after four consecutive candles close on the wrong side of the EMA.
### Main features
* Multi-timeframe EMA and MACD analysis
* Higher-timeframe MACD direction filter
* Immediate entry when HTF MACD flips and entry MACD is already aligned
* Keltner Channel-based stop loss
* USD risk-based position sizing
* Three configurable profit targets
* Automatic break-even management
* EMA-based early exit
* Setup, entry, exit, and management alerts
* Clean status dashboard displaying trend, risk, quantity, stop distance, break-even, and early-exit status
### Recommended use
The default configuration is optimized for lower-timeframe chart analysis, particularly the 1-minute timeframe. Users should test the strategy on their chosen symbol, broker feed, session, spread, commission, and execution conditions before using it for live trading.
**Disclaimer:** This strategy is provided for educational and analytical purposes only. Historical performance does not guarantee future results. Trading involves substantial risk, and users are responsible for their own trading decisions.
Estrategia

ORB + Key Levels (PDH/PDL, PM H/L, PDC, Open)Restructured for backtesting. The key change: instead of drawing only the current day's rays at the last bar, the script now creates real line objects day by day as it processes history. So:
Every past day on the chart keeps its own ORB 15/30, PDH/PDL, PDC, PM H/L, and opening print lines — each one starting at its forming candle and ending at that day's close
When you enter bar replay mode and jump to any date, the script recalculates up to the replay point, so that date's levels are drawn correctly and the "active" day at the replay head extends to the right edge — exactly like live trading
As you step forward through replay, ORB lines pop in the moment the 15/30-min window completes (9:45/10:00 ET), PM levels update tick-by-tick during premarket, and everything freezes when the next day's premarket begins — so you're seeing exactly what you'd have seen in real time, with no lookahead
Two practical notes for your replay testing:
Line history depth: max_lines_count=500 keeps roughly the last 50 sessions of lines visible (10 lines per day). TradingView's hard cap is 500, so older days silently drop their lines — but in replay this doesn't matter, since everything recalculates from the replay point anyway.
On the very first day of loaded history there are no PDH/PDL/PDC lines (there's no tracked previous day yet) — start your replay at least one session in. Indicador

Indicador

Indicador

Estrategia

Indicador

SOL RSI DCA Strategy [3Commas & QuantPilot]SOL RSI DCA Strategy
🔷 What it does:
This is a long-only DCA (Dollar-Cost Averaging) strategy for SOL / USDT that opens a position only in oversold conditions and then averages down on a fixed safety-order ladder. A base order fires when 4h RSI(14) drops below the entry threshold; if price keeps falling, five averaging orders add to the position at fixed deviations from the base entry, each larger than the last. The full position is closed at a fixed take-profit above the blended average entry. There is no trailing exit and no stop loss — the position is structurally bounded by the five-order ladder.
- Single entry filter: 4h RSI(14) below 33 (oversold).
- Five averaging orders at fixed deviations (−2%, −5%, −9.5%, −16%, −25%) with 1.8× size scaling per rung.
- Fixed take-profit (4%) on the blended average entry; no trailing, no stop loss.
- Every fill and close emits a webhook-ready JSON alert payload for a DCA Bot.
🔷 What changed — two parameters, tuned with QuantPilot:
This strategy started from a baseline configuration (RSI entry below 28, 3% take-profit). Running the same script, on the same market, over the same period through the QuantPilot Pine Script optimizer, two parameters were swept and re-selected: the RSI entry threshold moved from 28 to 33, and the take-profit moved from 3% to 4%. Everything else was left untouched — same five-order ladder, same deviations, same 1.8× sizing, same fees.
- Baseline (RSI < 28, TP 3%): Net +5,178.77 USDT (+5.18%), Max Drawdown 5.53%, 77 closed trades, 67.53% profitable, Profit Factor 4.582.
- Optimized (RSI < 33, TP 4%): Net +10,399.80 USDT (+10.40%), Max Drawdown 5.32%, , , .
The result: net profit roughly 2× higher (+5.18% → +10.40%), while maximum drawdown actually eased slightly (5.53% → 5.32%). The looser RSI entry (33) lets the strategy engage the dip earlier and more often, while the wider 4% target lets each recovery run a little further before the position is banked. The published defaults use the optimized values; the baseline metrics are shown here purely so the effect of the two parameter changes is transparent.
🔷 Who is it for:
- Swing traders accumulating SOL on RSI pullbacks rather than chasing momentum.
- Bot operators who want a chart-driven signal source with base / safety-order / close webhook JSON ready to drive a DCA Bot.
- Traders comfortable with martingale-style averaging who size their capital to the worst-case ladder fill.
- Range / mean-reversion traders who prefer mechanical oversold entries over discretionary timing.
🔷 How does it work:
Entry (Base Order): On each closed 4h bar the strategy reads RSI(14). When RSI falls below 33 and there is no open position, it opens the base order at market (or limit, optionally) and dispatches the entry webhook.
Averaging Orders: Once in a position, the strategy watches price relative to the original base entry. The five safety orders are armed at fixed deviations from that base entry — not cumulatively — at −2%, −5%, −9.5%, −16%, and −25%. As each threshold is crossed on bar close, the corresponding averaging order fires. Order sizes scale 1.8× per rung ($900 → $1,620 → $2,916 → $5,249 → $9,448 from a $500 base), pulling the blended average entry down toward the latest fill.
Exit (Take Profit): While in a position, the strategy computes a take-profit price 4% above the current average entry. When price closes at or above that level, the entire position is closed at market and the close webhook fires. There is no trailing and no stop loss.
Capital Bounds: Total deployed capital cannot exceed the base order plus the five safety orders. Once all five averaging orders are filled, no further adds occur — the position simply waits for the take-profit. This ladder cap is the strategy's primary risk control.
🔷 Why it's unique:
- Optimizer-Tuned Parameters: The RSI threshold (33) and take-profit (4%) are not arbitrary — they are the values the QuantPilot Pine Script optimizer selected as best-performing on the historical sample, with every other parameter held constant.
- Fixed-Deviation Martingale Ladder: Safety orders are placed at fixed percentages from the base entry with deliberate 1.8× size scaling, so each rung has progressively more influence on the average — a transparent, fully-specified averaging schedule rather than an opaque adaptive grid.
- Full Webhook Chain: Base order, each safety order, and the close all emit dedicated JSON payloads, driving a DCA Bot end-to-end with no glue layer.
- On-Chart Transparency: The AO ladder, average entry, and take-profit target are plotted live, and the status table reports RSI, AOs filled, base/average entry, TP target, and max deployable capital.
🔷 Considerations Before Using the Strategy:
Optimization / Overfitting Risk: The RSI threshold and take-profit were selected by sweeping those parameters over the same historical window shown in the results. Values that were best in-sample are not guaranteed to be best out-of-sample — this is the standard caveat for any optimized parameter. Treat the optimized metrics as the ceiling of what this configuration achieved historically, not as a forward expectation, and re-validate on fresh data before committing capital.
Trade Volume — Below the Statistical Floor: The baseline produced 77 closed trades over ~30 months; the optimized configuration is in the same range. This is below the ~100-trade threshold often used as a floor for statistical relevance, so treat the win rate and profit factor as indicative rather than conclusive.
Martingale Tail Risk: Order sizes scale 1.8× per rung, so the deepest fills are by far the largest. If SOL trends hard below the −25% AO5 level without recovering to take-profit, the position sits fully loaded with no further adds and no stop — unrealized loss can grow until price reverts.
No Stop Loss Justification: There is no exit on adverse moves. Per-order risk is bounded by the fixed ladder allocation; aggregate exposure is capped at base + five AOs (≈ $20,633 on the default $100k account, ~20.6% of equity). Size the base/AO inputs down to match the worst-case exposure you are willing to hold.
Fees: The default commission (0.06% per trade) should be matched to your exchange's actual taker fees.
Demo Testing: Always demo-test before going live. Past results do not guarantee future performance, particularly for martingale-style averaging strategies whose risk profile is dominated by rare deep drawdowns.
🔷 STRATEGY PROPERTIES
Symbol: BYBIT:SOLUSDT.P (Perpetual) — strategy is portable to any SOL / USDT pair.
Timeframe: 4H (RSI sampled on 4h).
Test Period: January 1, 2024 — July 2026 (~30 months).
Initial Capital: 100,000 USDT.
Base Order Size: 500 USDT.
Averaging Orders: 5, at −2% / −5% / −9.5% / −16% / −25% from base entry.
AO Sizing: 1.8× per rung — 900 / 1,620 / 2,916 / 5,249 / 9,448 USDT.
Max Deployed Capital: ≈ 20,633 USDT (~20.6% of equity, all AOs filled).
Commission: 0.06% per trade.
Slippage: 3 ticks.
Entry Filter: 4h RSI(14) below 33 (optimizer-tuned from 28).
Take Profit: 4% above average entry (optimizer-tuned from 3%).
Stop Loss: None — ladder allocation is the structural risk cap.
Trailing: None.
Strategy: Long Only.
🔷 STRATEGY RESULTS (Optimized — RSI < 33, TP 4%)
⚠️ Remember, past results do not guarantee future performance.
Net Profit: +10,399.80 USDT (+10.40%)
Max Equity Drawdown: 5,751.73 USDT (5.32%)
Total Closed Trades:
Percent Profitable:
Profit Factor:
🔷 STRATEGY RESULTS (Baseline — RSI < 28, TP 3%, for comparison)
Net Profit: +5,178.77 USDT (+5.18%)
Max Equity Drawdown: 5,748.16 USDT (5.53%)
Total Closed Trades: 77
Percent Profitable: 67.53% (52 / 77)
Profit Factor: 4.582
🔷 How to Use It:
🔸 Adjust Settings: Open the strategy inputs and confirm the RSI level (default 33), the five AO deviations and sizes, and the Take Profit (default 4%) match your risk profile. Scale the base/AO sizes down for lower exposure.
🔸 Results Review: Run a full-period backtest and confirm Max Drawdown stays within your personal risk band — note the optimized configuration reached 5.32%. Keep in mind the trade sample is below the ~100-trade floor for statistical confidence, and the profit factor reflects that small, optimized sample.
🔸 Create alerts to trigger the DCA Bot: Add one alert on the strategy using "Any alert() function call". Paste your DCA Bot's webhook URL into the alert's Webhook field, and fill the Bot ID, Email Token, and Pair inputs on the script. The base order, each safety order, and the close will each emit a dedicated JSON payload.
🔷 INDICATOR SETTINGS
Base Order Size: Capital committed on the first (base) entry.
AO Deviations: Fixed percentage distances from the base entry where each safety order fires.
AO Sizes: Capital per safety order (1.8× scaling by default).
RSI Timeframe / Length / Level: Oversold filter for the base entry (default 4h, 14, below 33 — optimizer-tuned).
Take Profit (%): Distance above average entry where the full position closes (default 4%, optimizer-tuned).
Bot ID / Email Token / Pair: Webhook fields injected into every alert payload.
Visualization: Toggle the AO ladder, fill labels, avg/TP lines, and status table.
Brand Watermark: Configurable text, position, size, and transparency.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc. Estrategia

Indicador

Indicador

Indicador
