Efficiency Ratio Adaptive Moving Average (ERAMA)Efficiency Ratio Adaptive Moving Average (ERAMA)
Efficiency Ratio Adaptive Moving Average (ERAMA) is a smooth adaptive moving average that uses Kaufman's Efficiency Ratio to shift between fast and slow EMA behavior. It then applies WMA and EMA smoothing followed by length-adjusted lag reduction.
The objective is to combine three useful properties in one line: adapt to the directional efficiency of recent price movement, maintain a visually stable baseline, and recover part of the delay introduced by smoothing. ERAMA adjusts the balance between smoothness and responsiveness using current and historical data.
How ERAMA Is Calculated
1. Efficiency Ratio
ERAMA first measures how efficiently the selected Source has moved over the ER Length:
Change = |Source − Source from ER Length bars ago|
Volatility = Sum of |Source − Previous Source| over the ER Length
ER = Change ÷ Volatility
The Efficiency Ratio is bounded between 0 and 1:
• ER near 1 — most movement contributed to net progress in one direction
• ER near 0 — price traveled back and forth with little net progress
Because both Change and Volatility scale with price movement, ER is independent of the instrument's nominal price level.
2. Efficiency-Adaptive EMA Blend
The Fast and Slow lengths create two conventional EMAs of the selected Source:
Fast EMA = EMA(Source, Fast Length)
Slow EMA = EMA(Source, Slow Length)
ERAMA blends these two lines using the current Efficiency Ratio:
Adaptive = Slow EMA + ER × (Fast EMA − Slow EMA)
When ER is high, Adaptive moves closer to the Fast EMA. When ER is low, it stays closer to the Slow EMA. Intermediate ER values produce a proportional blend between the two.
This construction uses Kaufman's Efficiency Ratio as an adaptive weight, but it is not the standard recursive Kaufman Adaptive Moving Average (KAMA) formula.
3. WMA and EMA Smoothing
The adaptive blend passes through two smoothing stages:
WMA Base = WMA(Adaptive, WMA Smooth Length)
Smoothed = EMA(WMA Base, EMA Smooth Length)
The WMA gives greater weight to recent observations. The following EMA softens residual variation and determines the main output horizon. Higher values create a steadier line but also introduce more delay.
4. Length-Adjusted Lag Reduction
ERAMA compares the Smoothed line with an EMA-smoothed version of itself:
Responsiveness Scale = Min(1, 50 ÷ EMA Length)^Responsiveness Length Decay
Effective Responsiveness = Responsiveness × Responsiveness Scale
ERAMA = Smoothed + Effective Responsiveness ×
The difference between Smoothed and EMA(Smoothed) acts as a DEMA-style lag correction. A Responsiveness value of 0 disables this correction. A value of 1 applies the full correction before length scaling.
For EMA lengths of 50 or less, Responsiveness Scale equals 1. Above 50, the scale decreases gradually according to Responsiveness Length Decay. This keeps one Responsiveness setting practical across short and long EMA lengths. A decay value of 0 disables length-based scaling.
The Mathematical Idea
ERAMA separates adaptation, smoothing, and lag reduction into distinct stages.
The Efficiency Ratio controls the position between two already-defined EMA responses. WMA and EMA then create a stable output baseline. Finally, a partial DEMA-style correction restores part of the response lost to smoothing. The correction is reduced progressively for longer EMA lengths, where the distance between a line and its second EMA can otherwise become disproportionately large.
This is a causal construction: every stage uses only current and past data. The lag-reduction term can increase turning sensitivity and may create overshoot at aggressive settings, but the Responsiveness and Responsiveness Length Decay controls make that tradeoff explicit.
Characteristics and Advantages
• Efficiency-based adaptation using a bounded 0-to-1 ratio
• Interpretable Fast and Slow EMA anchors
• WMA and EMA smoothing for a stable visual baseline
• Adjustable partial-DEMA lag reduction
• Automatic responsiveness scaling for longer EMA lengths
How to Read ERAMA
Read ERAMA through its slope, its position relative to price, and the behavior of price around the line.
Slope
A rising ERAMA indicates that the smoothed adaptive baseline is moving higher. A falling ERAMA indicates that it is moving lower. A flattening line suggests weaker directional progress or a transition between trend phases.
Price Position
Price holding above a rising ERAMA supports a bullish directional interpretation. Price holding below a falling ERAMA supports a bearish interpretation. Repeated crossings often occur when price is rotating around the adaptive baseline or directional control is weak.
Distance and Reversals
A widening distance between price and ERAMA can reflect strong momentum or extension from the baseline. The lag-reduction stage helps ERAMA respond sooner when the smoothed path turns.
Understanding the Settings
Source
Selects the price series used by ERAMA. The default is HLCC4: the average of High, Low, Close, and Close.
ER Length
Controls the period used to measure directional efficiency. Lower values react to recent path changes sooner. Higher values evaluate efficiency over a broader window.
Fast Length
Sets the Fast EMA used by the adaptive blend. Lower values make the high-efficiency response faster. Fast Length must be lower than Slow Length.
Slow Length
Sets the Slow EMA used by the adaptive blend. Higher values make the low-efficiency response more conservative. Slow Length must be higher than Fast Length.
Responsiveness
Controls the strength of the lag-reduction term. A value of 0 uses the fully smoothed line. Higher values reduce more lag but can increase turning sensitivity and overshoot.
Responsiveness Length Decay
Controls how strongly Responsiveness decreases for EMA lengths above 50. Higher values apply more reduction to long-period lines. A value of 0 uses the same Responsiveness at every EMA length.
WMA Smooth Length
Controls the first smoothing stage. Higher values produce a steadier line with more delay.
EMA Smooth Length
Controls the primary output horizon and the period used by the lag-reduction EMA. Higher values create a smoother, slower baseline.
Default Configuration
Source: HLCC4
ER Length: 10
Fast Length: 2
Slow Length: 30
Responsiveness: 0.88
Responsiveness Length Decay: 0.15
WMA Smooth Length: 12
EMA Smooth Length: 20
Practical Use
ERAMA can serve as an adaptive trend baseline, directional filter, pullback reference, or trade-management guide. It is intended for traders who prefer to interpret slope and price structure directly.
Responsiveness can be tuned to emphasize steadier trend tracking or earlier reactions to short-term changes. The settings can be adapted to the instrument, timeframe, and intended holding period.
---
Efficiency Ratio Adaptive Moving Average (ERAMA)
Efficiency Ratio Adaptive Moving Average(效率比率自適應移動平均線)是一條平滑的自適應移動平均線。它利用考夫曼效率比率(Efficiency Ratio),在快速與慢速 EMA 之間調整,再依次套用 WMA、EMA 平滑及按長度調整的延遲縮減。
ERAMA 的目標,是在一條線內結合三項特性:根據近期價格移動的方向效率作出適應、維持視覺穩定的基準,以及追回部分平滑所造成的延遲。ERAMA 使用目前及歷史資料,調整平滑度與反應速度之間的平衡。
ERAMA 如何計算
1. 效率比率
ERAMA 先衡量所選 Source 在 ER Length 期間內的移動效率:
變化 = |目前 Source − ER Length 之前的 Source|
波動 = ER Length 內每根 K 線之 |Source − 前一個 Source| 總和
ER = 變化 ÷ 波動
效率比率保持在 0 至 1 之間:
• ER 接近 1 — 大部分移動形成單一方向的淨進展
• ER 接近 0 — 價格反覆來回,總路徑較長但淨進展有限
由於變化與波動都會隨價格移動幅度同比例改變,因此 ER 不受商品名義價格水平影響。
2. 效率自適應 EMA 混合
Fast 與 Slow 長度會從所選 Source 建立兩條傳統 EMA:
Fast EMA = EMA(Source,Fast Length)
Slow EMA = EMA(Source,Slow Length)
ERAMA 使用目前的效率比率混合兩條線:
Adaptive = Slow EMA + ER ×(Fast EMA − Slow EMA)
ER 偏高時,Adaptive 會靠近 Fast EMA;ER 偏低時,則靠近 Slow EMA。介乎兩者之間的 ER 會按比例混合兩條 EMA。
這個結構使用考夫曼效率比率作為自適應權重,但並不是標準的遞迴考夫曼自適應移動平均線(KAMA)公式。
3. WMA 與 EMA 平滑
自適應混合結果會通過兩層平滑:
WMA Base = WMA(Adaptive,WMA Smooth Length)
Smoothed = EMA(WMA Base,EMA Smooth Length)
WMA 對較近期數值給予更高權重,後續 EMA 則柔化剩餘變化,並決定主要輸出週期。較高數值會令線條更穩定,但亦會增加延遲。
4. 按長度調整的延遲縮減
ERAMA 會比較 Smoothed 與其 EMA 平滑版本:
Responsiveness Scale = Min(1,50 ÷ EMA Length)^Responsiveness Length Decay
Effective Responsiveness = Responsiveness × Responsiveness Scale
ERAMA = Smoothed + Effective Responsiveness ×
Smoothed 與 EMA(Smoothed)之間的差值形成 DEMA 式延遲修正。Responsiveness 設為 0 會停用修正;設為 1 則代表在長度縮放前套用完整修正。
EMA Length 為 50 或以下時,Responsiveness Scale 等於 1。高於 50 後,縮放值會按照 Responsiveness Length Decay 逐步下降,令同一組 Responsiveness 設定可以較合理地跨越短期及長期 EMA 使用。Decay 設為 0 會停用按長度縮放。
數學設計
ERAMA 把自適應、平滑及延遲縮減分成三個獨立階段。
效率比率控制結果在兩條既定 EMA 反應之間的位置;WMA 與 EMA 形成穩定輸出基準;最後的部分 DEMA 式修正,追回一部分因平滑而失去的反應速度。對較長 EMA 而言,線條與其第二層 EMA 之間的差距可能較大,因此修正會隨長度逐步降低。
整個結構只使用目前及過往資料。延遲縮減可提高轉向靈敏度,較進取的設定亦可能產生超調;Responsiveness 與 Responsiveness Length Decay 讓這項取捨可以直接調整。
特性與優點
• 使用 0 至 1 有界效率比率作出適應
• Fast 與 Slow EMA 具有清晰可解釋的反應界線
• WMA 與 EMA 平滑形成穩定視覺基準
• 可調整的部分 DEMA 式延遲縮減
• 長週期 EMA 自動降低反應修正
如何閱讀 ERAMA
閱讀 ERAMA 時,應觀察線條斜率、價格相對位置,以及價格在線條附近的行為。
斜率
ERAMA 上升表示平滑後的自適應基準正在提高;ERAMA 下跌表示基準正在降低。線條逐漸走平,通常代表方向進展減弱,或市場正處於趨勢轉換階段。
價格位置
價格維持在上升 ERAMA 之上,可支持偏多方向判斷;價格維持在下降 ERAMA 之下,可支持偏空判斷。價格反覆穿越 ERAMA,通常出現在價格圍繞自適應基準旋轉,或方向控制偏弱的市況。
距離與轉向
價格與 ERAMA 的距離擴大,可能反映動能增強或價格已偏離基準。延遲縮減讓 ERAMA 在平滑路徑轉向時較早反應。
設定說明
Source
選擇 ERAMA 使用的價格序列。預設為 HLCC4,即 High、Low、Close、Close 的平均值。
ER Length
控制衡量方向效率的期間。較低數值會更快反映近期路徑變化;較高數值則在較廣時間範圍內評估效率。
Fast Length
設定自適應混合使用的 Fast EMA。較低數值會加快高效率市況下的反應。Fast Length 必須低於 Slow Length。
Slow Length
設定自適應混合使用的 Slow EMA。較高數值會令低效率市況下的反應更保守。Slow Length 必須高於 Fast Length。
Responsiveness
控制延遲縮減項的強度。設為 0 時使用完整平滑後的線條;較高數值會追回更多延遲,但亦可能提高轉向靈敏度及超調。
Responsiveness Length Decay
控制 EMA Length 高於 50 後,Responsiveness 隨長度下降的幅度。較高數值會對長週期線條施加更大降幅;設為 0 則所有 EMA Length 使用相同 Responsiveness。
WMA Smooth Length
控制第一層平滑。較高數值會形成更穩定但延遲更多的線條。
EMA Smooth Length
控制主要輸出週期,以及延遲縮減 EMA 所使用的週期。較高數值會形成更平滑、較慢的基準。
預設設定
Source:HLCC4
ER Length:10
Fast Length:2
Slow Length:30
Responsiveness:0.88
Responsiveness Length Decay:0.15
WMA Smooth Length:12
EMA Smooth Length:20
實際應用
ERAMA 可作為自適應趨勢基準、方向過濾器、回調參考或交易管理線,適合希望直接解讀斜率及價格結構的交易者。
Responsiveness 可用來偏向更穩定的趨勢跟隨,或更早反映短期變化。設定可按商品、時間週期及預計持倉時間調整。
---
Efficiency Ratio Adaptive Moving Average (ERAMA)
Efficiency Ratio Adaptive Moving Average(効率比適応型移動平均線)は、カウフマンの効率比(Efficiency Ratio)を利用して速いEMAと遅いEMAの挙動を動的に切り替える、滑らかな適応型移動平均線です。WMA(加重移動平均)とEMA(指数移動平均)による平滑化を行った後、期間長に連動したラグ(遅延)削減処理を適用します。
ERAMAの目的は、3つの有用な特性を1本のラインに統合することです。すなわち、近年の価格値動きの方向性効率に適応すること、視覚的に安定したベースラインを維持すること、そして平滑化によって生じる遅延の一部を取り戻すことです。ERAMAは、現在および過去のデータを用いて平滑性と応答性のバランスを調整します。
ERAMA の計算方法
1. 効率比(Efficiency Ratio)
ERAMAはまず、選択された Source が ER Length 期間内にどれほど効率的に動いたかを測定します。
変化量 = |現在の Source − ER Length 本前の Source|
変動量 = ER Length 期間内の各バーにおける |Source − 前回の Source| の総和
効率比(ER)= 変化量 ÷ 変動量
効率比(ER)は 0 から 1 の範囲に収まります。
• ERが 1 に近い — 値動きの大半が一定方向への純粋な推進に寄与している
• ERが 0 に近い — 価格が反覆移動を繰り返し、総移動距離に対して純推進がほとんどない
変化量と変動量の双方が価格の移動規模に応じてスケールするため、ERは銘柄固有の価格水準(呼び値)に依存しません。
2. 効率適応型 EMA ブレンド
Fast Length と Slow Length のパラメータにより、選択した Source から2つの従来の EMA を作成します。
Fast EMA = EMA(Source, Fast Length)
Slow EMA = EMA(Source, Slow Length)
ERAMAは、現在の効率比(ER)を用いてこれら2つのラインをブレンドします。
Adaptive = Slow EMA + ER ×(Fast EMA − Slow EMA)
ERが高いとき、Adaptiveは Fast EMA に近づきます。ERが低いとき、Slow EMA の近くにとどまります。中間のER値では、2つのEMA間で比例的なブレンドが行われます。
この構造はカウフマンの効率比を適応型ウェイトとして使用していますが、標準的な再帰型カウフマン自適応移動平均線(KAMA)の計算式とは異なります。
3. WMA および EMA による平滑化
自適応ブレンド(Adaptive)は、2段階の平滑化処理を通過します。
WMA Base = WMA(Adaptive, WMA Smooth Length)
Smoothed = EMA(WMA Base, EMA Smooth Length)
WMAは直近のデータに高い重みを置きます。続くEMAは残留変動をなめらかにし、主要な出力周期(時間軸)を決定します。数値を高く設定するほどラインは安定しますが、遅延も大きくなります。
4. 期間長に応じたラグ(遅延)削減
ERAMAは、Smoothed ラインと、それをさらにEMA平滑化したラインを比較します。
Responsiveness Scale = Min(1, 50 ÷ EMA Length)^Responsiveness Length Decay
Effective Responsiveness = Responsiveness × Responsiveness Scale
ERAMA = Smoothed + Effective Responsiveness ×
Smoothed と EMA(Smoothed)の差分は、DEMA(二重指数移動平均)スタイルのラグ補正として機能します。Responsiveness を 0 に設定するとこの補正は無効になり、1 に設定すると期間長のスケーリングが適用される前の完全な補正が行われます。
EMA Length が 50 以下のケースでは、Responsiveness Scale は 1 となります。50 を超えると、Responsiveness Length Decay に従ってスケーリング値が徐々に低下します。これにより、短期から長期のEMA期間まで同一の Responsiveness 設定を合理的に運用できます。Decay を 0 に設定すると、期間長に基づくスケーリングが無効になります。
数学的概念と設計思想
ERAMAは「適応」「平滑化」「ラグ削減」を独立した段階として明確に分離しています。
効率比(ER)が、あらかじめ定義された2つのEMA応答の間の位置を制御します。次にWMAとEMAが安定した出力ベースラインを形成します。最後に、部分的なDEMAスタイル補正によって、平滑化で失われた応答速度の一部を取り戻します。長期間のEMAでは、ラインとその2次EMAの間の乖離が過大になる可能性があるため、補正量は長さに応じて段階的に削減されます。
これは完全な因果的構造であり、すべての段階で現在および過去のデータのみを使用します。ラグ削減機能は転換の感度を高める一方で、アグレッシブな設定ではオーバーシュートを引き起こす可能性がありますが、Responsiveness と Responsiveness Length Decay のコントロールにより、このトレードオフを明示的に調整できます。
特徴とメリット
• 0〜1 の有界な効率比に基づく自適応性
• 明確に解釈可能な Fast および Slow EMA アンカー
• 安定した視覚的ベースラインを形成する WMA および EMA 平滑化
• 調整可能な部分 DEMA スタイル・ラグ削減
• 長期 EMA 期間におけるレスポンス補正の自動スケーリング
ERAMA の読み方・分析方法
ERAMAを読み解く際は、ラインの傾き、価格の相対位置、そしてライン周辺での価格の挙動に着目します。
傾き(スロープ)
ERAMAの上昇は、平滑化された自適応ベースラインが切り上がっていることを示します。ERAMAの下降は、ベースラインが切り下がっていることを示します。ラインの平坦化は、方向性の勢いの減衰、またはトレンドの移行期を示唆します。
価格の位置関係
価格が上昇するERAMAの上方で推移している場合は強気(ブル)の方向性を支持し、下降するERAMAの下方で推移している場合は弱気(ベア)の方向性を支持します。ERAMAとの頻繁な交差(クロスオーバー)は、価格がベースライン付近で保ち合いを形成しているか、方向性の主導権が弱い状態によく見られます。
乖離と反転
価格とERAMAとの距離が拡大している場合は、強力なモメンタムまたはベースラインからの乖離を反映しています。ラグ削減ステージにより、平滑化された軌跡が反転する際、ERAMAはより早期に反応することができます。
設定パラメータの理解
Source
ERAMAで使用する価格シリーズを選択します。デフォルトは HLCC4(High, Low, Close, Close の平均値)です。
ER Length
方向性の効率(Efficiency Ratio)を測定する期間を制御します。値が小さいほど直近の値動きの変化に素早く反応し、値が大きいほど広い期間で効率性を評価します。
Fast Length
適応ブレンドで使用する Fast EMA を設定します。値が小さいほど、高効率相場での反応が速くなります。Fast Length は Slow Length より小さく設定する必要があります。
Slow Length
適応ブレンドで使用する Slow EMA を設定します。値が大きいほど、低効率相場での反応が控えめになります。Slow Length は Fast Length より大きく設定する必要があります。
Responsiveness
ラグ削減項の強度を制御します。0 に設定すると完全に平滑化されたラインを使用します。高い値を設定するほどラグが解消されますが、転換時の感度やオーバーシュートが増加する場合があります。
Responsiveness Length Decay
EMA Length が 50 を超えた際に、Responsiveness が減衰する度合いを制御します。高い値を設定するほど長期ラインへの減衰が強く適用されます。0 に設定すると、すべての EMA Length で同じ Responsiveness が適用されます。
WMA Smooth Length
第1段階の平滑化期間を制御します。値が大きいほど、より遅延のある安定したラインを生成します。
EMA Smooth Length
主要な出力周期およびラグ削減用 EMA の期間を制御します。値が大きいほど、より平滑で緩やかなベースラインを生成します。
デフォルト設定
Source: HLCC4
ER Length: 10
Fast Length: 2
Slow Length: 30
Responsiveness: 0.88
Responsiveness Length Decay: 0.15
WMA Smooth Length: 12
EMA Smooth Length: 20
実戦での活用方法
ERAMAは、自適応型のトレンドベースライン、方向性フィルター、押し目・戻りの参照線、あるいはトレード管理ガイドとして活用できます。ラインの傾きや価格構造を直接解釈することを好むトレーダーに適しています。
Responsiveness をチューニングすることで、安定したトレンド追従を重視するか、短期的な変化への早期反応を重視するかを調整できます。設定は取引銘柄、時間軸、および想定する保有期間に応じて最適化することが可能です。
Indicator

Vector Coherence Moving Average (VCMA)Vector Coherence Moving Average (VCMA)
Vector Coherence Moving Average (VCMA) is an adaptive moving average based on the directional alignment of recent price-change vectors. It is intentionally presented as a thin, fixed-color line.
VCMA adjusts its smoothing speed according to two questions: Are recent price changes pointing in a consistent direction? Is that consistency supported by several meaningful moves rather than one isolated event? Strong, well-supported alignment makes the average more responsive. Weak or poorly supported alignment keeps it closer to its slow response.
How VCMA Is Calculated
1. Delay-Coordinate Price Path
VCMA first calculates the bar-to-bar change in the selected Source:
d(t) = Source(t) - Source(t-1)
It then represents price as a point on a two-dimensional delay-coordinate path:
X(t) =
Moving from X(t-1) to X(t) creates the lag vector:
z(t) = X(t) - X(t-1) =
Magnitude(t) = sqrt
During persistent movement, these vectors tend to point in similar directions. During back-and-forth movement, they point in conflicting directions and cancel when summed.
2. Vector Coherence
Over the selected Coherence Length, VCMA compares the straight-line displacement of this path with the total distance it traveled. Equivalently, it compares the length of the summed vector with the sum of all individual vector lengths:
rho = sqrt / Sum sqrt
In this form, rho is a two-dimensional path-efficiency, or straightness, ratio.
The triangle inequality keeps rho between 0 and 1:
• rho near 1 - recent lag vectors are strongly aligned
• rho near 0 - vector directions largely cancel
Both parts of the ratio scale with price movement, so vector coherence is independent of the instrument's nominal price level.
3. Effective-Move Support
A single large move can produce high coherence simply because little else opposes it. VCMA therefore calculates an effective sample size from vector magnitudes:
Effective Moves = (Sum Magnitude)^2 / Sum Magnitude^2
This is a participation measure rather than a literal count of bars. It is low when one move dominates and rises when several moves contribute meaningful magnitude.
Support = Clamp
With the default target of 3, VCMA requires broader support before using the full coherence signal. This reduces immediate maximum-speed reactions to an isolated gap, spike, or wick.
4. Adaptive Alpha
The Fast and Slow periods define the response limits of the recursive average. The script automatically treats the shorter input as Fast and the longer input as Slow:
Fast Alpha = 2 / (Fast Period + 1)
Slow Alpha = 2 / (Slow Period + 1)
Speed Gate = rho^Coherence Power x Support
Adaptive Alpha = Slow Alpha + (Fast Alpha - Slow Alpha) x Speed Gate
Raw VCMA = Previous Raw VCMA + Adaptive Alpha x (Source - Previous Raw VCMA)
Alpha always remains between the selected Slow and Fast values. Coherence Power shapes the transition: higher values require rho to move closer to 1 before VCMA accelerates substantially.
5. Output WMA
The displayed line is a weighted moving average of the raw adaptive result:
VCMA = WMA(Raw VCMA, Output WMA Length)
The default 3-period WMA reduces small residual turns while adding only modest lag. Set the length to 1 to display the unsmoothed adaptive core.
The Mathematical Idea
VCMA introduces a distinctive adaptive-moving-average construction that extends one-dimensional price-path efficiency into a two-dimensional delay-coordinate path and adds an effective-move gate to reduce acceleration caused by isolated shocks.
The delayed price points X(t) = form a path whose steps are the vectors . The coherence ratio is the path's net displacement divided by its total traveled distance. It therefore measures how straight and directionally consistent the recent delayed path has been. Unlike a one-dimensional ratio, it can also respond to irregular relationships between adjacent price changes, even when those changes share the same sign.
The effective-move gate adds an additional test for concentration. Vector coherence measures directional agreement; effective-move support measures whether that agreement is distributed across enough movement. VCMA accelerates only when both conditions support the change.
This gives VCMA a causal, scale-free, and bounded adaptive core. It does not project price forward, and the final WMA uses only positive weights. Like every moving average, VCMA still has lag. Its purpose is to vary that lag according to the observed structure of the price path.
Characteristics and Advantages
• Clean fixed-color presentation with no embedded trend classification
• Scale-free vector-coherence measurement
• Bounded response between interpretable Fast and Slow periods
• Reduced sensitivity to isolated high-coherence shocks
• Adjustable nonlinear response through Coherence Power
• Optional short WMA for a steadier final line
• Internal diagnostics available in PulseWire's Data Window
How to Read VCMA
VCMA uses one fixed color; color carries no directional or regime meaning. Read the line through its slope, its position relative to price, and the way price behaves around it.
Slope
A rising VCMA indicates that the adaptive baseline is moving higher. A falling VCMA indicates that it is moving lower. A flattening line suggests that recent directional progress is weakening or becoming less consistent.
Price Position
Price holding above a rising VCMA supports a bullish trend interpretation. Price holding below a falling VCMA supports a bearish interpretation. The combination of price position and slope is more informative than either observation alone.
Distance and Crossings
A widening distance between price and VCMA can reflect strong momentum, but it may also indicate extension from the adaptive baseline. Pullbacks toward VCMA can provide trend context when market structure remains intact. Repeated crossings usually indicate unsettled or range-bound movement where a moving-average baseline has less value.
Data Window Diagnostics
• VCMA Coherence Score - raw vector coherence multiplied by move support
• VCMA Raw Vector Coherence - directional alignment before the support gate
• VCMA Effective-Move Support - how broadly vector magnitude is distributed
• VCMA Adaptive Alpha - the smoothing coefficient used by the raw core
High raw coherence with low support often means that one dominant event has not yet received enough support from other moves. High coherence and high support allow alpha to move toward its Fast limit.
Understanding the Settings
Source
Selects the price series used by VCMA. The default is Close.
Coherence Length
Controls the window used to measure vector alignment. Shorter values adapt sooner; longer values evaluate a broader path and usually change more gradually.
Fast Period and Slow Period
Define the fastest and slowest possible responses. A shorter Fast Period increases maximum responsiveness. A longer Slow Period makes VCMA more conservative when coherence or support is weak.
Coherence Power
Higher values suppress medium coherence more strongly and reserve fast responses for readings closer to 1. Lower values produce a softer, earlier acceleration.
Effective Moves for Full Speed
Sets how much distributed movement is required for full support. Higher values reject isolated movement more strongly but may delay acceleration at the beginning of a genuine trend.
Output WMA Length
Controls final smoothing. Higher values produce a steadier line with more lag. A value of 1 disables this stage.
Practical Use
VCMA can serve as an adaptive trend baseline, a pullback reference, a directional filter, or a mathematical building block beside other indicators. Its minimal presentation is useful when the trader wants to interpret the average directly rather than rely on built-in state colors or crossover logic.
VCMA does not predict future price or eliminate whipsaws. Settings should be matched to the instrument, timeframe, and intended holding period, with price structure, volatility, volume, and higher-timeframe context used as additional evidence.
---
Vector Coherence Moving Average (VCMA)
Vector Coherence Moving Average (向量一致性移動平均線) 是以近期價格變化向量之方向一致性為基礎的自適應移動平均線。它刻意保持簡潔,使用固定顏色的細線。
VCMA 會根據兩個問題調整平滑速度:近期價格變化是否朝向一致方向?這種一致性是否得到多個具實質幅度的移動支持,而不是只來自單一事件?方向一致而且支持充分時,VCMA 會提高反應速度;任何一項偏弱,反應便會靠近 Slow 設定。
VCMA 如何計算
1. 延遲座標價格路徑
VCMA 先計算所選 Source 每根 K 線的價格變化:
d(t) = Source(t) - Source(t-1)
然後把價格表示為二維延遲座標路徑上的一個點:
X(t) =
由 X(t-1) 移動至 X(t) 時,便會形成滯後向量:
z(t) = X(t) - X(t-1) =
Magnitude(t) = sqrt
方向持續時,這些向量通常朝向相近方向;價格來回移動時,向量方向互相矛盾,加總後便會抵消。
2. 向量一致性
在 Coherence Length 所設定的週期內,VCMA 比較這條路徑的直線位移與實際行走總距離。等價地說,就是比較「向量總和的長度」與「所有個別向量長度的總和」:
rho = sqrt / Sum sqrt
以這種形式理解,rho 就是二維路徑效率,亦即路徑直線度的比率。
根據三角不等式,rho 會保持在 0 至 1 之間:
• rho 接近 1 - 近期滯後向量方向高度一致
• rho 接近 0 - 向量方向大部分互相抵消
分子與分母都會隨價格變化幅度按比例改變,因此向量一致性不受商品名義價格水平影響。
3. 有效移動支持度
單一大幅移動也可能產生偏高的一致性,因為沒有其他向量與它抵消。VCMA 因此利用向量幅度計算有效樣本數:
Effective Moves = (Sum Magnitude)^2 / Sum Magnitude^2
這是參與程度的量度,不是 K 線數量的直接計數。當一個移動佔據大部分幅度時,數值偏低;當多個移動都有實質貢獻時,數值便會上升。
Support = Clamp
預設目標為 3,VCMA 需要較廣泛的支持才會完整採用一致性訊號。這可減少單一裂口、急升急跌或影線令平均線立即切換至最高速度的情況。
4. 自適應 Alpha
Fast 與 Slow 週期定義遞迴平均線的反應上下限。程式會自動把較短輸入視為 Fast,較長輸入視為 Slow:
Fast Alpha = 2 / (Fast Period + 1)
Slow Alpha = 2 / (Slow Period + 1)
Speed Gate = rho^Coherence Power x Support
Adaptive Alpha = Slow Alpha + (Fast Alpha - Slow Alpha) x Speed Gate
Raw VCMA = Previous Raw VCMA + Adaptive Alpha x (Source - Previous Raw VCMA)
Alpha 始終保持在所選的 Slow 與 Fast 數值之間。Coherence Power 控制轉換曲線;數值越高,rho 越需要接近 1,VCMA 才會明顯加速。
5. 輸出 WMA
圖表上的線條是原始自適應結果的加權移動平均:
VCMA = WMA(Raw VCMA, Output WMA Length)
預設的 3 週期 WMA 可減少細微轉折,同時只加入有限延遲。設為 1,即可顯示未經額外平滑的自適應核心。
數學設計
VCMA 採用一種具辨識度的自適應移動平均線結構:把一維價格路徑效率延伸為二維延遲座標路徑,並加入有效移動閘門,以降低孤立價格衝擊造成的加速。
延遲價格點 X(t) = 形成一條路徑,而 就是路徑上的每一步。向量一致性比率等於路徑的淨位移除以實際行走總距離,因此可衡量近期延遲路徑有多筆直,以及方向有多一致。與一維比率不同,即使價格變化方向相同,若相鄰變化之間的關係反覆而不規則,這個二維比率仍可作出區分。
有效移動閘門再加入集中度檢查。向量一致性衡量方向是否配合;有效移動支持度則衡量這種配合是否分布於足夠的移動。只有兩項條件同時成立,VCMA 才會加快。
這個自適應核心只使用當前及過往資料,不受價格尺度影響,而且 Alpha 有明確上下限。它不會向前投射價格,最後的 WMA 亦只使用正權重。VCMA 仍然是移動平均線,因此必然存在延遲;它的作用是根據已觀察到的價格路徑結構調整延遲。
特性與優點
• 固定顏色的簡潔顯示,不加入內置趨勢分類
• 不受價格尺度影響的向量一致性量度
• 反應速度受具體 Fast 與 Slow 週期限制
• 降低孤立而高一致性的價格衝擊所造成的影響
• 可用 Coherence Power 調整非線性反應
• 可選用短週期 WMA 整理最終線條
• 在 PulseWire Data Window 提供內部診斷數值
如何閱讀 VCMA
VCMA 使用單一固定顏色,顏色不代表方向或市場狀態。閱讀時應觀察線條斜率、價格相對位置,以及價格在 VCMA 附近的行為。
斜率
VCMA 上升,表示自適應基準正在提高;VCMA 下跌,表示基準正在降低。線條逐漸走平,通常代表近期方向進展正在減弱,或價格移動的一致性下降。
價格位置
價格維持在上升 VCMA 之上,可支持多頭趨勢判斷;價格維持在下降 VCMA 之下,可支持空頭判斷。價格位置與線條斜率配合使用,比單獨觀察任何一項更有參考價值。
距離與穿越
價格與 VCMA 的距離擴大,可能反映動能增強,也可能表示價格已偏離自適應基準。當市場結構仍然完整,回調至 VCMA 附近可提供趨勢背景。價格反覆穿越 VCMA,通常表示市況反覆或橫行,此時移動平均線基準的參考價值會下降。
Data Window 診斷數值
• VCMA Coherence Score - 原始向量一致性乘以移動支持度
• VCMA Raw Vector Coherence - 未加入支持閘門前的方向一致性
• VCMA Effective-Move Support - 向量幅度的分布廣度
• VCMA Adaptive Alpha - 原始核心實際使用的平滑係數
Raw Vector Coherence 偏高但 Support 偏低,通常代表一次主導事件尚未得到其他移動充分配合。一致性與支持度同時偏高時,Alpha 才可向 Fast 上限移動。
設定說明
Source
選擇 VCMA 使用的價格序列,預設為 Close。
Coherence Length
控制衡量向量一致性的週期。較短數值適應更快;較長數值會評估更廣的價格路徑,變化通常較慢。
Fast Period 與 Slow Period
定義最快及最慢反應。較短的 Fast Period 會提高最大靈敏度;較長的 Slow Period 則會在一致性或支持度偏弱時令 VCMA 更保守。
Coherence Power
較高數值會更強地壓低中等一致性的作用,只在 rho 接近 1 時採用較快反應。較低數值會較早及較平順地提高速度。
Effective Moves for Full Speed
設定完整支持所需的分布程度。較高數值能更強地抑制孤立移動,但也可能延遲真實趨勢初段的加速。
Output WMA Length
控制最終平滑程度。數值越高,線條越穩定,但延遲亦會增加。設為 1 可停用這一層。
實際應用
VCMA 可作為自適應趨勢基準、回調參考、方向過濾器,亦可配合其他指標作為數學基礎線。它不提供內置狀態顏色或交叉邏輯,適合希望直接判讀平均線本身的交易者。
VCMA 不會預測未來價格,也不能消除所有來回穿越。設定應配合商品、時間週期與預計持倉時間,並以價格結構、波動性、成交量及較高時間週期背景作為補充證據。
---
Vector Coherence Moving Average(VCMA)
Vector Coherence Moving Average(ベクトル・コヒーレンス移動平均線、VCMA)は、直近の価格変化ベクトルがどの程度同じ方向にそろっているかを基準に、反応速度を調整する適応型移動平均線です。チャート上では、細い単色ラインでシンプルに表示されます。
VCMAは、次の2点をもとに平滑化の速度を調整します。直近の価格変化は一貫した方向を向いているか。その一貫性は単発の値動きではなく、複数の意味のある変動によって支えられているか。方向がそろい、かつ十分な裏付けがあるときは反応を速め、どちらかが弱いときはSlow側の穏やかな反応に近づきます。
VCMAの計算方法
1. 遅延座標上の価格経路
VCMAはまず、選択したSourceについて、各バー間の価格変化を計算します。
d(t) = Source(t) - Source(t-1)
次に、価格を2次元の遅延座標上にある点として表します。
X(t) =
X(t-1)からX(t)への移動によって、次の遅延ベクトルが得られます。
z(t) = X(t) - X(t-1) =
Magnitude(t) = sqrt
方向性のある値動きが続くと、これらのベクトルは似た方向を向く傾向があります。一方、価格が往復するとベクトルの方向が食い違い、合計したときに互いを打ち消します。
2. ベクトル・コヒーレンス
設定したCoherence Lengthの範囲で、VCMAはこの経路の直線変位と、実際にたどった総距離を比較します。これは、合成ベクトルの長さと、各ベクトルの長さの合計を比較することと同じです。
rho = sqrt / Sum sqrt
この形で見ると、rhoは2次元の経路効率、つまり経路の直進性を表す比率です。
三角不等式により、rhoは0から1の範囲に収まります。
• rhoが1に近い - 直近の遅延ベクトルが高い精度で同じ方向にそろっている
• rhoが0に近い - ベクトルの方向が互いに大きく打ち消し合っている
分子と分母はどちらも価格変動の大きさに比例するため、ベクトル・コヒーレンスは銘柄の名目価格水準に左右されません。
3. 有効変動の支持度
単発の大きな変動は、それに逆らう動きがほとんどないだけで、高いコヒーレンスを生む場合があります。そこでVCMAは、ベクトルの大きさから有効サンプルサイズを計算します。
Effective Moves = (Sum Magnitude)^2 / Sum Magnitude^2
これはバー数そのものではなく、どれだけ多くの値動きが実質的に寄与しているかを表す指標です。1つの変動が全体を支配していると低くなり、複数の変動が十分な大きさで寄与すると高くなります。
Support = Clamp
初期設定の目標値は3です。VCMAがコヒーレンス信号を完全に反映するには、複数の値動きによる十分な裏付けが必要になります。これにより、単発のギャップ、急騰・急落、長いヒゲに反応して、ただちに最高速度へ切り替わる動きを抑えます。
4. 適応型Alpha
Fast PeriodとSlow Periodは、再帰型平均線の反応速度の上限と下限を定めます。入力順が逆でも、短い方をFast、長い方をSlowとして自動的に扱います。
Fast Alpha = 2 / (Fast Period + 1)
Slow Alpha = 2 / (Slow Period + 1)
Speed Gate = rho^Coherence Power x Support
Adaptive Alpha = Slow Alpha + (Fast Alpha - Slow Alpha) x Speed Gate
Raw VCMA = Previous Raw VCMA + Adaptive Alpha x (Source - Previous Raw VCMA)
Alphaは常に、選択したSlowとFastの範囲内に収まります。Coherence Powerは速度変化のカーブを調整します。値を大きくするほど、rhoが1に近づかない限り、VCMAは大きく加速しにくくなります。
5. 出力WMA
チャートに表示されるラインは、生の適応結果に加重移動平均を適用したものです。
VCMA = WMA(Raw VCMA, Output WMA Length)
初期設定の3期間WMAは、わずかな追加遅延に抑えながら、小さな折り返しを滑らかにします。Output WMA Lengthを1に設定すると、この追加平滑化を無効にし、生の適応コアを表示できます。
数学的な考え方
VCMAは、1次元の価格経路効率を2次元の遅延座標経路へ拡張し、さらに単発のショックによる過度な加速を抑える有効変動ゲートを組み合わせた、特徴的な適応型移動平均線です。
遅延価格点 X(t) = が1本の経路を形成し、その各ステップがベクトル になります。コヒーレンス比率は、経路の正味変位を実際に移動した総距離で割ったものです。これにより、直近の遅延経路がどれだけ直線的で、方向がどれだけ一貫しているかを測定します。1次元の比率とは異なり、価格変化の符号が同じであっても、隣り合う変化の関係が不規則なら、その違いを捉えることができます。
有効変動ゲートは、さらに寄与の集中度を確認します。ベクトル・コヒーレンスは方向の整合性を測り、有効変動の支持度は、その整合性が十分な数の値動きに分散しているかを評価します。VCMAが加速するのは、両方の条件がそろった場合だけです。
その結果、VCMAの適応コアは現在および過去のデータだけで計算され、価格尺度に依存せず、反応速度にも明確な上下限があります。将来の価格を先取りして投影することはなく、最後のWMAも正の重みだけを使用します。VCMAも移動平均線である以上、遅延そのものは残ります。その目的は、観測された価格経路の構造に応じて、反応遅延の度合いを調整することです。
特徴と利点
• トレンド分類を組み込まない、シンプルな単色表示
• 価格尺度に依存しないベクトル・コヒーレンス測定
• 解釈しやすいFast PeriodとSlow Periodの範囲内で反応
• 単発の価格ショックによる過度な加速を抑制
• Coherence Powerによる非線形反応の調整
• 短期WMAによる任意の最終平滑化
• PulseWireのデータウィンドウで内部診断値を確認可能
チャート上でのVCMAの見方
VCMAは常に1つの固定色で表示され、色そのものに方向や相場状態の意味はありません。ラインの傾き、価格との位置関係、そしてVCMA付近での価格の動きを読み取ります。
傾き
VCMAが上昇している場合は、適応型の基準線が切り上がっていることを示します。下降している場合は、基準線が切り下がっていることを示します。ラインが横ばいに近づく場合は、直近の方向性が弱まっているか、値動きの一貫性が低下している可能性があります。
価格との位置関係
上向きのVCMAより上で価格が推移していれば、強気トレンドの解釈を補強します。下向きのVCMAより下で価格が推移していれば、弱気トレンドの解釈を補強します。価格の位置とラインの傾きを組み合わせる方が、どちらか一方だけを見るよりも有用です。
距離とクロス
価格とVCMAの距離が広がる動きは、強いモメンタムを表す一方で、適応型の基準線から価格が行き過ぎている可能性も示します。市場構造が維持されている場合、VCMA付近への押し目や戻りはトレンド判断の参考になります。価格がVCMAを何度も往復する場合は、方向感が定まっていないかレンジ相場であることが多く、移動平均線を基準にする有効性は低下します。
データウィンドウの診断値
• VCMA Coherence Score - 生のベクトル・コヒーレンスに変動支持度を掛けた値
• VCMA Raw Vector Coherence - 支持ゲートを適用する前の方向整合性
• VCMA Effective-Move Support - ベクトルの大きさがどの程度広く分散しているか
• VCMA Adaptive Alpha - 生の適応コアが実際に使用した平滑化係数
Raw Vector Coherenceが高くてもSupportが低い場合、1つの支配的なイベントに対して、ほかの値動きによる裏付けがまだ不足していることが多いと考えられます。コヒーレンスと支持度がともに高くなると、AlphaはFast側の上限へ近づくことができます。
設定項目
Source
VCMAの計算に使用する価格系列を選択します。初期設定はCloseです。
Coherence Length
ベクトルの整合性を測定する期間を設定します。短くすると適応が速くなり、長くするとより広い価格経路を評価するため、通常は変化が緩やかになります。
Fast PeriodとSlow Period
最速時と最遅時の反応を定めます。Fast Periodを短くすると最大反応速度が上がります。Slow Periodを長くすると、コヒーレンスまたは支持度が弱い場面でVCMAがより慎重に反応します。
Coherence Power
値を大きくすると、中程度のコヒーレンスによる影響をより強く抑え、rhoが1に近い場合にだけ速い反応を許します。値を小さくすると、より早い段階から滑らかに加速します。
Effective Moves for Full Speed
完全な支持度に達するために必要な、値動きの分散度を設定します。値を大きくすると単発の変動をより強く抑えられますが、本物のトレンドが始まった直後の加速も遅れる可能性があります。
Output WMA Length
最終平滑化の強さを設定します。値を大きくするとラインは安定しますが、遅延も増えます。1に設定すると、この平滑化を無効にできます。
実践的な使い方
VCMAは、適応型のトレンド基準線、押し目・戻りの参考線、方向フィルター、またはほかのインジケーターと組み合わせる数学的なベースラインとして利用できます。状態ごとの色分けやクロス判定を内蔵しないため、移動平均線そのものを直接読み取りたい場合に適しています。
VCMAは将来の価格を予測するものではなく、頻繁な往復やダマシを完全に排除することもできません。設定は銘柄、時間足、想定する保有期間に合わせて調整し、価格構造、ボラティリティ、出来高、上位時間足の状況も補足材料として利用してください。
Indicator

TASC 2026.08 An Ag Selling Model█ OVERVIEW
This strategy implements the "Ag Selling Model" as presented by Perry J. Kaufman in the August 2026 edition of the TASC Traders' Tips "Identifying The Best Price Levels For Selling Commodity Futures". The article describes a long-hold selling strategy for agricultural commodity futures based around the seasonal harvest timing of crops, mainly US grains traded on the CBOT and KCBOT, both which have been acquired by CME.
█ CONCEPTS
This model was originally presented in 1978 by the author to a group of commodity producers as an attempt to identify the best price levels to sell their products.
The core idea is that if there is only one crop per year, crop prices will be lowest around harvest and highest around peak growing season. Based on this timing, the strategy spaces out its sell orders up to three times throughout the year, and covers its position at harvest.
The goal of this strategy is simply to beat the average price. Since selling at harvest should typically provide a lower-than-average price exit, success for this strategy means having the average of its entries above the average price.
The level to sell at can be determined by finding a moving average that reflects seasonal changes. Once found, we measure volatility using Average True Range (ATR).
With these two figures, the volatility is added to the average based on a multiplication factor.
This creates a reasonable extreme at which to position short entries.
█ THE RULES
Sell short at the selling level.
Delay these sells to ensure two sells are not in the same rally.
Avoid selling immediately after harvest, as a long period of low prices typically follows.
Exit positions (cover shorts) at harvest.
▌Properties
IMPORTANT NOTE: The strategy parameters have been adjusted specifically for Corn Futures (ZC1!). This ticker operates in Cents (USX) rather than Dollars (USD); all the strategy values have been translated to account for this. To apply this strategy to other markets it is important to properly adjust the strategy parameters to simulate realistic conditions.
Initial Capital : 15,000,000¢ == $150,000; see note above.
Position Sizing : This strategy sells in one-contract increments up to three times per year.
Commissions : Commission value is set to 300¢ ($3) per order, which is a generous estimate.
Slippage : Slippage is set to one tick to simulate reasonable execution conditions.
█ INPUTS
Source : Source for calculations.
MA length : Moving Average length (Simple Moving Average). A 20 to 60 day range is recommended; with 40 as a starting point.
ATR length : Average True Range length.
ATR factor : Factor by which to multiply ATR when calculating selling level. 2.5 to 3.5 is generally recommended but higher has been seen for more volatile grains.
Month of Harvest : Set the month of harvest for the crop being traded, which changes depending on the seasonality of the commodity.
Delay in months after harvest : Set this to the typical downtime after harvest where prices are typically lowest. This can vary per instrument but 2 months is the suggested point for tuning.
Days between trades : Days to wait between sales.
Strategy

Scalper's Moving Average [DYNA]Scalper's Moving Average is an adaptive overlay line that automatically adjusts its speed based on market conditions. In trending markets it tracks price closely, keeping you in the move. In choppy, sideways markets it flattens out, filtering noise and keeping you from getting whipsawed. It is built on the Kaufman Adaptive Moving Average (KAMA) algorithm, tuned specifically for 1-5 minute scalping charts.
Most moving averages force you to choose between speed and smoothness. A fast MA gives early signals but generates constant false flips in chop. A slow MA filters noise but lags behind real moves, costing you ticks on every entry. Scalper's Moving Average solves this tradeoff by measuring how efficiently price is moving and adjusting its responsiveness in real time.
Key Features
Adaptive Speed -- Automatically speeds up when price is trending and slows down when the market is chopping, so you get one line that does the work of two
Slope Color Coding -- The KAMA line changes color based on its slope direction: teal for rising, red for falling, gray for flat. Instant visual read of trend bias
Distance Fill -- Optional shaded area between price and KAMA shows how far price has stretched from its adaptive mean, helping you spot overextension and pullback entries
Slope Flip Markers -- Small triangle markers appear on the chart when the KAMA slope changes direction, flagging potential trend shifts at a glance. An ATR-based filter and cooldown system suppress noise flips in choppy markets
No Repainting -- Slope flip signals use confirmed-bar logic and will not change once printed
How It Works
When you add the indicator to your chart, you will see a single colored line overlaid on your candles. This is the KAMA line. Unlike a standard EMA or SMA, it does not move at a fixed speed. Instead, it calculates an efficiency ratio on every bar -- comparing how far price has moved in one direction versus how much total back-and-forth movement occurred. When that ratio is high (strong trend), the line speeds up and hugs price closely. When the ratio is low (chop), the line barely moves.
The line color tells you the current slope direction at a glance. A teal line means KAMA is rising and momentum favors the bulls. A red line means KAMA is falling and momentum favors the bears. A gray line means the slope is flat and the market has no clear direction -- a signal to stay patient.
When the slope changes direction, a small triangle marker appears directly on the KAMA line. An "UP" triangle marks a bullish flip, and a "DN" triangle marks a bearish flip. These transitions are the earliest indication that the adaptive trend bias has shifted. To keep the chart clean, flips are filtered by an ATR-scaled minimum slope threshold -- tiny wiggles in chop are ignored -- and a cooldown period prevents rapid-fire labels from stacking up.
KAMA line hugging price tightly during a trending move, with distance fill showing the stretch between price and the adaptive average.
Distance Fill
The optional distance fill shades the area between the close price and the KAMA line. When price is above KAMA the fill is teal; when below, the fill is red. When price is hugging KAMA closely (within the dead-zone threshold), the fill turns neutral gray, giving you an instant visual cue that the market is chopping and there is no meaningful stretch to trade. The width of the colored fill tells you how far price has stretched from its adaptive mean. A wide fill suggests the move may be overextended -- not the ideal time to chase. A narrowing fill as price pulls back toward KAMA can highlight better entry zones where risk-to-reward improves.
Distance fill expanding during a strong move, then narrowing as price pulls back to KAMA -- a potential re-entry zone.
Settings
The core settings control the KAMA calculation. KAMA Length (default 10) sets the lookback window for the efficiency ratio -- lower values make the line more reactive, higher values smooth it out. Fast Constant (default 2) determines the fastest the line can move when the trend is strong. Slow Constant (default 30) determines how sluggish the line becomes in chop. The defaults are tuned for 1-3 minute charts and work well for most scalping scenarios.
The flip filter settings control label quality. Min Slope (ATR %) (default 0.15) sets the minimum slope magnitude as a fraction of ATR -- raise it to filter out more noise flips in choppy conditions. Cooldown Bars (default 5) enforces a minimum gap between flip labels, preventing clusters of rapid UP/DN markers. Both settings also define the neutral dead-zone for slope coloring and fill.
Under visual settings, you can toggle the distance fill on or off and adjust the KAMA line thickness.
Alerts
Slope Flip Bullish -- Fires when the KAMA slope turns from flat or falling to rising. Message: "Scalper's Moving Average : KAMA slope flipped bullish. Trend may be turning up."
Slope Flip Bearish -- Fires when the KAMA slope turns from flat or rising to falling. Message: "Scalper's Moving Average : KAMA slope flipped bearish. Trend may be turning down."
To set up alerts: click the PulseWire Alerts button, select "Scalper's Moving Average " from the indicator dropdown, choose "Any alert() function call" as the condition, and set your preferred notification method.
Best Practices
Start with the default 10/2/30 settings on 1-3 minute charts before making adjustments
When the KAMA line is flat and gray, avoid trend-following trades -- the market is chopping
Use the distance fill to time entries: enter on pullbacks toward KAMA rather than chasing extended moves
Combine slope flip signals with volume or support/resistance levels for higher-confidence entries
If trading 5-minute charts, consider increasing KAMA Length to 14 or 20 for smoother signals
Part of the DYNA Ecosystem
Scalper's Moving Average is a free indicator built with the same design standards as the DYNA premium suite. For complete trade management with automatic stop loss, break-even, trailing stops, and multi-target systems, explore the full DYNA indicator collection.
Disclaimer
This indicator is a technical analysis and educational tool only -- it is not financial advice and makes no guarantee of any outcome. Past performance does not predict future results. Always do your own research and use proper position sizing and risk management.
Created by Varun Nidhi · varunnidhi.com
A free DYNA indicator — self-contained, no repainting.
Indicator

Adaptive Divergence Core [JOAT]Adaptive Divergence Core is an open-source Pine Script v6 oscillator that combines HMA-smoothed RSI behavior, adaptive percentile bands, confirmed divergence lines, and regime fills. It is designed to make oscillator extremes relative to the current chart sample instead of relying only on fixed overbought and oversold levels.
The script is useful when standard oscillator thresholds are too rigid. A market can stay strong or weak for long periods. Adaptive Divergence Core recalculates upper and lower fields from recent oscillator distribution, then plots confirmed divergence only after both price and oscillator pivots are confirmed.
Core Concepts
1. HMA-RSI Core
The oscillator blends RSI on raw price, RSI on HMA-smoothed price, and an HMA-smoothed RSI value. It is centered around zero for easier bullish and bearish reading.
hmaSource = ta.hma(src, hmaLen)
rawRsi = ta.rsi(src, rsiLen)
rsiOnHma = ta.rsi(hmaSource, rsiLen)
smoothedRsi = ta.hma(rawRsi, smoothLen)
core = (rsiOnHma * 0.58 + smoothedRsi * 0.42) - 50.0
2. Adaptive Percentile Bands
The upper and lower bands are calculated from rolling percentiles of the oscillator. This lets the bands adapt to the recent distribution of momentum.
upperRaw = ta.percentile_nearest_rank(core, percentileLength, upperPercentile)
lowerRaw = ta.percentile_nearest_rank(core, percentileLength, lowerPercentile)
3. Extreme Fields
Additional 95th and 5th percentile fields help show deeper oscillator stretch zones beyond the primary adaptive bands.
4. Confirmed Divergence Detection
Bearish divergence requires price to form a higher confirmed pivot high while the oscillator forms a lower confirmed pivot high. Bullish divergence requires price to form a lower confirmed pivot low while the oscillator forms a higher confirmed pivot low.
5. Regime Fill
The script fills the oscillator against zero and against its guide line, making positive and negative regimes easy to read without large markers.
Features
HMA-RSI oscillator: Blends raw RSI, RSI on HMA, and smoothed RSI
Adaptive percentile bands: Upper and lower thresholds adjust to recent oscillator behavior
Extreme bands: Additional outer fields for deeper stretch readings
Confirmed divergence lines: Divergences plot only after price and oscillator pivots confirm
Divergence labels: Small S Div and B Div labels are placed near confirmed divergence lines
Divergence line cap: Old lines are deleted to respect object limits
Optional candle tint: Can color chart candles from the oscillator pane setting
Dashboard: Shows core value, bands, divergence counts, and current field
Alerts: Divergence, band entry, and band release conditions
Input Parameters
Core:
Source: Price source
RSI Length: Base RSI period
HMA Price Length: HMA source smoothing
HMA RSI Smooth: Smoothing for the raw RSI component
Adaptive Bands:
Percentile Length: Lookback used for adaptive thresholds
Upper Percentile: Upper adaptive threshold percentile
Lower Percentile: Lower adaptive threshold percentile
Divergence:
Divergence Left Bars / Right Bars: Pivot confirmation settings
Maximum Divergence Lines: Object cap for plotted divergence lines
Divergence Labels: Shows or hides compact divergence labels
Visuals:
Tint Candles: Optional candle tint from the oscillator state
Show Dashboard: Shows or hides the compact top-right pane dashboard
Palette: Selects the local JOAT color preset
How to Use This Indicator
Step 1: Read the Core Relative to Zero
Values above zero show positive oscillator regime. Values below zero show negative oscillator regime.
Step 2: Use Adaptive Bands
When core enters the upper or lower adaptive band, momentum is stretched relative to its recent sample.
Step 3: Evaluate Divergence After Confirmation
Divergence lines are delayed by pivot confirmation. This is intentional and avoids projecting unconfirmed pivots into the past.
Indicator Limitations
Divergences confirm late because pivots need right-side bars
Adaptive bands depend on the selected lookback and can shift over time
Divergence is context, not a complete trade plan
During strong trends, oscillator stretch can persist for many bars
Originality Statement
Adaptive Divergence Core is original in its HMA-RSI blend, rolling percentile threshold system, confirmed pivot divergence logic, and compact dashboard. It uses public Pine v6 functions to build a distinct oscillator workflow.
Disclaimer
This script is provided for educational and informational use only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Oscillator divergences can fail or remain early for extended periods. Always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
Indicator

AI Source Switching Moving Average (Zeiierman)█ Overview
The AI Source Switching Moving Average is an adaptive price-selection and trend intelligence system that combines historical analog recognition, machine learning classification, neural learning, feature optimization, dynamic source selection, and AI-driven trend management into a single framework.
Rather than calculating a moving average from a fixed source such as Close, Open, High, or Low, the indicator continuously evaluates which price source currently contains the most useful market information.
The script transforms each OHLC source into a multi-dimensional feature space, stores historical behavior, searches for similar historical environments, and allows those analogs to vote on which source currently provides the highest predictive value.
An adaptive feature-weighting engine continuously learns which characteristics best separate bullish and bearish conditions, while an online neural model adds a second layer of directional intelligence.
█ Why Is This One Unique
Most moving averages are static.
You select a source:
• Close
• Open
• High
• Low
Then the moving average simply smooths that source. This indicator does something fundamentally different.
Instead of assuming one source is always optimal, it continuously evaluates all four OHLC streams and determines which source currently contains the strongest information based on historical behavior.
The indicator effectively asks:
"Which price source has historically produced the best outcome under conditions most similar to the current market?"
That selected source then becomes the input for the moving average and AI Supertrend. This transforms a traditional moving average into a dynamic source-selection engine.
█ How It Works
⚪ Builds Multi-Dimensional OHLC Features
The model does not analyze raw prices directly.
Each OHLC source is transformed into a behavioral fingerprint consisting of:
• Trend Structure
• Mean-Reversion State
• Momentum
• Volatility Profile
• Range Position
• Price Slope
Every source becomes its own market state representation.
oT = featTrend(open, atrNow)
oM = featMean(open)
oMo = featMomentum(open)
oV = featVol(open)
oR = featRange(open)
oS = featSlope(open, atrNow)
The same feature process is applied to High, Low, and Close.
hT = featTrend(high, atrNow)
lT = featTrend(low, atrNow)
cT = featTrend(close, atrNow)
Instead of asking:
"Where is price?"
The model asks:
"How is this source behaving?"
⚪ Creates A Historical Memory Bank
Every confirmed bar is stored together with:
• Source feature state
• Future market outcome
• Volatility-normalized labels
This becomes the learning dataset.
moveFwd = close - close
bandFwd = learnAtrFactor * atrNow
outcome = moveFwd > 2 * bandFwd ? 3 :
moveFwd > bandFwd ? 2 :
moveFwd > 0 ? 1 :
moveFwd < -2 * bandFwd ? -3 :
moveFwd < -bandFwd ? -2 :
moveFwd < 0 ? -1 : 0
Each stored row contains the feature snapshot plus the outcome label.
rowO = makeRow(oT , oM , oMo , oV , oR , oS , outcome)
Each confirmed observation becomes a real historical example the model can reference later.
if barstate.isconfirmed and bar_index > horizonBars + 120
if validO
addBank(bankO, rowO, memoryDepth)
addBank(bankAll, rowO, memoryDepth * 4)
⚪ Uses Historical Analog Matching
Once enough data has been collected, the model begins searching for historical situations that resemble current conditions.
Similarity is measured using a compressed Lorentzian-style distance function:
compress(d) =>
math.log(1.0 + math.abs(d))
The gap between the current feature state and each historical row is then calculated across all features.
gapTo(t, m, mo, v, r, s, array row) =>
wT * compress(t - row.get(0)) +
wM * compress(m - row.get(1)) +
wMo * compress(mo - row.get(2)) +
wV * compress(v - row.get(3)) +
wR * compress(r - row.get(4)) +
wS * compress(s - row.get(5))
This helps reduce outlier influence and prevents any single feature from dominating the comparison process.
The goal is not to find identical charts. The goal is to find historically similar market environments.
⚪ Let Historical Analogs Vote
After finding the closest historical examples, the model allows them to vote.
Closer analogs receive greater influence. More distant analogs contribute less.
wg = 1.0 / (1.0 + g)
score += cls * wg
bull += cls > 0 ? wg : 0.0
bear += cls < 0 ? wg : 0.0
The weighted voting system produces:
• Analog Score
• Directional Bias
• Agreement Fraction
• Similarity Tightness
• Market Conviction
analog = total > 0 ? score / total : 0.0
dir = analog > 0.15 ? 1 : analog < -0.15 ? -1 : 0
agree = total > 0 ? (dir == 1 ? bull : dir == -1 ? bear : 0.0) / total : 0.0
tight = clamp(1.0 - avgGap / gapScale, 0.0, 1.0)
This creates a probabilistic ranking system rather than a binary signal engine.
⚪ Auto-Optimizes Feature Importance
Different markets reward different behaviors.
A feature that is extremely predictive today may become less useful tomorrow. The indicator solves this problem using adaptive Fisher-discriminant optimization.
The engine continuously measures which features best separate bullish outcomes from bearish outcomes.
f = math.pow(meanB - meanS, 2) / (varB + varS + 0.000001)
• Features with higher predictive value receive larger weights.
• Features with lower predictive value gradually lose influence.
norm = maxF > 0 ? fish.get(j) / maxF : 1.0
imp.set(j, math.max(floor, norm * 8.0))
The optimized weights are smoothed over time.
wAuto.set(j, prev + fisherSpeed * (wRaw.get(j) - prev))
This allows the model to adapt automatically without requiring manual optimization.
⚪ Adds Neural Learning
Beyond analog classification, the indicator includes an online neural learning layer.
The neural model continuously updates itself using confirmed market outcomes and adjusts internal directional bias over time.
neuralScore(t, m, mo, v, r, s) =>
nt * t + nm * m + nmo * mo + nv * v + nr * r + ns * s + nb
The neural layer evaluates:
• Trend Structure
• Mean Reversion
• Momentum
• Volatility
• Range Position
• Slope Behavior
Training is performed using an Adam-style optimizer.
adam(weight, grad, mom, vel, step) =>
newMom = beta1 * mom + (1.0 - beta1) * grad
newVel = beta2 * vel + (1.0 - beta2) * grad * grad
mHat = newMom / (1.0 - math.pow(beta1, step))
vHat = newVel / (1.0 - math.pow(beta2, step))
newWeight = weight - learnRate * mHat / (math.sqrt(vHat) + eps)
This creates a second intelligence layer that works alongside the analog engine.
⚪ Ranks All Four Sources
Every bar receives independent scores for:
• Open
• High
• Low
• Close
rO = rankSource(oT, oM, oMo, oV, oR, oS, oAnalog, oAgree, oTight, oK)
rH = rankSource(hT, hM, hMo, hV, hR, hS, hAnalog, hAgree, hTight, hK)
rL = rankSource(lT, lM, lMo, lV, lR, lS, lAnalog, lAgree, lTight, lK)
rC = rankSource(cT, cM, cMo, cV, cR, cS, cAnalog, cAgree, cTight, cK)
The ranking combines:
• Analog Classification Strength
• Historical Agreement
• Similarity Quality
• Feature Separation
• Neural Confidence
rankSource(t, m, mo, v, r, s, analog, agree, tight, k) =>
neural = useNeural ? neuralScore(t, m, mo, v, r, s) : 0.0
directional = math.abs(analog) / 3.0
raw = directional * 0.35 + agree * 0.25 + tight * 0.20 + normScore(neural) * neuralInfluence + (k >= kNeighbors ? 0.10 : 0.0)
clamp(raw, 0.0, 1.0)
The highest-ranked source becomes the active source for both the moving average and Supertrend.
bestId = safeRO >= safeRH and safeRO >= safeRL and safeRO >= safeRC ? 0 :
safeRH >= safeRL and safeRH >= safeRC ? 1 :
safeRL >= safeRC ? 2 : 3
This means the indicator can dynamically switch between Open, High, Low, and Close depending on which source currently demonstrates the strongest historical edge.
⚪ Builds An Adaptive AI Moving Average
After selecting the best source, the indicator calculates a moving average using that dynamically chosen input.
hardSrc = bestId == 0 ? open :
bestId == 1 ? high :
bestId == 2 ? low : close
The selected source is then smoothed and passed into the moving-average engine.
aiSourceRaw = hardSrc
aiSource = ta.ema(aiSourceRaw, srcSmoothLen)
aiMA = ma(aiSource, maLen, maType)
Unlike traditional averages that remain tied to a fixed source, the AI MA continuously adapts to changing market conditions.
The result is a smoother and more context-aware trend representation.
█ Main Weakness
The indicator is not deep learning.
It does not train a large neural network.
Instead, it operates as an online analog classifier enhanced by adaptive feature weighting and lightweight neural optimization.
Because it learns from historical analogs, performance can vary depending on:
• Symbol
• Timeframe
• Market Regime
• Memory Depth
• Feature Configuration
• Learning Horizon
As with all adaptive systems, historical similarity does not guarantee future outcomes.
█ How To Use
⚪ Reading The AI Moving Average
• Rising average = bullish conditions dominate.
• Falling average = bearish conditions dominate.
• Strong slope = stronger trend conviction.
• Flat slope = weaker directional conviction.
The AI Moving Average can be used much like a traditional moving average, but with the added benefit of dynamic source selection.
Use it for:
• Identifying trend direction
• Spotting trend changes
• Confirming momentum shifts
• Dynamic support and resistance analysis
• Pullback and retest opportunities
• Trend continuation setups
In bullish conditions , traders may look for price to remain above the moving average and use pullbacks into the average as potential continuation zones.
In bearish conditions , traders may look for price to remain below the moving average and use rallies into the average as potential resistance areas.
⚪ Reading The AI Supertrend
The AI Supertrend acts as:
• Trend Filter
• Dynamic Trailing Stop
• Market Structure Guide
• Bullish flips indicate positive trend conditions.
• Bearish flips indicate negative trend conditions.
Because the band width adapts to model confidence, trend changes become more responsive during strong conditions and more tolerant during weak conditions.
Use the AI Supertrend for:
• Trend confirmation
• Trade management
• Trailing stop placement
• Exit planning
• Market structure analysis
• Trend-following systems
Many traders may choose to remain long while price stays above the bullish trail and remain short while price stays below the bearish trail.
The Supertrend can also be used as a dynamic stop-loss framework, allowing positions additional room during uncertain conditions while tightening risk management when the AI model detects stronger directional conviction.
█ Settings
MA Type: Selects the moving average formula used after source selection.
MA Length: Controls the smoothing period of the AI moving average.
AI Source Smoothing: Smooths source transitions after source switching.
Memory Depth: Controls how many historical examples are stored.
Analog Count: Controls how many historical analogs participate in voting.
Learning Horizon: Controls how far ahead outcomes are evaluated.
Analog Spacing: Controls sampling diversity within the memory bank.
Learning Sensitivity × ATR: Controls how future outcomes are classified.
Use Neural Online Training: Enables the adaptive neural learning layer.
Neural Influence: Controls neural contribution to source ranking.
Learning Rate: Controls neural adaptation speed.
Huber Delta: Controls error sensitivity during training.
Auto Optimize Feature Weights: Enables adaptive feature importance learning.
Adaptation Speed: Controls weight adjustment speed.
Weight Floor: Sets minimum feature influence.
Minimum Rows: Controls when Fisher optimization becomes active.
Show AI Supertrend: Displays the adaptive trail.
ATR Length: Controls volatility measurement.
ATR Multiplier: Controls trail width.
AI Band Adaptivity: Controls AI influence over trail width.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Indicator

Indicator

Gaussian Channel System [GCS]## DESCRIPTION
Gaussian Ribbon Engine (GRE) is a multi-layer trend analysis system built on the Arnaud Legoux Moving Average (ALMA), which applies a Gaussian (bell curve) weighting function to price data instead of the linear or exponential weights used by traditional moving averages.
**Mathematical Foundation**
ALMA uses a Gaussian kernel — the same bell-curve distribution found in statistics and physics — to weight the prices in its lookback window. The Gaussian function is parameterized by two values: offset (which shifts the bell curve left or right, controlling responsiveness vs. smoothness) and sigma (which controls the width of the bell curve, determining how sharply weights decay from the center). The formula applies: w(i) = exp(-((i - offset * (N-1))^2) / (2 * sigma^2 * N^2)), where each price bar receives a weight according to its position on the Gaussian curve. This produces a moving average with mathematically optimal noise filtering properties.
GRE constructs five ALMA layers with increasing periods (default 9, 21, 55, 100, 200), creating a visual ribbon. When all five layers align in order (fastest on top for bullish, fastest on bottom for bearish), the market is in full directional agreement. The spread between the outermost layers, measured as a percentage and compared to its own historical average, identifies squeeze (convergence) and expansion (divergence) conditions.
**9-Point Confluence Scoring**
The scoring matrix evaluates: price vs. Layer 1, Layer 1 vs. 2, Layer 2 vs. 3, Layer 3 vs. 4, Layer 4 vs. 5 alignment, Layer 1 slope direction, Layer 3 slope direction, RSI above/below 50, and DI+/DI- directional movement. Signals fire when the score crosses the configurable threshold with ADX confirmation.
**Features**
- Five-layer ALMA ribbon with Gaussian kernel weighting
- Adjustable offset (0-1) and sigma parameters for fine-tuning the Gaussian bell shape
- Ribbon spread analysis with squeeze and expansion detection
- 9-point confluence scoring with visual dot notation in dashboard
- ATR-based dual take-profit levels (TP1 and TP2)
- Squeeze breakout signals when ribbon compresses then expands
- ADX and volume confirmation filters
- Full color-coded dashboard with regime classification
- Multiple alert conditions
--- Indicator

Kaufman Efficiency Ratio Gate [NovaLens]Kaufman Efficiency Ratio Gate is a regime classifier that separates trending markets from choppy ones. Instead of plotting a raw ratio and leaving you to interpret thresholds, it ranks the current Kaufman Efficiency Ratio within its own recent history and outputs a binary gate: trend-favorable or chop-dominant. Five timeframe-specific presets ship ready to use - pick the one matching your chart.
◉ HOW IT WORKS
The Efficiency Ratio measures how much of price's total movement was directional over N bars:
ER = |Close - Close(N)| / Σ|Close(i) - Close(i-1)|
A value near 1.0 means price moved in a straight line - maximum efficiency. A value near 0 means price covered distance but went nowhere net - noise. Perry Kaufman introduced this in "Trading Systems and Methods" (1995) as the foundation for his Adaptive Moving Average.
Raw ER values are hard to threshold because what counts as "efficient" varies by asset and timeframe. This gate solves that with a three-stage pipeline:
• Light EMA smoothing - removes single-bar noise from the raw ER without adding meaningful lag (Smoothing = 2 for most presets).
• Percentile rank - ranks the smoothed ER within its own rolling window. A reading at the 70th percentile means the current efficiency is higher than 70% of recent history. This is what makes the gate self-normalizing. A "trending" efficiency ratio for Gold might sit at 0.45, while for a volatile altcoin it might be 0.25 - the gate adjusts automatically to each asset's own baseline, so you never need to guess at fixed thresholds.
• Symmetric hysteresis - the gate opens when rank crosses above the median + Stability/2, and closes when rank drops below the median - Stability/2. This prevents flicker at the boundary. A small buffer (Stability = 2) is enough because KER is already a clean ratio.
Other regime tools approach this differently. ADX measures trend strength through smoothed directional movement - it tells you how strong a trend is, but its fixed scale means a reading of 25 carries different weight on different instruments. The Choppiness Index compresses ATR relative to the window's price range into a 0-100 scale - useful, but sensitive to window length and not inherently normalized. The Efficiency Ratio takes a more direct route: what fraction of total movement was net directional? And the percentile-rank layer on top makes that reading self-normalizing across any asset or timeframe - no manual threshold tuning required.
The result is a binary state: trend-favorable (gate open) or chop-dominant (gate closed).
◈ HOW TO READ IT
• Teal background / teal hero line - Gate open. The market's directional efficiency is above its recent median. Trend-following setups tend to perform better in this environment.
• Amber background / amber hero line - Gate closed. Efficiency is below the median - price is moving but not going anywhere. Trend-following setups historically tend to underperform in this environment.
• Bright teal (strong trend) - Smoothed KER is in the top 25% of its recent rank window. The trend is unusually clean - continuation setups tend to be cleaner in this state.
• Bright amber (strong chop) - Smoothed KER is in the bottom 25%. Noise is dominant - even range-bound strategies may find fewer clean entries. Generally a low-opportunity environment.
The info panel (top-right) shows the current gate state, smoothed KER value, percentile rank, and a momentum readout (strengthening / weakening / stable) based on how the rank has moved over the last few bars.
✦ HOW WE USE IT - REGIME FILTER
In systematic trading, the Efficiency Ratio often serves as one of the regime filters applied before a trend-following signal gets capital allocation. The idea is to confirm that the market is actually trending efficiently, not just moving.
When the gate is open (teal), directional efficiency is elevated. Pullback entries, breakout continuations, trend-following MA crosses - these setups tend to perform better because price is converting movement into net progress. When the gate closes (amber), the same setups historically tend to underperform. Price is volatile but going nowhere. In choppy regimes, trend-following systems generally struggle, and while mean reversion may be more favorable, it remains a harder environment to trade overall. Many systematic traders use this kind of regime awareness to reduce exposure or adjust position sizing rather than forcing directional bets.
The gate works well as a context overlay alongside other entry signals. It doesn't indicate which direction to trade, but it helps characterize whether the current environment is rewarding directional movement at all.
What the gate is NOT: a forward predictor. It classifies the recent past. A gate-open reading means efficiency has been high - it doesn't guarantee the next bar will trend. It's a filter, not a crystal ball.
◆ OTHER APPLICATIONS
• Entry filter - pair with any trend-following signal (MA cross, breakout, RSI) and add a gate-open condition. Filtering out chop regimes can help reduce whipsaw entries.
• Multi-timeframe confirmation - checking the gate on a higher timeframe before entering on a lower one can add confidence. For example, a Daily gate-open reading alongside a 4H trend entry.
• Regime-aware sizing - some traders scale position size with regime state, increasing exposure during gate-open periods and reducing it when the gate closes.
• Alert-driven workflow - set alerts on gate open/close transitions and check your trend setups only when the gate fires.
⚙ SETTINGS
Preset (default: Daily) - Timeframe-specific parameter bundles. Select the one matching your chart resolution:
• Weekly - KER 10, Smoothing 2, Rank Window 100, Stability 2. Long context window for position traders.
• Daily - KER 8, Smoothing 2, Rank Window 50, Stability 2. The default. Works well on most daily charts.
• 8H - KER 8, Smoothing 2, Rank Window 50, Stability 2. Starting point same as Daily - validate on your own 8H charts.
• 4H - KER 14, Smoothing 2, Rank Window 30, Stability 2. Wider KER period compensates for noisier intraday data.
• 30m - KER 5, Smoothing 5, Rank Window 30, Stability 2. Short KER period with heavier smoothing for fast charts.
• Custom - Drive the gate from the four inputs below.
KER Period - Lookback for the raw Efficiency Ratio. Shorter (5-8) reacts faster to regime changes. Longer (14-20) gives more stable readings but lags transitions.
Smoothing - EMA applied to the raw KER. Set to 1 for no smoothing. KER is self-normalizing by construction, so low values (1-5) are usually enough.
Rank Window - Rolling window for the percentile rank. Controls how much recent history defines "typical." Shorter windows adapt faster; longer windows give more stable context.
Stability - Hysteresis half-width around the 50th percentile. At 0, the gate flips the instant rank crosses the median. At higher values, the gate requires a stronger signal to switch state. Low values (2-5) work well since KER is already a clean signal.
Display toggles:
• Show Raw KER - thin white line showing the unsmoothed ratio
• Show Median - 50th-percentile reference line on the smoothed KER
• Show Background - teal/amber background wash (turn off if your workspace already signals the regime elsewhere)
• Show Info Panel - gate state, KER, rank, and momentum readout
• Light Theme - flips panel colours for light chart backgrounds
△ LIMITATIONS
• Backward-looking - the gate classifies recent efficiency, not future direction. Regimes can shift faster than the rank window catches, especially around news events.
• Directionless - both strong uptrends and strong downtrends produce gate-open readings. A separate directional indicator is needed to determine which side to trade.
• Noise on thin instruments - short KER periods on low-volume assets can produce noisy readings even with smoothing.
• History requirement - percentile rank needs sufficient data to be meaningful. The first ~50-100 bars on any chart (depending on preset) will have unstable rankings.
⌁ NOTES
• Based on Perry Kaufman's Efficiency Ratio from "Trading Systems and Methods" (1995)
• Cross-validated against our PyneCore Python reference implementation.
• Parameters were tuned on gold (XAUUSD) via the NovaLens research pipeline. The same presets generalize reasonably to other assets - though testing on your own instruments is always recommended.
• Regime palette: teal = trend-favorable, amber = chop-dominant. Not green/red - this is a state classifier, not a directional signal.
If you find a Custom parameter set that works well on a different instrument, the comments are a good place to share it. Indicator

AG Pro KAMA Efficiency Zones [AGPro Series]AG Pro KAMA Efficiency Zones
Overview
KAMA stands for Kaufman’s Adaptive Moving Average.
AG Pro KAMA Efficiency Zones is built around KAMA not as a simple trend-following line, but as an adaptive market reference for evaluating how efficiently price is moving. Instead of focusing only on direction, the script is designed to classify the quality of directional travel and separate cleaner movement from noisier, lower-clarity conditions.
The core idea is straightforward: markets do not move with the same quality all the time. Some phases show relatively efficient directional travel where price stays organized around an adaptive path. Other phases become mixed, unstable, or reversion-prone, where direction weakens and noise becomes more dominant. This script is designed to map those changes visually through adaptive KAMA-based zones, state labels, and a compact panel that summarizes the current condition.
This makes the tool structurally different from a basic moving average overlay. The objective is not to present KAMA as a one-line signal source. The objective is to use KAMA as the center of a state engine that helps users distinguish efficient trend phases from transitional or noisy environments.
What this script does
AG Pro KAMA Efficiency Zones evaluates price behavior around a Kaufman’s Adaptive Moving Average and organizes that behavior into visual market states. It does this by combining adaptive smoothing, slope behavior, distance from KAMA, and persistence around the KAMA path.
The result is a chart framework that can help answer questions such as:
• Is price moving in an efficient bullish or bearish path?
• Is the market entering a mixed transition phase?
• Has movement quality deteriorated into a noisier reversion-prone environment?
• Is the adaptive path becoming stronger, weaker, or less stable?
By turning those questions into zones and state-based chart feedback, the script aims to improve context rather than replace judgment.
Unique edge
The distinguishing feature of this script is that it does not treat KAMA as a standard moving average. Instead, it uses KAMA as the center of a layered efficiency model.
That model focuses on the quality of movement, not just the existence of movement.
Many tools emphasize momentum, volatility, volume pressure, or overbought/oversold conditions. This script is designed for a different purpose. It is a movement-quality map. It attempts to show whether price is traveling in a relatively efficient path or whether that path is degrading into a noisier condition where directional clarity may be weaker.
This means the script is less about predicting a move and more about classifying the environment in which a move is taking place.
How it works
The script begins with KAMA, or Kaufman’s Adaptive Moving Average. KAMA is useful because it adapts its responsiveness according to market behavior. In cleaner directional phases it can respond more quickly, while in noisier phases it can become more conservative. That makes it a practical centerline for an efficiency-based state model.
On top of KAMA, the script evaluates several components:
1. Efficiency behavior
The script measures how directly price is moving relative to its recent path. This helps estimate whether price action is acting efficiently or becoming more erratic.
2. KAMA slope behavior
The slope of KAMA is normalized so that directional angle can be evaluated in a more consistent way. Stronger and more persistent slope behavior supports higher-quality trend classifications.
3. Price-to-KAMA relationship
Price position around KAMA helps determine whether movement is aligned with the adaptive path or drifting around it without clear structure.
4. Persistence
The script also looks at how consistently price remains on one side of KAMA. That persistence can help distinguish a more stable move from a weaker and less durable one.
These components are blended into a composite efficiency model that drives the active state and the corresponding visual zone.
States and zones
The script classifies market behavior into four main states:
Efficient Bull Trend
This state reflects a comparatively organized bullish environment where price and adaptive slope are aligned in a cleaner upward path.
Efficient Bear Trend
This state reflects a comparatively organized bearish environment where price and adaptive slope are aligned in a cleaner downward path.
Transition
This is a mixed condition. Direction may be weakening, changing, or failing to achieve the quality required for an efficient trend classification.
Noise / Reversion
This state reflects lower movement quality, weaker slope behavior, or a more unstable relationship between price and the adaptive path.
The visual zone structure is designed to reinforce those classifications on the chart. Instead of using only one line, the script builds layered KAMA-centered bands so the user can read not only direction, but also how structured or fragile the current condition may be.
How to read the chart
The KAMA line is the adaptive spine of the script.
The outer and inner bands represent zone structure around that adaptive path. In stronger trend states, the script increases the visual emphasis of the KAMA path and its supporting zone layers. In weaker or more mixed conditions, the script softens those visuals and allows the chart to communicate reduced clarity.
State labels appear when the script confirms a meaningful shift in condition. These labels are intended to highlight a change in market state, not to promise a trade outcome.
The on-chart panel summarizes the active reading using fields such as State, Efficiency, Score Band, Adaptive Bias, Active Zone, and Stability. This gives the user a compact interpretation layer without requiring every decision to be made directly from raw chart inspection.
Key inputs
KAMA Efficiency Length
Controls the lookback used in the KAMA efficiency logic. Lower values react faster. Higher values smooth more noise.
KAMA Fast Response and KAMA Slow Response
Define the adaptive responsiveness range of the KAMA engine.
ATR Length
Used to normalize slope and distance so the tool behaves more consistently across different symbols and volatility conditions.
KAMA Slope Lookback
Controls how the script measures directional slope over time.
Persistence Length
Influences how much consistency price must show around KAMA before a move is treated as more structured.
Efficient Trend Threshold and Noise Threshold
These thresholds help determine when the model classifies a move as higher quality or lower quality.
Zone Band ATR Width
Adjusts the width of the adaptive visual zone.
State Hold Bars
Helps reduce rapid state flipping by requiring a condition to persist before the active state changes.
Panel Font Size and Label Size
Allow visual customization for different chart layouts and monitor sizes.
Alerts
The script includes state-oriented alerts intended to notify the user when market condition changes. These are designed around state transitions and movement-quality shifts rather than promotional “buy now” style messaging.
Examples include bullish and bearish efficiency shifts, transition detection, noise-zone detection, efficiency recovery, efficiency breakdown, and trend strengthening.
Alerts should be interpreted as contextual information. They are intended to support review and analysis, not to function as a standalone decision system.
What this script is not
This script is not a guarantee engine.
It does not predict future price with certainty.
It does not eliminate risk.
It is not a substitute for broader market structure analysis, execution planning, or risk management.
It should not be treated as a self-sufficient entry/exit system without additional confirmation and user judgment.
Limitations and transparency
All adaptive models are sensitive to parameter choices. Changing responsiveness, thresholds, smoothing, or persistence settings can materially affect the way states appear on the chart.
Because the script is state-based, some shifts will naturally occur after the earliest turning point in price. That is part of the tradeoff involved in using confirmation and persistence to reduce noise.
In highly erratic or news-driven conditions, classification can also become less stable. During those periods, transition or noise-oriented readings may occur more often, and users should interpret the visual output in that context.
The script is best viewed as an analytical framework for movement quality and adaptive context, not as a promise of directional success.
Practical use cases
Users may find the script useful for:
• separating cleaner trend phases from mixed or unstable phases
• filtering chart environments before applying another workflow
• evaluating whether direction is gaining or losing efficiency
• adding adaptive context to discretionary analysis
• comparing how different symbols behave around a KAMA-centered efficiency structure
Risk disclosure
This script is for analytical and educational use. It does not provide financial advice, investment advice, or guaranteed outcomes. Market conditions can change quickly, and any indicator can produce false, delayed, or incomplete signals. Users remain responsible for their own decisions, validation process, and risk management.
In short, AG Pro KAMA Efficiency Zones is designed to help read the quality of movement, not just the direction of movement. It uses KAMA as an adaptive reference point and converts that reference into a structured zone and state model so users can assess whether price behavior appears efficient, transitional, or noisy.
Indicator

Adaptive Volatility Bands [AVB]Adaptive Volatility Bands (AVB) is a volatility-aware trend-following overlay indicator built on the Kaufman Adaptive Moving Average (KAMA) and dynamically adjusted Bollinger-style bands.
**Mathematical Foundation:**
The core of AVB is the Kaufman Efficiency Ratio (ER), which measures the ratio of directional price movement to total price movement over a lookback period. An ER near 1.0 indicates a strong trend with minimal noise; an ER near 0.0 indicates choppy, range-bound conditions. The KAMA uses this ratio to automatically adjust its smoothing constant — responding quickly during trends and slowly during consolidation.
The bands around the KAMA are not static standard deviations. Instead, they use an adaptive standard deviation that widens when the Efficiency Ratio is low (noisy markets) and tightens when ER is high (trending markets). This creates bands that contract during consolidation (squeeze) and expand during breakouts.
**Signal Logic:**
Buy signals are generated when price touches the lower band with RSI in oversold territory during an uptrend, or when a squeeze releases with price above the KAMA. Sell signals fire at the upper band with RSI overbought during a downtrend, or at squeeze release below KAMA. Volume confirmation is applied to filter low-conviction signals.
**Features:**
- Kaufman Adaptive Moving Average with adjustable fast/slow smoothing periods
- Adaptive volatility bands that respond to market efficiency
- Volatility squeeze detection with bar coloring
- RSI and volume filters for signal confirmation
- ATR-based stop-loss and take-profit levels
- Real-time dashboard showing efficiency ratio, RSI, volatility regime, and trend direction
- Fully customizable colors and parameters
**Use Cases:**
Suitable for forex, crypto, commodities, and equities across all timeframes. Works well on 15-minute to daily charts.
Indicator

Indicator

Adaptive Statistical Smoother [Pineify]Adaptive Statistical Smoother
The Adaptive Statistical Smoother is an overlay trend-following indicator that combines a forward-backward zero-lag EMA approximation with an R-Squared trend filter to produce an adaptive moving average that tightly tracks price during trending markets and deliberately diverges during ranging conditions — solving the core problem of traditional moving averages that generate excessive whipsaw signals in sideways price action. Instead of using a fixed smoothing period or a single-pass EMA, the indicator first constructs a bidirectional (zero-phase-shift) EMA baseline that virtually eliminates the lag inherent in standard exponential averages, then modulates how closely the final adaptive MA follows this baseline based on the real-time R-Squared coefficient of determination. When R-Squared confirms a strong linear trend, the MA converges toward the zero-lag target proportionally to trend strength; when R-Squared indicates a ranging market, the MA actively pushes away from price in the last known trend direction, creating a natural buffer zone that suppresses false crossovers. Dynamic standard-deviation volatility bands and R-Squared-filtered buy/sell signals complete the system, giving traders a statistically grounded, self-adjusting trend tool with built-in noise rejection.
Key Features
Forward-backward zero-lag EMA approximation — a two-pass EMA computation (forward pass followed by a backward iteration over historical values) that closely approximates a bidirectional filter, virtually eliminating the phase lag that causes standard EMAs to react late to trend changes.
R-Squared adaptive trend filter — the Pearson correlation coefficient squared (R²) between price and bar index measures how well a linear trend fits recent data. Values above 0.5 indicate trending conditions; values below indicate ranging. This statistical metric drives the core adaptive behavior of the MA.
Dual-regime moving average — during trending markets (R² > 0.5), the adaptive MA blends toward the zero-lag target proportionally to R², tracking price closely. During ranging markets (R² ≤ 0.5), the MA diverges from price in the last known direction, creating a buffer that prevents whipsaw crossovers.
Dynamic volatility bands — standard deviation of the source price over the statistical window, scaled by a user-defined multiplier, creates upper and lower bands that automatically expand during volatile periods and contract during quiet ones.
R-Squared-filtered buy/sell signals — crossover signals between price and the adaptive MA are only generated when R² exceeds 0.3, ensuring signals fire only when there is statistically meaningful trend strength and suppressing noise during flat markets.
Trend-adaptive coloring — the MA line, volatility cloud fill, and bar colors all dynamically switch between bullish and bearish colors based on the current trend state, providing instant visual identification of the prevailing direction.
How It Works
The indicator follows a multi-stage calculation pipeline that transforms raw price data into an adaptive, statistically filtered trend line:
Forward-backward zero-lag baseline: A standard EMA is first computed on the source price. Then a second pass iterates backward over the historical EMA values, applying the same EMA alpha (2 / (smooth + 1)) at each step across the lookback window. This two-pass approach approximates a zero-phase-shift filter — the resulting baseline tracks price turns almost immediately, without the half-period delay of a conventional EMA. This baseline serves as the "target" that the adaptive MA will converge toward when the market is trending.
R-Squared trend detection: The Pearson correlation between closing prices and bar indices over the statistical window is squared to produce R². This coefficient of determination measures the proportion of price variance explained by a linear trend. R² near 1.0 means price is moving in a clean, directional manner; R² near 0.0 means price is oscillating without a clear direction. The 0.5 threshold divides the market into "trending" and "ranging" regimes.
Adaptive MA computation: In trending mode (R² > 0.5), the adaptive MA is computed as a weighted blend: R² × target + (1 − R²) × previous MA. Stronger trends (higher R²) pull the MA closer to the zero-lag target; weaker trends allow it to lag slightly, providing natural smoothing. In ranging mode (R² ≤ 0.5), the MA moves away from price by the magnitude of the target's recent change, in the direction of the last known trend bias. This deliberate divergence creates separation between price and the MA, preventing the repeated false crossovers that plague fixed-parameter moving averages in choppy markets.
Volatility bands and signal generation: Standard deviation bands are added around the adaptive MA to visualize the current volatility regime. Buy and sell signals are generated on price crossovers of the MA, but only when R² exceeds 0.3 — a secondary filter that ensures even the crossover signals carry minimum statistical trend evidence.
Trading Ideas and Insights
Trend-following entries with lag reduction: The zero-lag baseline allows the adaptive MA to respond to trend initiations significantly faster than a standard EMA of equivalent smoothing. When a BUY signal fires (price crosses above the MA with R² > 0.3), the entry is closer to the actual trend start than what a conventional moving average crossover would provide, improving the risk/reward ratio of trend-following trades.
Whipsaw avoidance in ranging markets: The adaptive divergence mechanism during low-R² periods is specifically designed to prevent the most common failure mode of moving average systems — repeated false crossovers during sideways consolidation. Traders can trust that when a signal does fire, the statistical environment supports a directional move.
Volatility band breakout confirmation: When price breaks above the upper band or below the lower band while the adaptive MA is already in the corresponding trend state, it confirms a high-volatility directional expansion. These breakouts can be used to add to existing positions or to set trailing stops at the opposite band.
R-Squared as a standalone filter: Even without acting on the buy/sell signals, traders can use the implicit R-Squared regime (visible through the MA's behavior — tight tracking vs. divergence) as a filter for other strategies. Apply your existing entry rules only when the MA is tightly tracking price (trending regime), and stand aside when the MA visibly separates from price (ranging regime).
Multi-timeframe trend alignment: Apply the indicator on both a higher timeframe (e.g., daily) and a lower timeframe (e.g., 1-hour). Take lower-timeframe BUY signals only when the higher-timeframe adaptive MA is in bullish state, and SELL signals only when the higher-timeframe is bearish. This multi-timeframe alignment leverages the adaptive nature of the indicator across different time horizons.
How Multiple Indicators Work Together
The Adaptive Statistical Smoother integrates three distinct analytical components into a unified adaptive system, each addressing a specific weakness of traditional moving averages:
Forward-backward zero-lag EMA (lag elimination): Standard moving averages inherently lag price by approximately half their lookback period. The bidirectional EMA approximation addresses this by running a second smoothing pass in reverse over historical values, canceling out the phase shift. This gives the adaptive MA a responsive baseline to track during trends — without the noise sensitivity that comes from simply using a very short-period EMA.
R-Squared trend filter (regime detection): The R-Squared coefficient provides an objective, statistical answer to the question "is the market trending right now?" This replaces subjective visual assessment or fixed-threshold approaches (like ADX) with a measure rooted in linear regression theory. R² directly controls how the adaptive MA behaves — it is not merely a signal filter but the core adaptive mechanism that switches the MA between trend-tracking and range-diverging modes.
Standard deviation volatility bands (context visualization): The bands add a volatility dimension that neither the zero-lag baseline nor the R-Squared filter provides. They show traders the expected range of price movement around the adaptive MA, helping to distinguish between normal retracements within a trend (price stays within bands) and genuine trend reversals (price breaks through bands and crosses the MA).
The synergy is structural: zero-lag EMA (responsive baseline) → R-Squared (regime classification) → adaptive blending/divergence (the adaptive MA itself) → volatility bands (context envelope) → R²-filtered crossover signals (actionable entries/exits). The zero-lag baseline ensures the MA has a fast, accurate target to track; R-Squared determines whether to track it or diverge; and the volatility bands provide the visual context for interpreting the MA's position relative to price. Each component compensates for a specific weakness — lag, false signals in ranges, and lack of volatility context — that would undermine the system if any single component were used alone.
Unique Aspects
Statistical regime switching: Unlike adaptive moving averages that use volatility or momentum to adjust their speed (e.g., KAMA, VIDYA), the Adaptive Statistical Smoother uses R-Squared — a measure of trend linearity — to switch between two fundamentally different behaviors: convergence toward a target during trends and deliberate divergence during ranges. This is a qualitatively different approach that directly addresses the root cause of whipsaw (lack of trend) rather than a symptom (high volatility).
Bidirectional EMA approximation in Pine Script: True zero-phase-shift filters require processing the entire dataset in both directions, which is not natively possible in real-time bar-by-bar computation. The forward-backward loop in this indicator approximates this by iterating over historical forward-EMA values within the lookback window, achieving near-zero lag without requiring future data — a practical implementation of signal processing theory within Pine Script's constraints.
Directional divergence mechanism: During ranging markets, the adaptive MA does not simply freeze or slow down — it actively moves away from price in the last known trend direction. This creates increasing separation that requires a genuine trend resumption (not just noise) to produce a crossover, providing a self-adjusting buffer proportional to the ranging market's volatility.
Dual-threshold R-Squared filtering: The indicator uses two R-Squared thresholds for different purposes: 0.5 for the MA's adaptive regime switch (trending vs. ranging behavior) and 0.3 for signal generation (minimum trend evidence for crossover signals). This layered approach means the MA adapts its behavior at a stricter threshold while still allowing signals in moderately trending conditions, balancing responsiveness with noise rejection.
How to Use
Add the indicator to your chart. It overlays directly on the price chart, displaying the adaptive MA line, upper and lower volatility bands, and a shaded volatility cloud between the bands.
Observe the adaptive MA line (thick colored line). When it is green and tightly tracking price, the market is in a statistically confirmed uptrend. When it is red and tracking price closely, the market is in a confirmed downtrend. When the MA visibly separates from price, the R-Squared filter has detected a ranging market and the MA is in divergence mode.
Watch for BUY signals (green "BUY" labels below bars) — these fire when price crosses above the adaptive MA and R-Squared exceeds 0.3, indicating a bullish crossover with minimum statistical trend support. Consider entering long positions or closing short positions.
Watch for SELL signals (red "SELL" labels above bars) — these fire when price crosses below the adaptive MA and R-Squared exceeds 0.3, indicating a bearish crossover with trend confirmation. Consider entering short positions or closing long positions.
Use the volatility bands (shaded cloud) to gauge the expected price range around the adaptive MA. Price touching the upper band in an uptrend suggests extended momentum; price touching the lower band in a downtrend suggests extended selling pressure. Reversals from band extremes back toward the MA can serve as mean-reversion opportunities within the prevailing trend.
Monitor bar colors for a quick visual scan of the current trend state across the chart — green bars indicate bullish trend, red bars indicate bearish trend.
Adjust the Statistical Window to match your trading timeframe. Shorter windows (10–15) make the R-Squared filter more responsive to recent price behavior — suitable for intraday or short-term swing trading. Longer windows (25–50) provide a more stable trend assessment — suitable for position trading on daily or weekly charts.
Customization
Statistical Window (default: 20): The lookback period for both the R-Squared calculation and the standard deviation bands. This is the most impactful parameter. Shorter values make the indicator more responsive — the R-Squared filter reacts faster to regime changes and the volatility bands adjust more quickly. Longer values produce smoother, more stable readings that filter out short-term noise but may delay regime detection. Start with 20 for daily charts and adjust based on your asset's typical trend duration.
Forward-Backward Smoothing (default: 10): Controls the EMA period used in the zero-lag approximation. Lower values (5–7) produce a baseline that tracks price very closely, making the adaptive MA highly responsive during trends but potentially more sensitive to noise. Higher values (15–20) produce a smoother baseline with slightly more residual lag but better noise rejection. The interaction between this parameter and the Statistical Window determines the overall character of the indicator.
Volatility Multiplier (default: 1.5): Scales the standard deviation bands around the adaptive MA. Higher values (2.0–3.0) produce wider bands that contain more price action — useful for volatile assets or for identifying only extreme deviations. Lower values (0.5–1.0) produce tighter bands that price breaks more frequently — useful for identifying smaller volatility expansions or for more active trading styles.
Bullish / Bearish Colors: Fully customizable colors applied to the adaptive MA line, volatility bands, cloud fill, signal labels, and bar coloring. Adjust to match your chart theme or to improve visibility on different background colors.
Conclusion
The Adaptive Statistical Smoother brings a statistically rigorous approach to trend following by combining a forward-backward zero-lag EMA approximation with an R-Squared-driven adaptive regime filter. The zero-lag baseline eliminates the inherent delay of conventional moving averages, while the R-Squared coefficient provides an objective, real-time assessment of whether the market is trending or ranging. During trends, the adaptive MA converges toward the responsive baseline proportionally to trend strength; during ranges, it deliberately diverges to create a whipsaw-resistant buffer zone. Dynamic volatility bands add a contextual envelope, and dual-threshold R-Squared filtering ensures that buy and sell signals carry minimum statistical trend evidence. Whether used as a standalone trend-following system or as an adaptive trend filter for other strategies, the Adaptive Statistical Smoother provides a self-adjusting framework that adapts its behavior to the current market regime — tracking trends closely when they exist and stepping aside when they do not.
Indicator

Adaptive Velocity Oscillator [UAlgo]Adaptive Velocity Oscillator is a momentum and reversal framework built around the rate of change of an Adaptive Moving Average. Instead of using a fixed smoothing engine, the script first creates a Kaufman style adaptive average whose responsiveness changes according to market efficiency, then measures how fast that adaptive baseline is moving from one bar to the next. That velocity becomes the core oscillator.
The main idea is straightforward. When the adaptive average starts accelerating upward, the oscillator rises above zero. When the adaptive average starts decelerating or turning lower, the oscillator falls below zero. This gives the user a direct view of directional pressure, but in a way that remains sensitive to changing market conditions because the underlying average itself is adaptive rather than static.
To make the oscillator more practical, the script surrounds the velocity with dynamic filter bands derived from the standard deviation of the AMA series. These bands act like a contextual noise threshold. Small fluctuations inside the band are treated as less important, while stronger moves through the band can be interpreted as meaningful directional expansion or reversal activity.
The script also supports two signal styles. Standard mode reacts to velocity transitions through the regular filter band. Extreme Reversal mode requires a deeper stretch into an expanded threshold before signaling a reversal style response. Optional price confirmation can then require bullish candle structure for buy signals and bearish candle structure for sell signals. A cooldown filter is added on top so the same type of signal cannot repeat too rapidly.
The result is an oscillator that can be used for trend context, reversal spotting, and momentum transition analysis. It is especially useful for traders who want something more adaptive than a traditional moving average crossover or a simple rate of change calculation.
🔹 Features
🔸 Adaptive AMA Core
The script uses an adaptive moving average whose smoothing constant changes according to the Efficiency Ratio. When price is moving efficiently in one direction, the average becomes more responsive. When price is noisy and directionless, the average becomes slower and more stable.
🔸 Velocity Based Oscillator
The oscillator is not built from price directly. It is built from the bar to bar change of the adaptive average. This means the indicator measures how quickly the smoothed baseline itself is moving, which creates a cleaner momentum signal than raw price change alone.
🔸 Dynamic Filter Bands
A statistical filter band is calculated from the standard deviation of the AMA series and then scaled by the user selected gamma value. This creates a noise threshold that expands and contracts with market conditions.
🔸 Standard and Extreme Reversal Modes
In Standard mode, signals are generated when velocity crosses back through the regular filter threshold. In Extreme Reversal mode, the script requires a deeper stretch using an expanded band before a signal can trigger. This gives the user a choice between more responsive and more selective behavior.
🔸 Optional Price Confirmation
Signals can require candle confirmation. Bullish signals may be restricted to bars where close is above open, and bearish signals may be restricted to bars where close is below open. This can help reduce signals that appear without supportive candle structure.
🔸 Cooldown Protection
A built in cooldown logic prevents repeated same side signals from firing too close together. This helps reduce clustering during noisy or oscillatory phases.
🔸 Trend State From Zero Crosses
The script also tracks velocity crosses through zero. These zero transitions can be interpreted as broader positive or negative momentum regime shifts.
🔸 Visual Context Through Color and Bands
The histogram and line coloring change according to whether velocity is strongly positive, strongly negative, or neutral relative to the filter zone. This makes the oscillator easy to read at a glance.
🔸 Signal Labels and Alerts
The indicator places buy and sell labels around qualifying signal bars and includes alert conditions for bullish signals, bearish signals, positive trend shifts, and negative trend shifts.
🔹 Calculations
1) AMA State Container
type AMACalculator
float value = na
float value_prev = na
float velocity = 0.0
float filterBand = 0.0
This object stores the internal state of the adaptive average engine.
value holds the latest AMA value.
value_prev stores the previous AMA value.
velocity stores the bar to bar change of that AMA.
filterBand stores the active dynamic threshold used later for signal filtering.
So before any signal logic begins, the script already has a dedicated structure for the adaptive average, its momentum, and its statistical band.
2) Efficiency Ratio Calculation
float change = math.abs(src - src )
float volatility = math.sum(math.abs(src - src ), lengthER)
float ER = volatility == 0 ? 0 : change / volatility
This is the first major step inside the AMA calculation.
The script compares two quantities.
change measures the net directional move from the current price back to the price lengthER bars ago.
volatility measures the total path traveled during that same interval by summing all absolute bar to bar changes.
The Efficiency Ratio is then:
ER = change / volatility
If price moved smoothly in one direction, net change will be large relative to total movement, and ER will be high. If price moved in a noisy back and forth way, total movement will be large but net change will be smaller, so ER will be low.
This ratio tells the AMA how efficiently price has been moving, which directly controls how responsive the adaptive average should become.
3) Building the Adaptive Smoothing Constant
float fastest = 2.0 / (fastLen + 1)
float slowest = 2.0 / (slowLen + 1)
float sc = math.pow(ER * (fastest - slowest) + slowest, 2)
This block converts the Efficiency Ratio into a smoothing constant.
First, the script computes the EMA style constants for the chosen fast and slow lengths. Then it blends between them using ER. When ER is high, the result moves closer to the fast setting. When ER is low, the result stays closer to the slow setting.
Finally, the blended value is squared. This is a classic AMA technique that makes the adaptive response more sensitive to efficiency changes.
So the smoothing constant automatically shifts between fast and slow behavior depending on market structure.
4) Updating the Adaptive Moving Average
this.value_prev := this.value
float prevAma = na(this.value_prev) ? src : this.value_prev
this.value := prevAma + sc * (src - prevAma)
This is the actual AMA update formula.
The script first stores the previous AMA value. If no previous value exists yet, it uses the current source as the starting point.
Then it updates the average using:
new AMA = previous AMA + smoothing constant × (source minus previous AMA)
So the adaptive average moves toward price, but the speed of that movement depends entirely on the previously calculated smoothing constant.
When the market is efficient, the average reacts more quickly. When the market is noisy, it reacts more slowly.
5) Computing Velocity
this.velocity := this.value - prevAma
This single line is the core of the oscillator.
Velocity here is simply the difference between the current AMA value and the previous AMA value.
If the adaptive average is rising, velocity is positive.
If the adaptive average is falling, velocity is negative.
If the adaptive average is barely moving, velocity stays close to zero.
So the oscillator is not measuring price change directly. It is measuring the momentum of the adaptive baseline itself.
6) Creating the Dynamic Filter Band
float amaGlobalSeries = amaObj.value
float sigma = ta.stdev(amaGlobalSeries, n)
amaObj.filterBand := gamma * sigma
After the AMA is calculated, the script builds a dynamic filter threshold from its standard deviation.
sigma measures how much the AMA has been varying over the selected period.
That value is then scaled by gamma to create the final filter band.
So the band expands when the adaptive average becomes more variable and contracts when the average becomes quieter.
This creates a context aware threshold that helps separate meaningful momentum movement from smaller background fluctuations.
7) Regular Band and Extreme Band
float currentVelocity = amaObj.velocity
float currentFilter = amaObj.filterBand
float extremeBand = currentFilter * extMulti
This block prepares the two signal thresholds used later.
currentFilter is the normal band.
extremeBand is a larger band created by multiplying the normal band by the user selected extreme multiplier.
So the script supports two layers of selectivity:
a regular threshold for Standard mode,
and a deeper threshold for Extreme Reversal mode.
8) Raw Signal Logic
bool rawBullSignal = sigMode == "Standard" ? ta.crossover(currentVelocity, -currentFilter) : ta.crossover(currentVelocity, -extremeBand)
bool rawBearSignal = sigMode == "Standard" ? ta.crossunder(currentVelocity, currentFilter) : ta.crossunder(currentVelocity, extremeBand)
This is the primary signal engine.
In Standard mode:
a bullish signal appears when velocity crosses upward through the negative regular filter level.
a bearish signal appears when velocity crosses downward through the positive regular filter level.
In Extreme Reversal mode:
a bullish signal requires velocity to recover upward through the deeper negative extreme band.
a bearish signal requires velocity to fall downward through the deeper positive extreme band.
The important idea is that signals are not based on zero line crosses alone. They are based on velocity reentering from stretched territory. That makes the logic more reversal oriented than a simple trend flip model.
9) Optional Price Confirmation
if reqPriceConf
rawBullSignal := rawBullSignal and close > open
rawBearSignal := rawBearSignal and close < open
This block adds an extra candle structure filter.
If price confirmation is enabled:
bullish signals are only allowed when the bar closes above its open.
bearish signals are only allowed when the bar closes below its open.
This can help reduce signals that occur mathematically in the oscillator but do not have supportive price behavior on the actual candle.
So the oscillator can be used either in pure indicator form or with a stricter candle aligned confirmation layer.
10) Cooldown Filter Logic
method filterSignal(array arr, bool cond, int waitBars) =>
bool isValid = false
if cond
int lastSignalBar = arr.size() > 0 ? arr.get(0) : -waitBars - 1
if (bar_index - lastSignalBar) >= waitBars
isValid := true
arr.unshift(bar_index)
if arr.size() > 2
arr.pop()
isValid
This method prevents signals from firing too frequently.
When a new raw signal appears, the script looks at the most recent stored signal bar for that direction. If enough bars have passed since the previous signal, the new one is accepted. Otherwise it is ignored.
The accepted signal bar index is then stored at the front of the array. Only a small recent history is kept.
So this method acts as a timing gate that stops repetitive same side signals during choppy conditions.
11) Final Signal Construction
var array lastBull = array.new()
var array lastBear = array.new()
bool finalBullSignal = lastBull.filterSignal(rawBullSignal, cooldown)
bool finalBearSignal = lastBear.filterSignal(rawBearSignal, cooldown)
This is where raw signals become final trade style signals.
Bullish signals are passed through the bullish cooldown array.
Bearish signals are passed through the bearish cooldown array.
That means buy and sell signals are filtered independently. A recent bullish signal only blocks another bullish signal, and a recent bearish signal only blocks another bearish signal.
So the script maintains clean directional spacing for both sides.
12) Histogram Coloring Logic
color histColor = currentVelocity > currentFilter ? color.new(colorUp, 20) :
currentVelocity < -currentFilter ? color.new(colorDn, 20) :
currentVelocity > 0 ? color.new(colorUp, 70) :
color.new(colorDn, 70)
This block assigns visual meaning to oscillator strength.
If velocity is above the upper regular filter, the histogram uses a stronger bullish color.
If velocity is below the lower regular filter, it uses a stronger bearish color.
If velocity is still positive but inside the filter region, it uses a softer bullish color.
If velocity is negative but inside the filter region, it uses a softer bearish color.
So the color logic tells the user both direction and intensity at the same time.
13) Drawing the Filter Bands
plot(currentFilter, "Upper Filter Band", color=color.new(colorDn, 40), linewidth=1, style=plot.style_line)
plot(-currentFilter, "Lower Filter Band", color=color.new(colorUp, 40), linewidth=1, style=plot.style_line)
plot(extremeBand, "Upper Extreme Band", color=color.new(colorDn, 60), linewidth=1, style=plot.style_line, display=sigMode == "Extreme Reversal" ? display.all : display.none)
plot(-extremeBand, "Lower Extreme Band", color=color.new(colorUp, 60), linewidth=1, style=plot.style_line, display=sigMode == "Extreme Reversal" ? display.all : display.none)
These plots create the visual threshold system.
The regular upper and lower filter bands are always shown.
The wider extreme bands are shown only when Extreme Reversal mode is selected.
This makes it easy to see whether current velocity is operating inside the neutral zone, beyond the regular band, or at deeper stretch levels.
14) Filling the Neutral Filter Region
p_upper = plot(currentFilter, display=display.none)
p_lower = plot(-currentFilter, display=display.none)
fill(p_upper, p_lower, color=color.new(colorNeu, 95), title="Filter Band Fill")
This block shades the area between the upper and lower regular filter bands.
The filled zone visually represents the neutral or lower conviction region. When velocity remains inside this zone, momentum is more muted relative to recent adaptive average behavior.
So the fill acts as a quick background cue for whether velocity is still inside normal fluctuation territory.
15) Plotting Velocity as Histogram and Line
plot(currentVelocity, "AMA Velocity", color=histColor, style=plot.style_columns)
plot(currentVelocity, "Velocity Line", color=histColor, linewidth=2)
The same velocity value is drawn in two forms.
The column plot gives a strong histogram style momentum read.
The line plot overlays the same data as a smoother continuous path.
Using both together makes the oscillator easier to read because the columns highlight amplitude while the line emphasizes turning points and transitions.
16) Signal Label Placement
if finalBullSignal
label.new(x=bar_index, y=math.min(0, currentVelocity) - math.abs(sigMode == "Extreme Reversal" ? extremeBand : currentFilter) - (math.abs(currentFilter) * 1.5),
text="▲ BUY",
color=color.new(color.white, 100),
textcolor=colorUp,
style=label.style_none,
size=size.small)
if finalBearSignal
label.new(x=bar_index, y=math.max(0, currentVelocity) + math.abs(sigMode == "Extreme Reversal" ? extremeBand : currentFilter) + (math.abs(currentFilter) * 1.5),
text="SELL ▼",
color=color.new(color.white, 100),
textcolor=colorDn,
style=label.style_none,
size=size.small)
These blocks place the signal labels outside the oscillator body rather than directly on top of the bars.
For bullish signals, the label is positioned below the relevant lower threshold area.
For bearish signals, the label is positioned above the relevant upper threshold area.
This helps keep the chart readable and visually separates the signal from the oscillator itself.
17) Alert Conditions
alertcondition(finalBullSignal, "Buy Signal", "AMA Velocity Buy Signal")
alertcondition(finalBearSignal, "Sell Signal", "AMA Velocity Sell Signal")
bool posTrend = ta.crossover(currentVelocity, 0)
bool negTrend = ta.crossunder(currentVelocity, 0)
alertcondition(posTrend, "Positive Trend", "AMA Velocity crossed above zero")
alertcondition(negTrend, "Negative Trend", "AMA Velocity crossed below zero")
The script provides four alert types.
The first two alert on final buy and sell signals after all filters and cooldown checks are applied.
The second two alert when velocity crosses the zero line, which can be interpreted as broader momentum regime shifts.
So the indicator supports both reversal style event monitoring and general trend transition monitoring. Indicator

Trend Sniper v2.5 [Jamallo](2025)
Intro
Trend Sniper v2.5 is built around a novel-unique core construction —
the Butterworth Stop : a ratcheting trailing stop anchored to a 2-Pole Butterworth Super Smoother and dynamically sized by Parkinson Volatility.
While each algorithm used is individually well-documented, this specific combination is rare and not found in standard indicator libraries — most Butterworth implementations are simply plotted as trend lines, not used as the structural anchor of a volatility-adaptive stop mechanism.
Break down:
2-Pole Butterworth Super Smoother (Core Trend Line) (smoothed price)
The backbone of the indicator is a 2-Pole Butterworth Super Smoother, a concept brought into trading by engineer and author John Ehlers, first published in his 2004 book Cybernetic Analysis for Stocks and Futures
In this indicator: The Butterworth filter runs on close with a user-defined period (default 20) and produces bw_trend — a clean, lag-minimized version of price. This smoothed value is not plotted directly. Instead, it acts as the anchor point for the trailing stop. The stop is placed at bw_trend ± stop_dist , meaning the stop hugs the filtered trend rather than raw price, making it far less susceptible to wick noise and erratic bars. Without this pre-filtering step, the trailing stop would oscillate erratically on volatile bars.
Parkinson Volatility (Sizes the Stop Distance)
"Developed by physicist Michael Parkinson in 1980, it estimates volatility using the natural logarithm of the high-to-low ratio each period, capturing intraday range rather than just close-to-close movement."
In this indicator: Parkinson Volatility is calculated over a rolling window (default 50 bars) and multiplied by stop_mult (default 1.2) to produce stop_dist . When markets are volatile, stop_dist expands and the stop gives price more room. When markets are quiet, it contracts and the stop tightens.
Butterworth Stop State Machine (The Main Line You Watch)
This is the primary plotted line, It's a classic ratcheting trailing stop built on top of outputs from steps 1 and 2.
In this indicator: The logic is a simple state machine with two modes — uptrend and downtrend. In an uptrend, the stop only moves up (never down), tracking at bw_trend − stop_dist . In a downtrend, it only moves down, tracking at bw_trend + stop_dist . When price closes on the wrong side of the stop, the state flips and the stop resets on the other side of the trend line. Because both the anchor bw_trend and the buffer stop_dist are noise-filtered and volatility-adjusted, the BW Stop flips far less often than a raw price-based trailing stop would, keeping you in trends longer.
Chande Momentum Oscillator + Deadband (Colors the BW Stop Line)
"The CMO measures momentum by calculating the difference between the sum of gains and the sum of losses over a specified period, dividing by their total to produce a normalized scale from -100 to +100 that accounts for both up and down days simultaneously."
In this indicator: CMO is calculated on bw_stop itself (not raw price), over 14 bars by default. A deadband of ±10 is applied — the line only turns bull-colored when CMO exceeds +10, and bear-colored when it drops below −10. It does not change color in between.
KAMA Midpoint (The Dynamic Midline and Fill Zone Anchor)
"Introduced by Perry Kaufman in 1995, KAMA dynamically adjusts its smoothing based on the relative efficiency of price movement".
In this indicator: Rather than applying KAMA to price directly, it's applied to the midpoint between the BW Stop and the Slow SuperTrend. This midpoint is a computed halfway value between the two lines. KAMA then smooths that midpoint adaptively, producing `kama_mid`. The fill colors you see on the chart are drawn between kama_mid and bw_stop — not between price and anything else.
Dual SuperTrend (Signals and Fill State Logic)
"Created by Olivier Seban, SuperTrend combines ATR-based volatility with trend detection into a single line that repositions dynamically as price confirms or breaks the current trend direction."
In this indicator: Two SuperTrend lines run simultaneously.
The Slow ST (9× ATR) is the macro trend reference.
The Fast ST (6× ATR) is never plotted at full size — it's compressed halfway toward the BW Stop and shown as orange circles fast_shortened
Putting It All Together
The flow through the indicator is linear: Butterworth smooths price → Parkinson sizes the stop → the state machine builds the stop line → CMO colors it → KAMA anchors the midline fill → the dual SuperTrend fires signals and shades conviction.
END
Every component feeds the next, meaning the final signals and visuals are the product of five sequential filters rather than any single calculation — which is what gives the indicator its resistance to false signals in noisy market conditions. Indicator

Strategy

Indicator

Indicator

Indicator

Adaptive ML Trailing Stop [BOSWaves]Adaptive ML Trailing Stop – Regime-Aware Risk Control with KAMA Adaptation and Pattern-Based Intelligence
Overview
Adaptive ML Trailing Stop is a regime-sensitive trailing stop and risk control system that adjusts stop placement dynamically as market behavior shifts, using efficiency-based smoothing and pattern-informed biasing.
Instead of operating with fixed ATR offsets or rigid trailing rules, stop distance, responsiveness, and directional treatment are continuously recalculated using market efficiency, volatility conditions, and historical pattern resemblance.
This creates a live trailing structure that responds immediately to regime change - contracting during orderly directional movement, relaxing during rotational conditions, and applying probabilistic refinement when pattern confidence is present.
Price is therefore assessed relative to adaptive, condition-aware trailing boundaries rather than static stop levels.
Conceptual Framework
Adaptive ML Trailing Stop is founded on the idea that effective risk control depends on regime context rather than price location alone.
Conventional trailing mechanisms apply constant volatility multipliers, which often results in trend suppression or delayed exits. This framework replaces static logic with adaptive behavior shaped by efficiency state and observed historical outcomes.
Three core principles guide the design:
Stop distance should adjust in proportion to market efficiency.
Smoothing behavior must respond to regime changes.
Trailing logic benefits from probabilistic context instead of fixed rules.
This shifts trailing stops from rigid exit tools into adaptive, regime-responsive risk boundaries.
Theoretical Foundation
The indicator combines adaptive averaging techniques, volatility-based distance modeling, and similarity-weighted pattern analysis.
Kaufman’s Adaptive Moving Average (KAMA) is used to quantify directional efficiency, allowing smoothing intensity and stop behavior to scale with trend quality. Average True Range (ATR) defines the volatility reference, while a K-Nearest Neighbors (KNN) process evaluates historical price patterns to introduce directional weighting when appropriate.
Three internal systems operate in tandem:
KAMA Efficiency Engine : Evaluates directional efficiency to distinguish structured trends from range conditions and modulate smoothing and stop behavior.
Adaptive ATR Stop Engine : Expands or contracts ATR-derived stop distance based on efficiency, tightening during strong trends and widening in low-efficiency environments.
KNN Pattern Influence Layer : Applies distance-weighted historical pattern outcomes to subtly influence stop placement on both sides.
This design allows stop behavior to evolve with market context rather than reacting mechanically to price changes.
How It Works
Adaptive ML Trailing Stop evaluates price through a sequence of adaptive processes:
Efficiency-Based Regime Identification : KAMA efficiency determines whether conditions favor trend continuation or rotational movement, influencing stop sensitivity.
Volatility-Responsive Scaling : ATR-based stop distance adjusts automatically as efficiency rises or falls.
Pattern-Weighted Adjustment : KNN compares recent price sequences to historical analogs, applying confidence-based bias to stop positioning.
Adaptive Stop Smoothing : Long and short stop levels are smoothed using KAMA logic to maintain structural stability while remaining responsive.
Directional Trailing Enforcement : Stops advance only in the direction of the prevailing regime, preserving invalidation structure.
Gradient Distance Visualization : Gradient fills reflect the relative distance between price and the active stop.
Controlled Interaction Markers : Diamond markers highlight meaningful stop interactions, filtered through cooldown logic to reduce clustering.
Together, these elements form a continuously adapting trailing stop system rather than a fixed exit mechanism.
Interpretation
Adaptive ML Trailing Stop should be interpreted as a dynamic risk envelope:
Long Stop (Green) : Acts as the downside invalidation level during bullish regimes, tightening as efficiency improves.
Short Stop (Red) : Serves as the upside invalidation level during bearish regimes, adjusting width based on efficiency and volatility.
Trend State Changes : Regime flips occur only after confirmed stop breaches, filtering temporary price spikes.
Gradient Depth : Deeper gradient penetration indicates increased extension from the stop rather than imminent reversal.
Pattern Influence : KNN weighting affects stop behavior only when historical agreement is strong and remains neutral otherwise.
Distance, efficiency, and context outweigh isolated price interactions.
Signal Logic & Visual Cues
Adaptive ML Trailing Stop presents two primary visual signals:
Trend Transition Circles : Display when price crosses the opposing trailing stop, confirming a regime change rather than anticipating one.
Stop Interaction Diamonds : Indicate controlled contact with the active stop, subject to cooldown filtering to avoid excessive signals.
Alert generation is limited to confirmed trend transitions to maintain clarity.
Strategy Integration
Adaptive ML Trailing Stop fits within trend-following and risk-managed trading approaches:
Dynamic Risk Framing : Use adaptive stops as evolving invalidation levels instead of fixed exits.
Directional Alignment : Base execution on confirmed regime state rather than speculative reversals.
Efficiency-Based Tolerance : Allow greater price fluctuation during inefficient movement while enforcing tighter control during clean trends.
Pattern-Guided Refinement : Let KNN influence adjust sensitivity without overriding core structure.
Multi-Timeframe Context : Apply higher-timeframe efficiency states to inform lower-timeframe stop responsiveness.
Technical Implementation Details
Core Engine : KAMA-based efficiency measurement with adaptive smoothing
Volatility Model : ATR-derived stop distance scaled by regime
Machine Learning Layer : Distance-weighted KNN with confidence modulation
Visualization : Directional trailing stops with layered gradient fills
Signal Logic : Regime-based transitions and controlled interaction markers
Performance Profile : Optimized for real-time chart execution
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Tight adaptive trailing for short-term momentum control
15 - 60 min : Structured intraday trend supervision
4H - Daily : Higher-timeframe regime monitoring
Suggested Baseline Configuration:
KAMA Length : 20
Fast/Slow Periods : 15 / 50
ATR Period : 21
Base ATR Multiplier : 2.5
Adaptive Strength : 1.0
KNN Neighbors : 7
KNN Influence : 0.2
These suggested parameters should be used as a baseline; their effectiveness depends on the asset volatility, liquidity, and preferred entry frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Excessive chop or overreaction : Increase KAMA Length, Slow Period, and ATR Period to reinforce regime filtering.
Stops feel overly permissive : Reduce the Base ATR Multiplier to tighten invalidation boundaries.
Frequent false regime shifts : Increase KNN Neighbors to demand stronger historical agreement.
Delayed adaptation : Decrease KAMA Length and Fast Period to improve responsiveness during regime change.
Adjustments should be incremental and evaluated over multiple market cycles rather than isolated sessions.
Performance Characteristics
High Effectiveness:
Markets exhibiting sustained directional efficiency
Instruments with recurring structural behavior
Trend-oriented, risk-managed strategies
Reduced Effectiveness:
Highly erratic or event-driven price action
Illiquid markets with unreliable volatility readings
Integration Guidelines
Confluence : Combine with BOSWaves structure or trend indicators
Discipline : Follow adaptive stop behavior rather than forcing exits
Risk Framing : Treat stops as adaptive boundaries, not forecasts
Regime Awareness : Always interpret stop behavior within efficiency context
Disclaimer
Adaptive ML Trailing Stop is a professional-grade adaptive risk and regime management tool. It does not forecast price movement and does not guarantee profitability. Results depend on market conditions, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates structure, volatility, and contextual risk management. Indicator

Moving VWAP-KAMA CloudMoving VWAP-KAMA Cloud
Overview
The Moving VWAP-KAMA Cloud is a high-conviction trend filter designed to solve a major problem with standard indicators: Noise. By combining a smoothed Volume Weighted Average Price (MVWAP) with Kaufman’s Adaptive Moving Average (KAMA), this indicator creates a "Value Zone" that identifies the true structural trend while ignoring choppy price action.
Unlike brittle lines that break constantly, this cloud is "slow" by design—making it exceptionally powerful for spotting genuine trend reversals and filtering out fakeouts.
How It Works
This script uses a unique "Double Smoothing" architecture:
The Anchor (MVWAP): We take the standard VWAP and smooth it with a 30-period EMA. This represents the "Fair Value" baseline where volume has supported price over time.
The Filter (KAMA): We apply Kaufman's Adaptive Moving Average to the already smoothed MVWAP. KAMA is unique because it flattens out during low-volatility (choppy) periods and speeds up during high-momentum trends.
The Cloud:
Green/Teal Cloud: Bullish Structure (MVWAP > KAMA)
Purple Cloud: Bearish Structure (MVWAP < KAMA)
🔥 The "Reversal Slingshot" Strategy
Backtests reveal a powerful behavior during major trend changes, particularly after long bear markets:
The Resistance Phase: During a long-term downtrend, price will repeatedly rally into the Purple Cloud and get rejected. The flattened KAMA line acts as a "concrete ceiling," keeping the bearish trend intact.
The Breakout & Flip: When price finally breaks above the cloud with conviction, and the cloud flips Green, it signals a structural regime change.
The "Slingshot" Retest: Often, immediately after this flip, price will drop back into the top of the cloud. This is the "Slingshot" moment. The old resistance becomes new, hardened support.
The Rally: From this support bounce, stocks often launch into a sustained, multi-month bull run. This setup has been observed repeatedly at the bottom of major corrections.
How to Use This Indicator
1. Dynamic Support & Resistance
The KAMA Wall: When price retraces into the cloud, the KAMA line often flattens out, acting as a hard "floor" or "wall." A break of this wall usually signals a genuine trend change, not just a stop hunt.
2. Trend Confirmation (Regime Filter)
Bullish Regime: If price is holding above the cloud, only look for Long setups.
Bearish Regime: If price is holding below the cloud, only look for Short setups.
No-Trade Zone: If price is stuck inside the cloud, the market is traversing fair value. Stand aside until a clear winner emerges.
3. Multi-Timeframe Versatility
While designed for trend confirmation on higher timeframes (4H, Daily), this indicator adapts beautifully to lower timeframes (5m, 15m) for intraday scalping.
On Lower Timeframes: The cloud reacts much faster, acting as a dynamic "VWAP Band" that helps intraday traders stay on the right side of momentum during the session.
Settings
Moving VWAP Period (30): The lookback period for the base VWAP smoothing.
KAMA Settings (10, 10, 30): Controls the sensitivity of the adaptive filter.
Cloud Transparency: Adjust to keep your chart clean.
Alerts Included
Price Cross Over/Under MVWAP
Price Cross Over/Under KAMA
Cloud Flip (Bullish/Bearish Trend Change)
Tip for Traders
This is not a signal entry indicator. It is a Trend Conviction tool. Use it to filter your entries from faster indicators (like RSI or MACD). If your fast indicator signals "Buy" but the cloud is Purple, the probability is low. Wait for the Cloud Flip Indicator

Indicator

Tunç ŞatıroğluTunç Şatıroğlu's Technical Analysis Suite
Description:
This comprehensive Pine Script indicator, inspired by the technical analysis teachings of Tunç Şatıroğlu, integrates six powerful PulseWire indicators into a single, user-friendly suite for robust trend, momentum, and divergence analysis. Each component has been carefully selected and enhanced by beytun to improve functionality, performance, and visual clarity, aligning with Şatıroğlu's approach to technical analysis. The default configuration is meticulously set to match the exact settings of the individual indicators as used by Tunç Şatıroğlu in his training, ensuring authenticity and ease of use for followers of his methodology. Whether you're a beginner or an experienced trader, this suite provides a versatile toolkit for analyzing markets across multiple timeframes.
Included Indicators:
1. WaveTrend with Crosses (by LazyBear, modified): A momentum oscillator that identifies overbought/oversold conditions and trend reversals with clear buy/sell signals via crosses and bar color highlights.
2. Kaufman Adaptive Moving Average (KAMA) (by HPotter, modified): A dynamic moving average that adapts to market volatility, offering a smoother trend-following signal.
3. SuperTrend (by Alex Orekhov, modified): A trend-following indicator that plots dynamic support/resistance levels with buy/sell signals and optional wicks for enhanced accuracy.
4. Nadaraya-Watson Envelope (by LuxAlgo, modified): A non-linear envelope that highlights potential reversals with customizable repainting options for smoother outputs.
5. Divergence for Many Indicators v4 (by LonesomeTheBlue, modified): Detects regular and hidden divergences across multiple indicators (MACD, RSI, Stochastic, CCI, Momentum, OBV, VWMA, CMF, MFI, and more) for early reversal signals.
6. Ichimoku Cloud (PulseWire built-in, modified): A multi-faceted indicator for trend direction, support/resistance, and momentum, with enhanced visuals for the Kumo Cloud.
Key Features:
- Authentic Default Settings : Pre-configured to mirror the exact parameters used by Tunç Şatıroğlu for each indicator, ensuring alignment with his proven technical analysis approach.
- Customizable Settings : Enable/disable individual indicators and fine-tune parameters to suit your trading style while retaining the option to revert to Şatıroğlu’s defaults.
- Enhanced User Experience : Modifications improve visual clarity, performance, and usability, with options like repainting smoothing for Nadaraya-Watson and adjustable Ichimoku projection periods.
- Multi-Timeframe Analysis : Combines trend-following, momentum, and divergence tools for a holistic view of market dynamics.
- Alert Conditions : Built-in alerts for SuperTrend direction changes, buy/sell signals, and divergence detections to keep you informed.
- Visual Clarity : Overlays (KAMA, SuperTrend, Nadaraya-Watson, Ichimoku) and pane-based indicators (WaveTrend, Divergences) are clearly distinguished, with customizable colors and styles.
Notes:
- The Nadaraya-Watson Envelope and Ichimoku Cloud may repaint in their default modes. Use the "Repainting Smoothing" option for Nadaraya-Watson or adjust Ichimoku settings to mitigate repainting if preferred.
- Published under the MIT License, with components licensed under GPL-3.0 (SuperTrend), CC BY-NC-SA 4.0 (Nadaraya-Watson), MPL 2.0 (Divergence), and PulseWire's terms (Ichimoku Cloud).
Usage:
Add this indicator to your PulseWire chart to leverage Tunç Şatıroğlu’s exact indicator configurations out of the box. Customize settings as needed to align with your strategy, and use the combined signals to identify trends, reversals, and divergences. Ideal for traders following Şatıroğlu’s methodologies or anyone seeking a powerful, all-in-one technical analysis tool.
Credits:
Original authors: LazyBear, HPotter, Alex Orekhov, LuxAlgo, LonesomeTheBlue, and PulseWire.
Modifications and integration by beytun .
License:
Published under the MIT License, incorporating code under GPL-3.0, CC BY-NC-SA 4.0, MPL 2.0, and PulseWire’s terms where applicable. Indicator
