OPEN-SOURCE SCRIPT
Reactive Curvature Smoother Moving Average Indicator

Summary in one paragraph
RCS MA is a reactive curvature smoother for any liquid instrument on intraday through swing timeframes. It helps you act only when context strengthens by adapting its window length with a normalized path energy score and by smoothing with robust residual weights over a quadratic fit, then optionally blending a capped one step forecast. Add it to a clean chart and watch the single colored line. Shapes can shift while a bar forms and settle on close. For conservative use, judge on bar close.
Scope and intent
• Markets: major FX pairs, index futures, large cap equities, liquid crypto
• Timeframes: one minute to daily
• Purpose: reduce lag in trends while resisting chop and outliers
• Limits: indicator only, no orders
Originality and usefulness
• Novelty: adaptive window selection by minimizing normalized path energy with directionality bias, plus Huber weighted residuals and curvature aware penalty, finished with a mintick capped forecast blend
• Failure modes addressed: whipsaws from fixed length MAs and outlier spikes that pull means
• Testable: Inputs expose all components and optional diagnostics show chosen length, directionality, and energy
• Portable yardstick: forecast cap uses mintick to stay symbol aware
Method overview in plain language
Base measures
• Range span of the tested window and a path energy defined as the sum of squared price increments, normalized by span
Components
Adaptive window chooser: scans L between Min and Max using an energy over trend score and picks the lowest score
Robust smoother: fits a quadratic to the last L bars, computes residuals, applies Huber weights and an exponential residual penalty scaled down when curvature is high
Forecast blend: projects one step ahead from the quadratic, caps displacement by a multiple of mintick, blends by user weight
Fusion rule
• Final line equals robust mean plus optional capped forecast blend
Signal rule
• Visual bias only: color turns lime when close is above the line, red otherwise
What you will see on the chart
• One colored line that tightens in trends and relaxes in chop
• Optional debug overlays for core value, chosen L, directionality, and energy
• Optional last bar label with L, directionality, and energy
• Reminder: drawings can move intrabar and settle on close
Inputs with guidance
Setup
• Source: price series to smooth
Logic
• Min window l_min. Typical 5 to 21. Higher increases stability, adds lag
• Max window l_max. Typical 40 to 128. Higher reduces noise, adds lag ceiling
• Length step grid_step. Typical 1 to 8. Smaller is finer and heavier
• Trend bias trend_bias. Typical 0.50 to 0.80. Higher favors trend persistence
• Residual penalty lambda_base. Typical 0.8 to 2.0. Higher downweights large residuals more
• Huber threshold huber_k. Typical 1.5 to 3.0. Higher admits more outliers
• Curvature guard curv_guard. Typical 0.3 to 1.0. Higher reduces influence when curve is tight
• Forecast blend lead_blend. 0 disables. Typical 0.10 to 0.40
• Forecast cap lead_limit. Typical 1 to 5 minticks
• Show chosen L and metrics show_debug. Diagnostics toggle
Optional: enable diagnostics to see length, direction, and energy
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Shapes can move while bars are open and settle on close
• Use on standard candles for analysis and combine with your own risk process
Honest limitations and failure modes
• Very quiet regimes can reduce energy contrast, length selection may hover near the bounds
• Gap heavy symbols can disrupt quadratic fit on the window edges
• Excessive forecast blend may look anticipatory; use low values and the cap
RCS MA is a reactive curvature smoother for any liquid instrument on intraday through swing timeframes. It helps you act only when context strengthens by adapting its window length with a normalized path energy score and by smoothing with robust residual weights over a quadratic fit, then optionally blending a capped one step forecast. Add it to a clean chart and watch the single colored line. Shapes can shift while a bar forms and settle on close. For conservative use, judge on bar close.
Scope and intent
• Markets: major FX pairs, index futures, large cap equities, liquid crypto
• Timeframes: one minute to daily
• Purpose: reduce lag in trends while resisting chop and outliers
• Limits: indicator only, no orders
Originality and usefulness
• Novelty: adaptive window selection by minimizing normalized path energy with directionality bias, plus Huber weighted residuals and curvature aware penalty, finished with a mintick capped forecast blend
• Failure modes addressed: whipsaws from fixed length MAs and outlier spikes that pull means
• Testable: Inputs expose all components and optional diagnostics show chosen length, directionality, and energy
• Portable yardstick: forecast cap uses mintick to stay symbol aware
Method overview in plain language
Base measures
• Range span of the tested window and a path energy defined as the sum of squared price increments, normalized by span
Components
Adaptive window chooser: scans L between Min and Max using an energy over trend score and picks the lowest score
Robust smoother: fits a quadratic to the last L bars, computes residuals, applies Huber weights and an exponential residual penalty scaled down when curvature is high
Forecast blend: projects one step ahead from the quadratic, caps displacement by a multiple of mintick, blends by user weight
Fusion rule
• Final line equals robust mean plus optional capped forecast blend
Signal rule
• Visual bias only: color turns lime when close is above the line, red otherwise
What you will see on the chart
• One colored line that tightens in trends and relaxes in chop
• Optional debug overlays for core value, chosen L, directionality, and energy
• Optional last bar label with L, directionality, and energy
• Reminder: drawings can move intrabar and settle on close
Inputs with guidance
Setup
• Source: price series to smooth
Logic
• Min window l_min. Typical 5 to 21. Higher increases stability, adds lag
• Max window l_max. Typical 40 to 128. Higher reduces noise, adds lag ceiling
• Length step grid_step. Typical 1 to 8. Smaller is finer and heavier
• Trend bias trend_bias. Typical 0.50 to 0.80. Higher favors trend persistence
• Residual penalty lambda_base. Typical 0.8 to 2.0. Higher downweights large residuals more
• Huber threshold huber_k. Typical 1.5 to 3.0. Higher admits more outliers
• Curvature guard curv_guard. Typical 0.3 to 1.0. Higher reduces influence when curve is tight
• Forecast blend lead_blend. 0 disables. Typical 0.10 to 0.40
• Forecast cap lead_limit. Typical 1 to 5 minticks
• Show chosen L and metrics show_debug. Diagnostics toggle
Optional: enable diagnostics to see length, direction, and energy
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Shapes can move while bars are open and settle on close
• Use on standard candles for analysis and combine with your own risk process
Honest limitations and failure modes
• Very quiet regimes can reduce energy contrast, length selection may hover near the bounds
• Gap heavy symbols can disrupt quadratic fit on the window edges
• Excessive forecast blend may look anticipatory; use low values and the cap
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
🔻Website: finaur.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
🔻Website: finaur.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.