Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Buy/Sell Pressure# **Buy/Sell Pressure**
Buy/Sell Pressure is designed to provide insight into **who is actually controlling the market beneath the surface**. Rather than focusing exclusively on whether price is moving higher or lower, the indicator attempts to determine whether those price movements are being supported by genuine buying interest or genuine selling pressure.
Markets do not always move because one side is aggressively taking control. Sometimes prices drift higher simply because sellers temporarily step aside. Other times, prices fall because buyers become reluctant rather than because sellers are overwhelming the market. Looking at price alone can make these distinctions difficult to recognize.
Buy/Sell Pressure was developed to address that problem.
The indicator combines several different aspects of market behavior into a single, easy-to-read oscillator. By evaluating how price behaves within each bar, how volume participates in those movements, and whether underlying money flow supports the move, it attempts to provide a clearer picture of the balance of power between buyers and sellers.
The goal is not to predict the future. Instead, the goal is to answer a simpler but often more useful question:
> **Who appears to be winning the battle right now: buyers or sellers?**
---
# **What the Indicator Is Measuring**
Buy/Sell Pressure evaluates multiple dimensions of market behavior simultaneously.
It examines where price closes within the range of each bar. A market that consistently closes near the upper portion of its range often reflects persistent buying interest. Conversely, a market that repeatedly closes near the lower portion of its range may indicate sustained selling pressure.
The indicator also evaluates the relationship between opening and closing prices. Large bullish bodies suggest buyers were able to maintain control throughout the period, while large bearish bodies suggest sellers dominated the session. Smaller candle bodies generally indicate indecision or equilibrium between the two sides.
Wick behavior is another important component. Long lower shadows often suggest that sellers attempted to push prices lower but buyers stepped in aggressively enough to reject those lower levels. Long upper shadows may indicate that buyers attempted to push prices higher but encountered significant selling resistance. These subtle forms of rejection can reveal underlying pressure that may not be obvious from price alone.
Volume is then incorporated into the calculation. Price movement occurring during periods of elevated participation tends to carry greater significance than identical price movement occurring during quiet conditions. By weighting certain behaviors according to volume, the indicator attempts to emphasize moves that are supported by broader market involvement.
The indicator also considers money flow and cumulative volume behavior. This helps determine whether capital has generally been flowing into the market or out of it over recent periods. These additional layers of analysis help distinguish meaningful shifts in pressure from ordinary short-term fluctuations.
The result is a composite measure designed to identify whether **buying pressure is strengthening, selling pressure is strengthening, or neither side currently has a meaningful advantage.**
---
# **Understanding the Histogram**
The primary visual component of the indicator is the histogram.
The histogram oscillates around a central zero line. The further the histogram extends away from that centerline, the stronger the underlying pressure is considered to be.
The direction and color of the histogram provide insight into the current balance between buyers and sellers.
---
## **Green Histogram Bars**
Green histogram bars indicate that underlying buying pressure is present.
When the histogram begins printing green bars, it suggests that buyers are exerting increasing influence over market behavior. Price action is becoming increasingly supported by demand rather than simply drifting higher due to a lack of sellers.
As green bars expand in size, the strength of buying pressure is increasing. This often occurs during healthy uptrends, breakout phases, or periods of sustained accumulation.
---
## **Red Histogram Bars**
Red histogram bars indicate that underlying selling pressure is dominant.
These readings suggest that sellers are becoming increasingly aggressive and that downward price movement is being supported by genuine supply entering the market.
As red bars grow larger, selling pressure is intensifying. These conditions frequently accompany strong downtrends, breakdowns, or periods of distribution.
---
## **Gray Histogram Bars**
Gray histogram bars represent neutral conditions.
During these periods, neither buyers nor sellers possess a sufficiently strong advantage to justify a directional reading.
Neutral conditions often occur during:
* Consolidation phases.
* Sideways markets.
* Transitional periods between trends.
* Areas of temporary equilibrium.
Gray bars can serve as a reminder that not every market environment is favorable for directional decision-making.
---
## **Extreme Pressure Conditions**
The indicator also identifies periods when buying or selling pressure becomes unusually strong relative to recent history.
These conditions are represented by brighter shades of green or red.
Extreme readings indicate that conviction is significantly elevated. Buyers or sellers are demonstrating an unusual degree of control compared to what has been considered normal over the selected historical period.
It is important to understand that extreme readings should not automatically be interpreted as reversal signals.
Strong markets can remain strong for extended periods. Likewise, weak markets can continue to weaken. Extreme readings are best viewed as evidence of exceptional pressure rather than immediate exhaustion.
---
# **The Signal Line**
The orange signal line provides a smoother representation of the underlying pressure reading.
Because it is less reactive than the histogram itself, it can help traders focus on broader shifts in pressure rather than becoming distracted by every short-term fluctuation.
A rising signal line generally reflects improving conditions for buyers.
A falling signal line generally reflects strengthening conditions for sellers.
Many users find the signal line useful when assessing whether pressure is accelerating, stabilizing, or beginning to deteriorate.
---
# **Pressure Dots**
The indicator includes optional pressure dots designed to highlight important transitions in market control.
Users can choose between two different methods for generating these signals.
---
## **Zero Cross Mode**
In Zero Cross mode, a green dot appears when pressure crosses above the zero line, while a red dot appears when pressure crosses below zero.
These signals occur relatively early because they identify the point at which the balance of pressure shifts from negative to positive or vice versa.
The advantage of this approach is speed.
The disadvantage is that early signals can occasionally occur during temporary fluctuations that fail to develop into meaningful trends.
---
## **First Colored Bar Mode**
In First Colored Bar mode, dots appear only when pressure moves decisively beyond the neutral zone and the first meaningful buying or selling histogram bar is printed.
Green dots identify the first significant buying bar.
Red dots identify the first significant selling bar.
Because these signals require stronger confirmation, they tend to occur later than zero-cross signals.
However, they are often cleaner and easier to interpret.
This mode is the default setting because it focuses on identifying **meaningful pressure shifts rather than merely technical transitions around the zero line.**
---
# **Understanding the Inputs**
---
## **Confirmed Bars Only (Non-Repainting)**
When enabled, all calculations are based exclusively on completed bars.
This prevents signals from changing after a bar closes and ensures that historical signals accurately reflect what would have been visible in real time.
The tradeoff is that signals appear one bar later.
This setting is enabled by default because reliability is often more valuable than immediacy.
---
## **Show Confirmed Mode Label**
This optional label provides a visual reminder that non-repainting mode is active.
It has no impact on calculations and exists purely for convenience.
The label is disabled by default to preserve a cleaner appearance.
---
## **Pressure Lookback**
This setting controls how persistent underlying pressure must be before the indicator fully reflects it.
Lower values produce a more responsive oscillator that reacts quickly to changing conditions.
Higher values produce a smoother oscillator that emphasizes sustained pressure rather than short-term fluctuations.
The default value of **50** attempts to strike a balance between responsiveness and stability.
---
## **Score Smoothing**
Score Smoothing determines how aggressively the raw pressure calculations are filtered before reaching the final oscillator.
Increasing this value reduces noise but delays transitions.
Decreasing it improves responsiveness but increases sensitivity.
The default value of **5** provides moderate smoothing without excessively sacrificing timeliness.
---
## **Volume Baseline**
Volume Baseline establishes the historical reference used to determine whether current participation levels are unusually high or unusually low.
Higher settings create a more stable volume benchmark.
Lower settings allow the indicator to adapt more quickly to changing market environments.
---
## **Normalization Lookback**
Normalization Lookback determines how much historical information is used when establishing what constitutes "normal" pressure conditions.
Shorter values adapt rapidly but may cause thresholds to shift more frequently.
Longer values create a more stable frame of reference.
The default value of **100** was chosen to emphasize consistency and reduce sensitivity to temporary anomalies.
---
## **Signal Line Length**
This setting controls the responsiveness of the signal line.
Shorter lengths allow the signal line to track pressure more closely.
Longer lengths smooth the signal line and emphasize broader trends.
---
## **Money Flow Length**
Money Flow Length determines how much historical information is used when evaluating whether capital has generally been entering or exiting the market.
Smaller values respond quickly to recent changes.
Larger values emphasize longer-term participation trends.
---
## **OBV Pressure Length**
This setting controls how much cumulative volume history contributes to the assessment of broader buying and selling participation.
Lower values prioritize recent developments.
Higher values place greater emphasis on sustained pressure trends.
---
## **Neutral Zone**
The Neutral Zone defines the boundary separating insignificant pressure from meaningful pressure.
Histogram readings that remain inside this area are considered inconclusive and are displayed using neutral colors.
Reducing the size of the neutral zone increases sensitivity.
Expanding it requires stronger evidence before directional readings are generated.
The default setting of **35** attempts to filter out routine market noise while remaining responsive to meaningful shifts.
---
## **Extreme Level**
The Extreme Level determines when pressure becomes exceptionally strong relative to recent market conditions.
Readings beyond this threshold are highlighted using brighter colors.
These conditions often reflect unusually strong conviction but should not automatically be interpreted as reversal opportunities.
The default value of **75** identifies situations where pressure has become significantly elevated.
---
# **Practical Applications**
Buy/Sell Pressure can be used in a variety of ways.
Many traders use it as a confirmation tool during breakouts. When price breaks through an important level while buying pressure simultaneously strengthens, the move may possess greater credibility.
Others use it to evaluate pullbacks. Temporary declines occurring during periods of weak selling pressure may suggest healthy retracements within larger uptrends. Similarly, weak buying pressure during countertrend rallies may indicate that bearish conditions remain intact.
The indicator can also help identify potential exhaustion. If price continues advancing while buying pressure steadily deteriorates, the underlying trend may be losing support. Likewise, continued price declines accompanied by weakening selling pressure may suggest that bearish momentum is beginning to fade.
Finally, Buy/Sell Pressure can serve as a valuable trade filter. Traders who already possess an established strategy may use the indicator to align themselves with the prevailing side of the market.
---
# **Final Thoughts**
Buy/Sell Pressure was designed to help traders look beyond price itself and focus on the forces driving that price movement.
Rather than asking whether the market moved higher or lower, it asks whether buyers or sellers genuinely supported that move.
By combining price behavior, volume participation, money flow characteristics, and cumulative pressure analysis into a single adaptive framework, the indicator seeks to provide a clearer understanding of market conviction.
Its purpose is not to predict exactly what the market will do next.
Its purpose is to help answer a more immediate and practical question:
> **If a battle is taking place between buyers and sellers, which side currently appears to have the advantage?** Indicator

Indicator

NLMS Adaptive Trend Filter [BackQuant]NLMS Adaptive Trend Filter
Overview
The NLMS Adaptive Trend Filter is a machine learning inspired trend-following indicator built around one of the most important adaptive filtering algorithms in signal processing: the Normalized Least Mean Squares (NLMS) filter .
Unlike traditional moving averages that use fixed weighting schemes, the NLMS filter continuously learns from incoming market data and updates its internal coefficients in real time. Rather than assuming that price behavior remains constant, the filter attempts to adapt its structure as market conditions evolve.
This approach originates from the field of digital signal processing, where adaptive filters have been used for decades in applications such as:
• Telecommunications
• Radar systems
• Echo cancellation
• Noise reduction
• Speech processing
• Control systems
• Financial signal extraction
The goal of this indicator is to bring one of these adaptive filtering concepts into market analysis by creating a trend model that continually adjusts itself based on prediction error rather than relying on static averaging methods.
Historical Background
The roots of the NLMS filter can be traced back to the work of Bernard Widrow and Ted Hoff in the late 1950s and early 1960s.
While working at Stanford University, they developed what became known as the:
Least Mean Squares (LMS) Algorithm
The LMS algorithm was revolutionary because it provided a computationally simple method for training adaptive systems using gradient descent.
Rather than solving a complex optimization problem all at once, the LMS algorithm updates its weights incrementally after each observation.
The basic concept was:
1. Make a prediction.
2. Measure the prediction error.
3. Adjust the model slightly.
4. Repeat indefinitely.
This idea eventually became one of the foundational concepts behind modern machine learning and online optimization.
Many modern neural networks still rely on the same underlying principle:
Error → Gradient → Weight Update
The LMS algorithm later evolved into several variants, one of the most important being:
Normalized Least Mean Squares (NLMS)
NLMS improves stability by scaling weight updates according to the energy of the input signal.
This prevents learning rates from becoming too aggressive during high-volatility periods and too weak during low-volatility periods.
As a result, NLMS became one of the most widely used adaptive filtering algorithms in engineering.
What Makes NLMS Different From Moving Averages?
Traditional moving averages use predetermined weights.
For example:
Simple Moving Average (SMA)
Every observation receives equal weight.
Example:
20-period SMA
Each bar contributes:
1 / 20 = 5%
regardless of market conditions.
Exponential Moving Average (EMA)
Recent observations receive more weight.
The weighting structure is fixed and never changes.
Weighted Moving Average (WMA)
Uses linearly decreasing weights.
Again, the weighting scheme is fixed.
The problem is that markets do not operate under fixed conditions.
Volatility changes.
Trend persistence changes.
Noise levels change.
Market structure changes.
Yet traditional moving averages continue using the exact same weighting model.
NLMS takes a different approach.
Instead of assigning permanent weights, it learns them dynamically.
The filter constantly asks
"What weighting structure would have predicted the current market best?"
It then updates itself accordingly.
The Core Idea Behind Adaptive Filters
Imagine trying to forecast today's price using the previous 20 bars.
A normal moving average assumes a fixed weighting pattern.
An adaptive filter attempts to learn the optimal weighting pattern.
At every bar:
• A prediction is generated.
• Actual price is observed.
• Prediction error is measured.
• Weights are adjusted.
The process repeats indefinitely.
Over time, the filter learns which historical observations are most useful and which are less important.
Understanding Filter Taps
One of the most important concepts in adaptive filtering is the idea of:
Taps
A tap is simply a historical observation used as an input.
If the indicator uses:
20 taps
it means:
Price
Price
Price
...
Price
are all being used to generate the prediction.
Each tap receives a learned weight.
Instead of:
Current Estimate =Average of past 20 bars
the filter becomes:
Current Estimate =
(w1 × Price ) +
(w2 × Price ) +
(w3 × Price )
...
(w20 × Price )
The weights are continuously adjusted through learning.
How Prediction Works
The indicator attempts to estimate current price using previous observations.
Mathematically:
Prediction = Σ(weight × historical price)
This prediction becomes the filter output.
If the prediction is accurate:
Weights change very little.
If the prediction is poor:
Weights adjust more aggressively.
This allows the model to gradually adapt to changing market conditions.
Prediction Error
The engine measures:
Error = Actual Price − Predicted Price
This error drives all learning.
Large error means:
The model is wrong.
Small error means:
The model is performing well.
The objective is to minimize prediction error over time.
The LMS Learning Rule
The original LMS update rule is:
New Weight =Old Weight + Learning Rate × Error × Input
This is effectively a form of gradient descent.
The filter moves its weights in the direction that reduces future prediction error.
This is conceptually identical to many machine learning optimization methods.
Why Normalization Matters
The original LMS algorithm has a weakness.
When input values become very large:
Weight updates can become unstable.
This is particularly problematic in financial markets where volatility constantly changes.
NLMS solves this problem by normalizing updates according to signal energy.
Instead of:
Weight Update ∝ Error
it becomes:
Weight Update ∝ Error / Signal Power
This creates adaptive scaling.
When volatility expands:
Updates automatically shrink.
When volatility contracts:
Updates automatically expand.
This improves stability significantly.
How the Indicator Uses NLMS
The script implements an online one-step predictor.
For every new bar:
1. Previous M bars are gathered.
2. Current price is predicted.
3. Prediction error is calculated.
4. Weight vector is updated.
5. New estimate becomes available.
This process occurs continuously as new data arrives.
Because no future data is used, the filter remains fully causal and suitable for live trading.
Weight Initialization
Initially all weights are equal:
1 / M
This effectively starts the model as a simple moving average.
Over time the filter learns a custom weighting structure based on market behavior.
The initial equal-weight state acts as a neutral prior.
Step Size (μ)
The learning rate controls how aggressively the filter adapts.
Lower values:
• More stable
• Smoother output
• Slower adaptation
Higher values:
• Faster adaptation
• More responsiveness
• Greater noise sensitivity
Think of μ as controlling the intelligence speed of the model.
Small values make it conservative.
Large values make it reactive.
Regularization (ε)
Regularization prevents division by very small values.
Without it:
Periods of extremely low signal power could create unstable updates.
Regularization improves numerical stability and robustness.
It acts as a safety mechanism for the learning process.
Output Smoothing
After the NLMS estimate is generated, an optional EMA can be applied.
This smoothing is not part of the NLMS algorithm itself.
It exists purely for visual clarity.
The raw adaptive filter already contains the learning logic.
The smoothing stage simply reduces small fluctuations.
Setting smoothing to 1 effectively disables it.
Trend Detection
Trend direction is derived from the slope of the adaptive filter.
Bullish:
NLMS Output > Previous Output
Bearish:
NLMS Output < Previous Output
This creates a directional state machine.
Unlike crossover systems, trend changes occur whenever the adaptive estimate changes slope.
Bullish Flips
A bullish signal occurs when:
Trend changes from bearish to bullish.
This means the adaptive filter has transitioned from declining to rising.
Bearish Flips
A bearish signal occurs when:
Trend changes from bullish to bearish.
This means the adaptive filter has transitioned from rising to falling.
Visual Components
The indicator includes several visualization layers.
Adaptive Filter Line
The main output of the NLMS model.
This represents the learned trend estimate.
Gradient Fill
The space between price and filter is colorized.
Price Above Filter:
Bullish shading.
Price Below Filter:
Bearish shading.
This provides immediate visual context regarding trend alignment.
Edge Glow
An ATR-based glow surrounds price.
This helps emphasize directional conditions while improving chart readability.
Trend Candles
Candles can optionally inherit trend coloration.
Green:
Adaptive trend rising.
Red:
Adaptive trend falling.
This allows traders to visualize the model's directional state directly on price.
How It Differs From Traditional Trend Filters
Most trend indicators answer:
"What is the average price?"
NLMS attempts to answer:
"What weighting structure best predicts current price?"
This distinction is extremely important.
The indicator is not simply smoothing price.
It is continuously learning how price behaves.
Traditional indicators use fixed mathematics.
NLMS uses adaptive mathematics.
Strengths
• Self-adjusting weighting structure.
• Adapts to changing market conditions.
• Based on established signal-processing theory.
• Stable due to normalization.
• Less reliant on arbitrary moving-average formulas.
• Learns continuously.
• Fully causal and non-lookahead.
Limitations
• Not a predictive model in the forecasting sense.
• Can still lag during major regime shifts.
• Excessively large learning rates may introduce noise.
• Small tap counts can become unstable.
• Large tap counts can become sluggish.
Like all adaptive systems, there is a tradeoff between responsiveness and stability.
Best Use Cases
The NLMS Adaptive Trend Filter is particularly effective for:
• Trend identification.
• Regime classification.
• Dynamic support/resistance visualization.
• Adaptive trend following.
• Noise reduction.
• Signal confirmation.
Summary
The NLMS Adaptive Trend Filter applies one of the most important adaptive algorithms in modern signal processing to financial markets. Rather than relying on fixed moving-average weights, it continuously learns from prediction error and updates its internal model in real time. Built upon the pioneering work of Widrow and Hoff, the indicator combines adaptive filtering, normalized gradient descent, and online learning principles into a practical trend-following tool that evolves alongside changing market conditions. The result is a trend model that is fundamentally different from traditional moving averages, not because it smooths price differently, but because it learns how to smooth price as new information arrives.
Indicator

Machine Learning: Volume-Weighted Mean Reversion [Dots3Red]█ MACHINE LEARNING: VOLUME-WEIGHTED MEARN REVERSION KERNEL REGRESSION
Nadaraya-Watson kernel regression is a non-parametric machine learning method. Unlike moving averages which apply fixed, predefined weights to historical bars, kernel regression derives each bar's weight from a mathematical function — the kernel — that measures how relevant that bar is to the current estimate. No hardcoded coefficients. No assumed shape. The model adapts purely from the data.
This script introduces a fundamental extension to the standard method: volume as a second weighting dimension . The result is a regression curve that gravitates toward price levels where real market participation occurred — not toward price levels where a clock happened to tick.
█ WHY KERNEL REGRESSION IS MACHINE LEARNING
The term machine learning describes algorithms that derive structure from data rather than from manually specified rules. Kernel regression satisfies this definition formally. The estimator computes:
ŷ = Σ [ w(i) × close ] / Σ
where each weight w(i) is determined by a kernel function — not by the programmer. The model decides, from the data, how much each historical bar should influence the current estimate. This is the same mathematical family as K-Nearest Neighbors, which weights neighbors by proximity. It is cited as a foundational non-parametric ML method in Bishop (2006) and Hastie et al. (2009), and is described as an attention mechanism in deep learning literature — the same concept behind transformer models. The claim is accurate, not cosmetic.
█ THE CORE INNOVATION — VOLUME WEIGHTING
Every existing Nadaraya-Watson implementation on PulseWire uses a pure time kernel:
• Standard NW: w(i) = K(i/h)
This means a bar with 10,000 shares traded and a bar with 10,000,000 shares traded receive identical weight if they are the same number of bars away. A thin overnight drift and a high-volume institutional session influence the regression equally. That is statistically incorrect — volume is a direct measure of how much informational content a price bar carries.
This script uses a volume-weighted kernel:
• This script: w(i) = vol_norm(i) × K(i/h)
where vol_norm(i) is the bar's volume normalized against the peak volume in the lookback window, raised to a configurable power exponent. The regression estimate is therefore:
ŷ = Σ [ vol_norm(i) × K(i/h) × close ] / Σ
High-volume bars anchor the curve. Low-volume bars — thin sessions, overnight drift, holiday trading — contribute minimally. The regression finds where the market actually agreed on price, not just where the clock recorded a tick.
█ THREE KERNEL FUNCTIONS
All three apply the same volume weighting. The choice controls how rapidly influence decays with time distance:
• Rational Quadratic (default) — heavier tail than Gaussian. Bars from 40–60 periods ago still contribute meaningfully if they had high volume. Best for daily and weekly charts where old high-volume levels remain structurally relevant.
• Gaussian — standard bell curve decay. Weight drops sharply with distance. Best for intraday charts where recency matters more than historical anchors.
• Epanechnikov — hard cutoff at the bandwidth boundary. Anything beyond h periods receives zero weight. Produces the most locally sensitive regression. Best for fast charts requiring tight responsiveness.
█ SIGNAL LOGIC
The envelope bands are placed at a configurable multiple of ATR, standard deviation, or a fixed percentage above and below the regression line. Three band width methods are available to match different volatility contexts.
Two signal modes are available:
• Reversion mode (default) — a signal fires when price crosses back through the band after an extension. The ▲ label appears on the bar where price returns inside the lower band. The ▼ label appears on the bar where price returns inside the upper band. This confirms reversion has begun rather than anticipating it.
• Extension mode — enable Signal on extension close to fire a signal the moment price closes outside a band. This is an early warning — useful for alerts before the reversion bar arrives.
Additional signal filters: minimum bars between signals to prevent repeat firing, optional slope direction gate so signals only fire when the regression slope agrees with the signal direction.
█ WHAT YOU SEE ON THE CHART
Regression line
The volume-weighted fair value curve. Cyan when slope is rising, magenta when falling. This is where the model estimates price should be given the recent history of high-participation price levels.
Envelope bands
Upper and lower boundaries built from ATR, standard deviation, or a fixed percentage. The upper band is tinted red — resistance zone. The lower band is tinted green — support zone.
Bar coloring — 4 states
• Bright red — price closed above the upper band. Extended, statistically stretched above fair value.
• Bright green — price closed below the lower band. Extended, statistically stretched below fair value.
• Dim silver — price inside bands, regression rising or falling, i.e normal bullish or bearish context.
The contrast between fully saturated outside-band bars and dimmed inside-band bars makes overextension immediately visible without reading the scale.
Signal labels
▲ REVERT or ▼ REVERT with VW=XX% showing the volume weight of the signal bar. A signal at VW=85% fired on a high-participation bar. A signal at VW=9% fired on a thin bar — lower confidence.
Signal bar highlighting
Two additional layers available: a background flash on the signal bar and a thick vertical line through the bar's full range. Both are independently toggleable. The vertical line uses width=4 — the maximum Pine Script allows — making the signal bar visually distinct even when zoomed out.
Dashboard
Displays: current regression value, slope direction, band width, Bar Vol Weight meter (▰▰▰▱▱▱) showing how much influence the current bar has on the regression, active kernel type, volume weighting status, percentage distance from the regression midline, and non-repainting mode status.
█ NON-REPAINTING
When Non-Repainting Mode is enabled (default), all calculations use a bar offset. The current bar's close does not enter its own regression estimate. Historical signals visible on closed bars will not change as new bars form. Disable this to see a predictive (repainting) version where the current bar participates in its own estimate — useful for visual exploration but not recommended for backtesting or alerts.
█ HOW TO USE
Core use case — mean reversion
This is a mean reversion tool. It works best when price is oscillating rather than trending directionally. The recommended workflow:
1 — Confirm a ranging regime with a separate regime classifier before acting on signals.
2 — Wait for price to reach or pierce the upper or lower band (bars turn bright red or green).
3 — Check the VW% in the signal label. Higher volume weight on the signal bar = higher confidence.
4 — Enter on the reversion signal (▲ or ▼ label). Stop beyond the wick of the signal bar.
5 — Target the regression midline as the primary exit. The % from mid dashboard row tracks progress in real time.
Timeframe guidance
The volume-weighting advantage increases with timeframe because higher timeframes produce more meaningful volume data per bar. H4 and Daily are the strongest timeframes for this tool. For intraday use, reduce the Volume Weight Power to 0.3–0.5 to soften the impact of individual volume spikes.
Quick-start settings by asset class
• Stocks daily: Window=100, Bandwidth=8, Vol Power=1.0, ATR×2.0
• Crypto daily: Window=80, Bandwidth=6, Vol Power=0.7, ATR×1.8
• Forex H4: Window=100, Bandwidth=10, Vol Power=1.0, ATR×1.5
• Indices H1: Window=120, Bandwidth=12, Vol Power=0.8, Stdev×2.0
█ SETTINGS REFERENCE
Kernel Settings
• Lookback Window — number of historical bars in the regression. Larger = smoother, more lag.
• Bandwidth (h) — controls how fast kernel weight decays with time. Higher = older bars still contribute.
• Kernel Type — Gaussian / Rational Quadratic / Epanechnikov. See kernel section above.
• RQ Alpha (α) — Rational Quadratic only. Lower = smoother mixture of length scales.
• Non-Repainting Mode — uses offset. Recommended ON for backtesting.
Volume Weighting
• Enable Volume Weighting — toggle the core innovation on or off. OFF = standard NW.
• Volume Normalization Window — peak volume reference window. Match or exceed the lookback window.
• Volume Weight Power — exponent on the volume weight. 1.0 = linear. 2.0 = quadratic. 0.5 = softer.
• Volume Weight Floor — minimum weight for any bar. Prevents zero-volume bars from being ignored entirely.
Envelope Bands
• Band Width Method — ATR (volatility-adaptive), Stdev (statistical), or Percent (fixed).
• ATR Length — period for ATR calculation.
• ATR / Stdev Mult — multiplier applied to ATR or standard deviation.
• Percent Offset % — used when Percent method is selected.
Signals
• Signal on band crossover — enable signals on band cross events.
• Signal on extension close — fire signal when price closes outside a band (early warning mode).
• Require slope change — only signal when regression slope direction agrees.
• Min bars between signals — gap guard to prevent repeat signals.
Visuals
• Dashboard — regression stats and live metrics table.
• Signal labels — ▲/▼ REVERT labels with volume weight percentage.
• Band fill — fill between upper and lower bands.
• Background flash — bright background color on signal bars.
• Vertical line on signal bar — thick line through full bar height at signal.
• Large dot marker — additional plotchar layer on signal bars.
• Dashboard position — Top Right / Top Left / Bottom Right / Bottom Left.
█ ALERTS
Seven alert conditions are available:
• Long signal — reversion through lower band
• Short signal — reversion through upper band
• Any signal — either direction
• Extended below lower band — early warning before reversion fires
• Extended above upper band — early warning before reversion fires
• Regression slope turned bullish
• Regression slope turned bearish
█ DISCLAIMER
This indicator is a decision-support tool. It does not constitute financial advice and does not guarantee future results. Past statistical patterns do not predict future price behavior. Always use proper risk management.
Method: Nadaraya-Watson Kernel Regression (Non-Parametric ML)
Innovation: Volume × Time Kernel Weighting
Kernels: Gaussian · Rational Quadratic · Epanechnikov
Signals: Mean Reversion (band crossover or extension)
Repainting: Configurable — non-repainting mode available Indicator

[3Commas] SOL RSI Reversal DCA - Short StrategySOL RSI Reversal DCA — Short Strategy
🔷 What it does:
This is a short-only DCA strategy that fades overbought momentum on SOL / USDT. A short deal opens when the 3-minute RSI(9) crosses down through 80 — a momentum-exhaustion signal after a fast push higher. Up to three averaging orders then fill at fixed deviations ABOVE the base entry (+1%, +2%, +3%) with uniform sizing, pulling the average entry up if price keeps rising. Exit is a 1.3% Take Profit from the average entry with a 0.3% trailing retrace, and a hard 8% Stop Loss caps the downside.
- Single base order plus up to three uniform averaging orders on a fixed +1% / +2% / +3% ladder.
- Tight 1.3% Take Profit with a 0.3% trailing lock — captures the mean-reversion snap-back, then trails to squeeze a little extra.
- Hard 8% Stop Loss closes the trade if the short keeps running against the position — a real, bounded per-trade risk.
- Every entry, averaging order, and exit emits a webhook-ready JSON alert payload for direct DCA Bot consumption.
🔷 Who is it for:
- Intraday traders fading overbought spikes on SOL on lower timeframes.
- Bot operators who want to drive a DCA Bot short deal from PulseWire alerts with per-event JSON payloads.
- Traders who want a mechanical short with a defined stop, modest averaging, and a quick profit target rather than an open-ended hold.
- Portfolio operators looking for a high-win-rate, short-side contributor with bounded risk.
🔷 How does it work:
Entry Trigger: A 3-minute RSI(9) is sampled via request.security with lookahead disabled (no repaint). The base short opens when that RSI crosses DOWN through 80 — i.e., the prior 5m close was ≥ 80 and the current is below it, marking the moment overbought momentum rolls over.
Base Order: Sized at 500 USDT default (5% of 10k capital), placed as a Limit order at the signal bar's close (Market toggle available).
Averaging Orders (Uniform DCA Ladder): After the base fill, the strategy monitors price deviation above the base entry. Each averaging order has a fixed deviation — +1%, +2%, +3% — with uniform sizing (250 USDT each, half the base). If price rises against the short, each rung adds size and raises the average entry, so a smaller reversal is needed to reach Take Profit.
Exit (TP + Trailing): A 1.3% Take Profit below the running average entry arms a trailing exit. Once price trades through the TP level, the strategy tracks the in-favor low and closes when price retraces 0.3% off that low — locking the move while letting it extend.
Stop Loss: A hard 8% Stop Loss above the average entry. If price runs against the short past that level, the position closes at market. This is the strategy's defined, bounded per-trade risk.
🔷 Why it's unique:
- Momentum-Exhaustion Trigger: Rather than shorting any overbought reading, the deal opens specifically on the RSI crossing DOWN through 80 — the rollover moment — which filters out trades that fire while momentum is still climbing.
- Defined-Risk DCA: Most martingale DCA shorts run without a stop. This one keeps a modest 3-rung uniform ladder AND an 8% hard stop, so the worst-case loss per deal is bounded and known in advance.
- Trailing Take Profit: The 1.3% target arms a 0.3% trailing exit rather than a fixed limit — capturing the reversion snap and then riding any follow-through.
- DCA Bot Integration: Every event (base, AO 1–3, exit) emits a fully-formed JSON alert payload. Connect one alert to a DCA Bot's webhook URL and the strategy drives the bot end-to-end without any glue layer.
🔷 Considerations Before Using the Strategy:
Sample Size: The backtest produced exactly 100 closed trades — at the commonly used floor for statistical relevance, not far above it. The 87% win rate and 1.955 profit factor reflect favorable conditions over the test window; treat them as indicative rather than a forward-performance guarantee. Extend the window or run across multiple assets to build a larger sample.
Lower-Timeframe Sensitivity: The strategy was tested on a 3-minute chart with a 5-minute RSI trigger. Lower timeframes generate more signals but are more sensitive to noise and fees. Confirm the trade frequency and fee drag fit your execution venue before deploying.
Stop Loss Discipline: The 8% Stop Loss is the defining risk control. With the base plus three averaging orders, maximum deployed capital is ~1,250 USDT (12.5% of default equity); an 8% stop on that position bounds the worst-case loss to roughly 1% of equity. Keep the stop enabled — removing it converts this into an unbounded martingale short.
Trend Risk: Fading overbought conditions works best in ranges and choppy regimes. In a strong, sustained uptrend the short can hit the 8% stop repeatedly. The RSI-crossing-down trigger reduces but does not eliminate this; pair with regime awareness.
Commission Calibration: The default 0.06% commission is calibrated for Bybit perpetual taker conditions. Match it to your exchange's actual fees — on a high-frequency lower-timeframe strategy, fee mismatch materially shifts results.
🔷 STRATEGY PROPERTIES
Symbol: BYBIT:SOLUSDT.P (Perpetual) — portable to any SOL / USDT pair.
Timeframe: 3M chart (5M RSI trigger).
Test Period: March 16, 2026 — June 8, 2026 (~2.8 months).
Initial Capital: 10,000 USDT.
Order Size: 500 USDT base (5%) + 3 averaging orders of 250 USDT each (uniform).
Max Capital Deployed: ~1,250 USDT per trade (~12.5% of equity).
Commission: 0.06% per trade.
Slippage: 3 ticks.
Margin for Short Positions: 100% (1× leverage, Isolated in source config).
Indicator Settings: Default Configuration.
Base Order: 500 USDT, Limit by default (Market toggle available).
Entry Trigger: 3m RSI(9) Crossing Down 80.
Averaging Orders: 3 with fixed deviations +1% / +2% / +3% above base entry; uniform 250 USDT sizing.
Take Profit: 1.3% below average entry, with 0.3% trailing.
Stop Loss: 8% above average entry (hard close).
Strategy: Short Only.
🔷 STRATEGY RESULTS
⚠️ Remember, past results do not guarantee future performance.
Net Profit: +208.29 USDT (+2.08%)
Max Equity Drawdown: 214.94 USDT (2.11%)
Total Closed Trades: 100
Percent Profitable: 87.00% (87 / 100)
Profit Factor: 1.955
🔷 How to Use It:
🔸 Adjust Settings: Open the strategy inputs and review the Base Order Size, the averaging-order count/deviation/size, the RSI trigger level, the Take Profit and Trailing percentages, and the Stop Loss. Defaults mirror the source DCA Bot configuration — recalibrate per asset and timeframe.
🔸 Results Review: This configuration produced 100 closed trades over the test window — at the ~100-trade floor for statistical relevance. Confirm the win rate, drawdown, and trade frequency fit your risk tolerance before deploying capital.
🔸 Create alerts to trigger the DCA Bot: Add one alert on the strategy using "Any alert() function call". Paste the 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 strategy will emit JSON payloads for entry, each averaging order, and exit — formatted for direct DCA Bot consumption.
🔷 INDICATOR SETTINGS
Base Order Size (USDT): USDT amount opened on the initial short.
Use LIMIT for Base: Toggle between Limit (default) and Market entry.
Averaging Orders per Trade: Number of safety orders (default 3).
First AO Size (USDT): Size of each averaging order (uniform by default).
Deviation to First AO (%) / Deviation Step Multiplier: Spacing of the AO ladder above base entry. Defaults to uniform +1% steps.
Order Size Multiplier: Per-rung size scaling (1.0 = uniform).
RSI Timeframe / Length / Crossing Down Level: The 5m RSI(9) crossing-down trigger for the base short.
Take Profit (%) / Trailing (%): TP distance below average entry and the trailing retrace that closes the position.
Stop Loss (%): Hard stop above average entry.
DCA Bot Webhook: Bot ID, Email Token, and Pair fields injected into every alert payload.
Visualization: Toggle DCA Ladder, Avg / TP / SL plot lines, fill labels, 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 PulseWire 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. Strategy

Indicator

Indicator

Masterflow### MasterFlow — Smart Market Structure & Higher Timeframe Framework
**MasterFlow** is an all-in-one trading framework designed to help traders align with higher timeframe bias, identify key support and resistance levels, and understand market structure without cluttering the chart.
Built around trend, opening prices, and dynamic support/resistance concepts, MasterFlow combines multiple institutional-style tools into a single indicator.
### Features
🔹 **EMA Trend Band**
* 21 EMA and 48 EMA dynamic trend band
* Automatically colors candles based on their position relative to the EMA band
* Quickly identifies bullish, bearish, and neutral market conditions
* Adjustable timeframe visibility and custom color settings
🔹 **PO3 Opening Lines**
* Automatically plots higher timeframe opening prices on lower timeframes
* Includes vertical session markers and opening price levels
* Helps traders identify important Power of Three (PO3) reference points
* Auto-adjusts based on the current chart timeframe
🔹 **4H Support & Resistance Engine**
* Projects support and resistance from the previous three completed 4-hour candles
* Tracks both candle open and close levels
* Automatically updates when levels flip from support to resistance (or vice versa)
* Removes invalidated levels after confirmed breaks
* Designed specifically for intraday traders using lower timeframes
🔹 **15M Self Support & Resistance**
* Displays support and resistance derived from the most recent 15-minute candles
* Ideal for 1-minute execution traders
* Dynamic level flipping and invalidation logic
* Provides short-term intraday structure references
🔹 **Daily, Weekly & Monthly Opening Prices**
* Displays current and historical:
* Daily Open
* Weekly Open
* Monthly Open
* Fully customizable colors, styles, and visibility
* Excellent for identifying key institutional reference levels
### Best Used For
✅ Futures Trading
✅ Forex/ Crypto Trading
✅ Indices (NQ, ES, DAX, etc.)
✅ Intraday Trading
✅ Market Structure Analysis
✅ Higher Timeframe Bias Identification
### Why MasterFlow?
Instead of loading multiple indicators to determine trend, support/resistance, session levels, and higher timeframe opens, MasterFlow brings everything together into one streamlined workflow.
The goal is simple:
**Trade with the higher timeframe, execute with precision, and keep your chart clean.**
*For educational purposes only. Not financial advice.*
Indicator

Indicator

Empirical Mode Decomposition Trend Helix [forexobroker]Empirical Mode Decomposition Trend Helix applies a simplified EMD sift to separate price into a trend residual and a high-frequency intrinsic mode (IMF1). Rather than relying on a fixed-length moving average, the trend is built from the mean of local upper and lower envelopes, then re-sifted for smoothness. Trade signals fire only when the high-frequency component crosses zero in the direction of the larger trend slope. The unique angle is bringing a Huang-style adaptive decomposition concept into Pine using rolling extrema as a tractable envelope proxy.
🔶 ALGORITHM
1. Take rolling local maxima and minima of close over the extrema window (default 10) using highest/lowest.
2. Smooth each into an upper envelope and a lower envelope by SMA of the envelope smoothing length (default 5).
3. Mean envelope m_t = (upper + lower) / 2 is the trend residual for this iteration.
4. Repeat the sift the configured number of iterations (default 2), using the previous m_t as the input each round.
5. IMF1 (high-frequency component) = close minus the final trend.
6. Slope of the trend over the slope lookback (default 5 bars) defines direction; bullish if slope greater than zero (plus min-slope threshold), bearish if less than minus the threshold.
7. Signals: IMF1 zero-crossings aligned with trend direction.
🔶 SIGNAL LOGIC
- Buy: IMF1 crosses above zero AND trend slope is positive AND position is not already long AND session filter passes AND cooldown bars elapsed AND barstate.isconfirmed.
- Sell: IMF1 crosses below zero AND trend slope is negative AND position is not already short AND session filter passes AND cooldown bars elapsed AND barstate.isconfirmed.
Cross-direction confirmation prevents trading mean-reversion bounces against the underlying trend residual.
🔶 INPUTS
- EMD Sift group: extrema window default 10, envelope smooth default 5, sift iterations default 2, slope lookback default 5.
- Signal Logic group: cooldown bars default 15, min slope (price units) default 0.
- Filters group: session restriction default 0000-2400.
- Visual group: show trend helix, dashboard, 3-layer glow, helix gradient colors, buy/sell colors, dashboard background.
🔶 ALERTS
EMD Buy, EMD Sell, EMD Any Signal, EMD IMF1 Up, EMD IMF1 Down, EMD Trend Turn Up, EMD Trend Turn Dn, EMD Big Excursion, EMD Close Over, EMD Close Under, EMD Webhook JSON.
🔶 LIMITATIONS
- This is a simplified EMD: rolling extrema and SMA envelopes are not the cubic-spline envelopes of formal Huang EMD; expect smoother but less curvature-aware decomposition.
- The sift uses fixed iterations rather than a stoppage criterion, so it does not guarantee a true zero-mean IMF.
- Trend slope is a local linear estimate; long pauses or gaps can flip the slope sign transiently.
- The envelope smoothing introduces lag of roughly half the envelope window into the trend output.
- Signals require simultaneous IMF zero-cross and slope alignment, so during sideways markets the indicator will be quiet by design.
Indicator

Indicator

Detrend Cycle Oscillator [forexobroker]Detrend Cycle Oscillator estimates the dominant cycle in price by autocorrelation argmax search, then detrends close by an SMA of half that cycle and rescales the residual by ATR into a volatility-normalized oscillator. The unique angle is letting the data choose the SMA length: instead of guessing "21" or "55", the oscillator's lookback adapts to the cycle the market is actually running, bounded to the lag search range.
🔶 ALGORITHM
1. For each lag k in (defaults 5 to 50), compute the rolling Pearson correlation between close and close over the correlation window (default 30).
2. k_dom = argmax over k of that correlation; the strongest auto-similar lag is the dominant cycle.
3. Detrended price = close minus SMA(close, round(k_dom / 2)).
4. Oscillator = detrended / ATR(14) — volatility-scaled and unitless.
5. Smoothed oscillator = EMA of the oscillator over the oscillator EMA length (default 3).
6. Zero-crossings of the raw oscillator gate the signals; the smoothed oscillator must exceed the threshold (default 0.5) in the same direction.
🔶 SIGNAL LOGIC
- Buy: oscillator crosses up through zero AND smoothed oscillator is greater than +threshold AND position is not already long AND session filter passes AND cooldown bars elapsed AND barstate.isconfirmed.
- Sell: oscillator crosses down through zero AND smoothed oscillator is less than -threshold AND position is not already short AND session filter passes AND cooldown bars elapsed AND barstate.isconfirmed.
The smoothed threshold acts as a regime filter so a single noisy bar cannot trigger the indicator.
🔶 INPUTS
- Cycle Estimation group: min cycle lag default 5, max cycle lag default 50, correlation window default 30, ATR length default 14, oscillator EMA default 3.
- Signal Logic group: smoothed threshold default 0.5, cooldown bars default 15.
- Filters group: session restriction default 0000-2400.
- Visual group: dashboard, 3-layer glow, oscillator and smoothed colors, dashboard background.
🔶 ALERTS
DCO Buy, DCO Sell, DCO Any Signal, DCO Zero Cross Up, DCO Zero Cross Dn, DCO Overbought, DCO Oversold, DCO Cycle Shift, DCO Strong Lock, DCO Weak Lock, DCO Webhook JSON.
🔶 LIMITATIONS
- Autocorrelation argmax is sensitive to the correlation window; very short windows produce unstable cycle estimates.
- The lag search is bounded to ; true cycles outside the range will be misreported as the nearest bound.
- During strong directional moves the dominant cycle estimate degrades because autocorrelation is dominated by the trend rather than periodicity.
- The detrend uses an SMA of half the dominant cycle (rounded), introducing the usual SMA lag.
- The threshold filter reduces but does not eliminate whipsaws in low-volatility regimes.
Indicator

Indicator
