OPEN-SOURCE SCRIPT
更新済 Polynomial Regression Moving Average (PRMA)

1. WHAT IS PRMA?
PRMA is a non-repainting, smoothed moving average that uses the endpoint of polynomial regression as its core value. It generalizes the classic Linear Regression Moving Average (LSMA) to any polynomial degree — including fractional values — and adds a comprehensive multi-method, multi-iteration smoothing layer on top.
In Simple Terms
PRMA fits a mathematical curve (polynomial) to recent price history, takes the last point of that curve as the current value, then optionally smooths the result using your choice of 9 different smoothing algorithms — applied up to 10 times in sequence.
2. CORE ARCHITECTURE
text
┌─────────────────────────────────────────────────────┐
│ PRMA PIPELINE │
│ │
│ Price Data ──► Polynomial Regression ──► Endpoint │
│ (OLS with degree d) Extraction │
│ │ │
│ ▼ │
│ Raw PRMA Value │
│ │ │
│ ▼ │
│ Smoothing Layer │
│ (Method × Iterations)│
│ │ │
│ ▼ │
│ Final PRMA Output │
│ │ │
│ ▼ │
│ Signal Generation │
│ (Direction Change) │
└─────────────────────────────────────────────────────┘
3. MATHEMATICAL FOUNDATION
3.1 Polynomial Regression (OLS)
For the last n bars, a polynomial of degree d is fitted:
text
ŷ(x) = β₀ + β₁x + β₂x² + ... + βₐxᵈ
The coefficients are solved via the Normal Equation:
text
β = (XᵀX)⁻¹ · Xᵀ · y
Where X is the Vandermonde matrix:
text
X = | 1 0 0² ... 0ᵈ |
| 1 1 1² ... 1ᵈ |
| 1 2 2² ... 2ᵈ |
| . . . ... . |
| 1 n-1 (n-1)² ... (n-1)ᵈ |
3.2 The Weight Kernel (Efficiency Innovation)
Instead of solving full regression every bar, a fixed weight kernel is precomputed once:
text
Kernel K = x_last · (XᵀX)⁻¹ · Xᵀ
Where x_last = [1, (n-1), (n-1)², ..., (n-1)ᵈ]
Then each bar simply computes:
text
PRMA_raw = Σ K × price[n-1-i] for i = 0 to n-1
This is a constant-time weighted sum — extremely efficient.
3.3 Fractional Degree Interpolation
For degree = 3.7:
text
kernel_3 = compute_kernel(degree=3)
kernel_4 = compute_kernel(degree=4)
final_kernel = 0.3 × kernel_3 + 0.7 × kernel_4
This allows infinitely fine-grained control over responsiveness.
3.4 Smoothing Layer
The raw PRMA value passes through a selectable smoothing function, applied iteratively:
text
smoothed₁ = smooth(raw_PRMA)
smoothed₂ = smooth(smoothed₁)
smoothed₃ = smooth(smoothed₂)
...
smoothedₙ = smooth(smoothedₙ₋₁)
Each iteration further reduces noise while adding controlled lag.
4. ALL PARAMETERS EXPLAINED
4.1 Core Parameters
Parameter Default Range Description
Source close Any price The price data fed into the regression
Period 100 ≥ 2 Number of bars in the regression lookback window
Degree 4.0 ≥ 1.0 (step 0.1) Polynomial degree — controls curve complexity
4.2 Color Parameters
Parameter Default Description
Up Green rgb(36,223,23) PRMA line color when rising
Down Fuchsia PRMA line color when falling
4.3 Smoothing Parameters
Parameter Default Range Description
Smoothing Method EMA 10 options Type of smoothing filter applied
Smoothing Length 5 ≥ 1 Lookback for the smoothing algorithm
Smoothing Iterations 1 1–10 Number of sequential smoothing passes
4.4 Signal Parameters
Parameter Default Description
Show Signals true Toggle buy/sell labels on chart
5. SMOOTHING METHODS IN DETAIL
5.1 Complete Smoothing Method Comparison
Method Formula Concept Lag Smoothness Best For
None No smoothing Zero Raw Fastest response, noisy
SMA Equal-weight average High Moderate Simple baseline smoothing
EMA Exponential decay Medium Good General purpose
WMA Linear weight decay Medium Good Recent-data emphasis
RMA Wilder's smoothing High Very High Ultra-smooth trending
HMA Hull method Low Good Low-lag smoothing
DEMA Double EMA Low Good Lag reduction
TEMA Triple EMA Very Low Moderate Minimum lag
VWMA Volume-weighted mean Medium Good Volume-aware smoothing
Gaussian Bell-curve kernel Medium Excellent Natural, artifact-free
5.2 Smoothing Method Formulas
text
SMA(n) = (P₁ + P₂ + ... + Pₙ) / n
EMA(n) = α × P + (1-α) × EMA_prev where α = 2/(n+1)
WMA(n) = (n×P₁ + (n-1)×P₂ + ... + 1×Pₙ) / (n×(n+1)/2)
RMA(n) = (1/n) × P + (1 - 1/n) × RMA_prev
HMA(n) = WMA(√n, 2×WMA(n/2) - WMA(n))
DEMA(n) = 2×EMA(n) - EMA(EMA(n))
TEMA(n) = 3×(EMA - EMA²) + EMA³
VWMA(n) = Σ(P×V) / Σ(V)
Gaussian(n) = Σ(P × e^(-0.5×(i/σ)²)) / Σ(e^(-0.5×(i/σ)²))
where σ = n/3
5.3 Multi-Iteration Effects
text
Iterations: 1 2 3 4+
│ │ │ │
Noise: Low Very Low Minimal Near Zero
Lag: Low Moderate Higher Highest
Shape: Sharp Rounded Very Round Gaussian-like
Iterations Equivalent Behavior
1 Standard single-pass filter
2 Similar to Butterworth 2nd-order
3 Approaching Gaussian response
4+ Ultra-smooth, trend-only extraction
6. SIGNAL LOGIC
6.1 Direction Detection
text
PRMA Rising → prma > prma[1] → Bullish
PRMA Falling → prma < prma[1] → Bearish
6.2 Buy Signal (Long — "L")
text
Conditions (ALL must be true):
✅ PRMA turns UP (was falling on previous bar, now rising)
✅ Close > PRMA (price confirms above the moving average)
✅ Show Signals ON
Displayed as: Green "L" label below the bar
6.3 Sell Signal (Short — "S")
text
Conditions (ALL must be true):
✅ PRMA turns DOWN (was rising on previous bar, now falling)
✅ Close < PRMA (price confirms below the moving average)
✅ Show Signals ON
Displayed as: Fuchsia "S" label above the bar
6.4 Signal Flow Diagram
text
PRMA Direction
│
┌─────────┴──────────┐
▼ ▼
Rising Falling
│ │
│ Was Falling? │ Was Rising?
│ │ │ │
▼ ▼ ▼ ▼
Yes No Yes No
│ └── No Signal │ └── No Signal
│ │
▼ ▼
Close > PRMA? Close < PRMA?
│ │
Yes ──► BUY "L" Yes ──► SELL "S"
No ──► No Signal No ──► No Signal
7. NON-REPAINTING GUARANTEE
Why PRMA Never Repaints
Factor Explanation
Fixed kernel Weight matrix computed once on first bar, never recalculated
Fixed lookback Each bar uses exactly length bars ending at length bars ago
No future data Uses source[length-1] through source[0] — all confirmed
Deterministic smoothing All smoothing methods are causal (backward-looking only)
One value per bar Once a bar closes, its PRMA value is permanently locked
Important Note
The indicator uses source[length] check, meaning the PRMA value is plotted with a length-bar delay from the source data. This ensures that ALL input data is from closed, confirmed bars — the ultimate non-repainting guarantee.
Repainting vs Non-Repainting Comparison
text
REPAINTING Polynomial Regression Channel:
Bar 100: Draws curve across bars 1-100
Bar 101: REDRAWS curve across bars 2-101 ← ALL previous values change!
NON-REPAINTING PRMA:
Bar 100: Computes endpoint of regression on bars 1-100 → single fixed value
Bar 101: Computes endpoint of regression on bars 2-101 → new single fixed value
Bar 100's value NEVER changes ✅
8. USE CASES
8.1 Trend Following
Goal: Identify and ride medium-to-long-term trends
Setup:
text
Period: 150–200
Degree: 1.5–2.5
Smoothing: EMA, Length 10, Iterations 2
Strategy:
Go Long when PRMA turns green (rising) + price above PRMA
Go Short when PRMA turns fuchsia (falling) + price below PRMA
Exit on opposite signal or when price crosses PRMA against position
Example:
text
SELL signal
↓
Price: ──╱╲──╱╲──╱╲──╲╱──╲──╲╱──╲──
PRMA: ────────╱──────╲────────╲────
Color: ████████GREEN███FUCHSIA██████
↑ BUY signal
Markets: Stocks, ETFs, Forex (trending pairs like EUR/USD, USD/JPY)
Risk Management:
Stop loss: Below PRMA line (for longs) or recent swing low
Take profit: When opposite signal appears or fixed R:R ratio
Position sizing: Based on ATR distance from PRMA
8.2 Swing Trading
Goal: Capture medium-term price swings with clean entry/exit signals
Setup:
text
Period: 50–100
Degree: 3.0–4.0
Smoothing: HMA, Length 5, Iterations 1
Strategy:
Enter Long on "L" signal when price is above a higher-timeframe support
Enter Short on "S" signal when price is below a higher-timeframe resistance
Use PRMA direction color as bias filter
Example — Multi-Timeframe Approach:
text
Daily PRMA (Period 100, Degree 2): Rising → BULLISH BIAS
4H PRMA (Period 50, Degree 4): "L" signal appears
Action: Enter Long (aligned with daily bias)
Markets: Stocks, Crypto (BTC, ETH), Commodities
8.3 Scalping / Day Trading
Goal: Quick entries and exits on short timeframes
Setup:
text
Period: 20–50
Degree: 1.0–2.0
Smoothing: TEMA, Length 3, Iterations 1
Strategy:
Use on 1m–15m charts
Enter on signal in direction of PRMA slope
Exit quickly — target 1:1 or 1:1.5 R:R
Avoid signals during consolidation (flat PRMA)
Example — 5-Minute Chart:
text
09:30 ─────────╱── PRMA turns green
09:35 ── "L" signal, price > PRMA → BUY
09:50 ── Target hit, close position
10:15 ──╲──── PRMA turns fuchsia → flat/reverse
Markets: Futures (ES, NQ), Forex (major pairs), Crypto
8.4 Mean Reversion
Goal: Trade pullbacks to the PRMA line
Setup:
text
Period: 100–150
Degree: 2.0–3.0
Smoothing: Gaussian, Length 8, Iterations 2
Strategy:
Identify trend direction via PRMA color
Wait for price to pull back TO the PRMA line (touch or cross slightly)
Enter in the direction of the PRMA trend when price bounces off PRMA
Stop loss: Beyond the PRMA line
Example:
text
Uptrend (PRMA green):
Price: ──╱──╱──╲──╱──╱──╲──╱──
PRMA: ────╱────╱────╱────╱────
↑ ↑
Pullback Pullback
to PRMA to PRMA
= BUY = BUY
Markets: Stocks with strong trends, Index ETFs (SPY, QQQ)
8.5 Volatility Regime Detection
Goal: Determine if market is trending or ranging
Setup:
text
Period: 100
Degree: 4.0 (high responsiveness)
Smoothing: SMA, Length 15, Iterations 3 (ultra-smooth)
Strategy:
Flat PRMA (minimal direction changes) → Ranging market → Use mean reversion strategies
Clearly sloped PRMA (consistent color) → Trending market → Use trend following strategies
Frequent color changes → Choppy market → Reduce position size or stay out
Example:
text
Trending Phase: Choppy Phase: Ranging Phase:
PRMA: ────╱──╱── PRMA: ╱╲╱╲╱╲╱╲ PRMA: ──────────
Color: GREEN GREEN Color: G F G F G F Color: GREEN (flat)
Action: TREND FOLLOW Action: STAY OUT Action: MEAN REVERT
Markets: All — this is a meta-strategy for selecting other strategies
8.6 Multi-PRMA System
Goal: Use multiple PRMA instances for confluence-based trading
Setup (3 PRMA instances on same chart):
Instance Period Degree Smoothing Role
Fast PRMA 30 3.0 TEMA, 3, 1 Entry trigger
Medium PRMA 80 2.5 EMA, 5, 1 Trend filter
Slow PRMA 200 1.5 SMA, 10, 2 Major trend direction
Strategy:
text
STRONG BUY:
✅ Slow PRMA rising (major uptrend)
✅ Medium PRMA rising (confirmed trend)
✅ Fast PRMA gives "L" signal (entry timing)
✅ Price > all 3 PRMAs
STRONG SELL:
✅ Slow PRMA falling (major downtrend)
✅ Medium PRMA falling (confirmed trend)
✅ Fast PRMA gives "S" signal (entry timing)
✅ Price < all 3 PRMAs
AVOID:
❌ PRMAs disagree on direction
❌ Price between fast and slow PRMA
Markets: All — particularly effective on Daily charts for position trading
8.7 Crossover System with Other Indicators
Goal: Combine PRMA with traditional indicators for confirmation
PRMA + RSI:
text
Setup: PRMA (100, 3.0, EMA 5) + RSI(14)
Long Entry:
✅ PRMA "L" signal
✅ RSI > 50 (bullish momentum)
✅ RSI not overbought (< 70)
Short Entry:
✅ PRMA "S" signal
✅ RSI < 50 (bearish momentum)
✅ RSI not oversold (> 30)
PRMA + MACD:
text
Setup: PRMA (80, 2.5, HMA 5) + MACD(12,26,9)
Long: PRMA "L" + MACD histogram positive + MACD above signal line
Short: PRMA "S" + MACD histogram negative + MACD below signal line
PRMA + Volume:
text
Setup: PRMA (100, 3.0, VWMA 5) — already volume-aware via VWMA smoothing
Long: "L" signal + Volume > 1.5× average volume = HIGH CONVICTION
Long: "L" signal + Volume < average = LOW CONVICTION (smaller position)
8.8 Crypto-Specific Use Case
Goal: Navigate volatile crypto markets with adaptive smoothing
Setup:
text
Chart: 4H BTC/USDT
Period: 60
Degree: 3.5
Smoothing: Gaussian, Length 8, Iterations 2
Strategy:
Crypto moves fast → higher degree (3.5) catches reversals quickly
Crypto is noisy → Gaussian smoothing + 2 iterations removes whipsaws
Only trade signals aligned with Daily PRMA direction
Use wider stops (crypto volatility is 3-5× traditional markets)
Example — BTC Bull Run:
text
$40,000 ──────╱── PRMA green, "L" signal → ENTER LONG
$45,000 ──╱───── PRMA still green → HOLD
$48,000 ──╲───── PRMA turns fuchsia, "S" signal → EXIT
$44,000 ──╲───── PRMA still fuchsia → SHORT or FLAT
$42,000 ──╱───── PRMA green, "L" → ENTER LONG again
8.9 Portfolio / Asset Allocation
Goal: Use PRMA as a filter for risk-on/risk-off decisions
Setup:
text
Asset: SPY (S&P 500 ETF)
Period: 200
Degree: 1.5
Smoothing: RMA, Length 20, Iterations 3
Strategy:
text
Weekly PRMA Rising (Green):
→ 100% Equities allocation
→ Overweight growth stocks
→ Risk-on positioning
Weekly PRMA Falling (Fuchsia):
→ Reduce to 50% Equities
→ Increase bonds / cash
→ Risk-off positioning
Weekly PRMA Flat / Choppy:
→ 70% Equities
→ Diversified allocation
→ Neutral positioning
8.10 Adaptive Degree Selection Guide
Goal: Choose the right degree for current market conditions
text
Market Condition → Recommended Degree
─────────────────────────────────────────────
Strong linear trend → 1.0 - 1.5
Gradual curve/acceleration→ 2.0 - 2.5
Trend with pullbacks → 3.0 - 3.5
Complex / oscillating → 4.0 - 5.0
Very choppy → 1.0 (with heavy smoothing)
9. PARAMETER OPTIMIZATION TABLE
Trading Style Timeframe Period Degree Smooth Method Smooth Length Iterations
Scalping 1m–5m 20–30 1.0–2.0 TEMA 3 1
Day Trading 5m–15m 30–60 2.0–3.0 HMA 5 1
Swing Trading 1H–4H 50–100 3.0–4.0 EMA 5–8 1–2
Position Trading Daily 100–200 2.0–3.0 Gaussian 8–12 2
Investing Weekly 50–100 1.0–2.0 RMA 10–20 2–3
Crypto Trading 4H 50–80 3.0–4.0 Gaussian 8 2
Forex 1H 60–120 2.0–3.0 DEMA 5 1
Futures 5m–30m 30–60 2.0–3.0 HMA 5 1
Low Noise Any Any 1.5–2.5 SMA 15–20 3–4
Fast Response Any 20–50 4.0–5.0 None – –
10. DEGREE COMPARISON VISUAL
text
Degree 1.0 (Linear):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ────────╱────────── Very smooth, slow to turn
Signals: ▲ Rare signals
Degree 2.0 (Quadratic):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ──────╱──────╲──── Moderate curvature
Signals: ▲ ▼ Balanced signals
Degree 3.0 (Cubic):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ────╱──╱──╲──╲╱─── Catches inflections
Signals: ▲ ▲ ▼ ▲ More signals
Degree 4.0 (Quartic):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ──╱╲─╱╲──╲╱╲─╱╲── Very responsive
Signals: ▲▼ ▲▼ ▼▲▼ ▲▼ Many signals (may whipsaw)
Degree 4.0 + Smoothing (EMA 5, Iter 2):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ───╱───╱───╲───╲── Responsive but clean
Signals: ▲ ▲ ▼ ▼ Filtered, reliable signals ✅
11. SMOOTHING ITERATIONS VISUAL
text
Raw PRMA (No Smoothing):
╱╲╱╲╱──╱╲──╲╱╲╱╲──╱╲ Noisy, many direction changes
1 Iteration (EMA 5):
─╱╲╱───╱╲───╲╱╲───╱─ Some noise removed
2 Iterations (EMA 5):
──╱─────╱─────╲────╱─ Much cleaner
3 Iterations (EMA 5):
───╱─────╱──────╲───╱ Very smooth, clear trend
5 Iterations (EMA 5):
────╱──────╱───────╲─ Ultra-smooth, trend only
12. STRENGTHS & LIMITATIONS
✅ Strengths
Feature Benefit
Non-repainting Reliable for backtesting and live trading — what you see is what you get
Fractional degree Unprecedented fine-tuning between integer polynomial degrees
10 smoothing methods Adapt to any market condition or trading style
Multi-iteration smoothing Cascaded filtering for noise-free output
Precomputed kernel Computationally efficient — fixed weights, simple weighted sum
Generalizes LSMA Degree 1 = LSMA; higher degrees capture curves
Confirmed signals Price must be on the correct side of PRMA for signal validation
Visual clarity Color-coded direction makes trend identification instant
⚠️ Limitations
Limitation Mitigation
Lag (inherent in all MAs) Use lower period, higher degree, or TEMA/HMA smoothing
Overfitting (high degree + short period) Keep degree ≤ period/20 as rule of thumb
Whipsaws in ranging markets Increase smoothing iterations or add trend filter
No prediction — shows current state, not forecast Combine with leading indicators (RSI, MACD)
Runge's phenomenon at extreme degrees Stay below degree 8–10 for practical use
Fixed lag offset of length bars This ensures non-repainting — a deliberate trade-off
Over-smoothing possible with high iterations Start with 1–2 iterations, increase only if needed
13. QUICK-START RECOMMENDATIONS
Beginner Setup (Start Here)
text
Period: 100 | Degree: 2.0 | Smooth: EMA | Length: 5 | Iterations: 1
→ Clean, balanced, works on most markets and timeframes
Intermediate Setup
text
Period: 80 | Degree: 3.0 | Smooth: HMA | Length: 5 | Iterations: 1
→ More responsive to curves, low-lag smoothing
Advanced Setup
text
Period: 60 | Degree: 3.5 | Smooth: Gaussian | Length: 8 | Iterations: 2
→ Captures complex patterns with natural noise reduction
14. SUMMARY
PRMA bridges the gap between simple moving averages and complex curve-fitting analysis. It transforms polynomial regression from a repainting analytical overlay into a practical, non-repainting trading tool with:
Fractional polynomial degrees for precision tuning
9 smoothing methods + multi-iteration for adaptive noise reduction
Clean directional signals validated by price confirmation
Zero repainting guaranteed by fixed kernel architecture
Whether you're scalping crypto on a 1-minute chart or managing a portfolio on weekly timeframes, PRMA's configurable parameters can be optimized for your specific trading style and market conditions.
PRMA is a non-repainting, smoothed moving average that uses the endpoint of polynomial regression as its core value. It generalizes the classic Linear Regression Moving Average (LSMA) to any polynomial degree — including fractional values — and adds a comprehensive multi-method, multi-iteration smoothing layer on top.
In Simple Terms
PRMA fits a mathematical curve (polynomial) to recent price history, takes the last point of that curve as the current value, then optionally smooths the result using your choice of 9 different smoothing algorithms — applied up to 10 times in sequence.
2. CORE ARCHITECTURE
text
┌─────────────────────────────────────────────────────┐
│ PRMA PIPELINE │
│ │
│ Price Data ──► Polynomial Regression ──► Endpoint │
│ (OLS with degree d) Extraction │
│ │ │
│ ▼ │
│ Raw PRMA Value │
│ │ │
│ ▼ │
│ Smoothing Layer │
│ (Method × Iterations)│
│ │ │
│ ▼ │
│ Final PRMA Output │
│ │ │
│ ▼ │
│ Signal Generation │
│ (Direction Change) │
└─────────────────────────────────────────────────────┘
3. MATHEMATICAL FOUNDATION
3.1 Polynomial Regression (OLS)
For the last n bars, a polynomial of degree d is fitted:
text
ŷ(x) = β₀ + β₁x + β₂x² + ... + βₐxᵈ
The coefficients are solved via the Normal Equation:
text
β = (XᵀX)⁻¹ · Xᵀ · y
Where X is the Vandermonde matrix:
text
X = | 1 0 0² ... 0ᵈ |
| 1 1 1² ... 1ᵈ |
| 1 2 2² ... 2ᵈ |
| . . . ... . |
| 1 n-1 (n-1)² ... (n-1)ᵈ |
3.2 The Weight Kernel (Efficiency Innovation)
Instead of solving full regression every bar, a fixed weight kernel is precomputed once:
text
Kernel K = x_last · (XᵀX)⁻¹ · Xᵀ
Where x_last = [1, (n-1), (n-1)², ..., (n-1)ᵈ]
Then each bar simply computes:
text
PRMA_raw = Σ K × price[n-1-i] for i = 0 to n-1
This is a constant-time weighted sum — extremely efficient.
3.3 Fractional Degree Interpolation
For degree = 3.7:
text
kernel_3 = compute_kernel(degree=3)
kernel_4 = compute_kernel(degree=4)
final_kernel = 0.3 × kernel_3 + 0.7 × kernel_4
This allows infinitely fine-grained control over responsiveness.
3.4 Smoothing Layer
The raw PRMA value passes through a selectable smoothing function, applied iteratively:
text
smoothed₁ = smooth(raw_PRMA)
smoothed₂ = smooth(smoothed₁)
smoothed₃ = smooth(smoothed₂)
...
smoothedₙ = smooth(smoothedₙ₋₁)
Each iteration further reduces noise while adding controlled lag.
4. ALL PARAMETERS EXPLAINED
4.1 Core Parameters
Parameter Default Range Description
Source close Any price The price data fed into the regression
Period 100 ≥ 2 Number of bars in the regression lookback window
Degree 4.0 ≥ 1.0 (step 0.1) Polynomial degree — controls curve complexity
4.2 Color Parameters
Parameter Default Description
Up Green rgb(36,223,23) PRMA line color when rising
Down Fuchsia PRMA line color when falling
4.3 Smoothing Parameters
Parameter Default Range Description
Smoothing Method EMA 10 options Type of smoothing filter applied
Smoothing Length 5 ≥ 1 Lookback for the smoothing algorithm
Smoothing Iterations 1 1–10 Number of sequential smoothing passes
4.4 Signal Parameters
Parameter Default Description
Show Signals true Toggle buy/sell labels on chart
5. SMOOTHING METHODS IN DETAIL
5.1 Complete Smoothing Method Comparison
Method Formula Concept Lag Smoothness Best For
None No smoothing Zero Raw Fastest response, noisy
SMA Equal-weight average High Moderate Simple baseline smoothing
EMA Exponential decay Medium Good General purpose
WMA Linear weight decay Medium Good Recent-data emphasis
RMA Wilder's smoothing High Very High Ultra-smooth trending
HMA Hull method Low Good Low-lag smoothing
DEMA Double EMA Low Good Lag reduction
TEMA Triple EMA Very Low Moderate Minimum lag
VWMA Volume-weighted mean Medium Good Volume-aware smoothing
Gaussian Bell-curve kernel Medium Excellent Natural, artifact-free
5.2 Smoothing Method Formulas
text
SMA(n) = (P₁ + P₂ + ... + Pₙ) / n
EMA(n) = α × P + (1-α) × EMA_prev where α = 2/(n+1)
WMA(n) = (n×P₁ + (n-1)×P₂ + ... + 1×Pₙ) / (n×(n+1)/2)
RMA(n) = (1/n) × P + (1 - 1/n) × RMA_prev
HMA(n) = WMA(√n, 2×WMA(n/2) - WMA(n))
DEMA(n) = 2×EMA(n) - EMA(EMA(n))
TEMA(n) = 3×(EMA - EMA²) + EMA³
VWMA(n) = Σ(P×V) / Σ(V)
Gaussian(n) = Σ(P × e^(-0.5×(i/σ)²)) / Σ(e^(-0.5×(i/σ)²))
where σ = n/3
5.3 Multi-Iteration Effects
text
Iterations: 1 2 3 4+
│ │ │ │
Noise: Low Very Low Minimal Near Zero
Lag: Low Moderate Higher Highest
Shape: Sharp Rounded Very Round Gaussian-like
Iterations Equivalent Behavior
1 Standard single-pass filter
2 Similar to Butterworth 2nd-order
3 Approaching Gaussian response
4+ Ultra-smooth, trend-only extraction
6. SIGNAL LOGIC
6.1 Direction Detection
text
PRMA Rising → prma > prma[1] → Bullish
PRMA Falling → prma < prma[1] → Bearish
6.2 Buy Signal (Long — "L")
text
Conditions (ALL must be true):
✅ PRMA turns UP (was falling on previous bar, now rising)
✅ Close > PRMA (price confirms above the moving average)
✅ Show Signals ON
Displayed as: Green "L" label below the bar
6.3 Sell Signal (Short — "S")
text
Conditions (ALL must be true):
✅ PRMA turns DOWN (was rising on previous bar, now falling)
✅ Close < PRMA (price confirms below the moving average)
✅ Show Signals ON
Displayed as: Fuchsia "S" label above the bar
6.4 Signal Flow Diagram
text
PRMA Direction
│
┌─────────┴──────────┐
▼ ▼
Rising Falling
│ │
│ Was Falling? │ Was Rising?
│ │ │ │
▼ ▼ ▼ ▼
Yes No Yes No
│ └── No Signal │ └── No Signal
│ │
▼ ▼
Close > PRMA? Close < PRMA?
│ │
Yes ──► BUY "L" Yes ──► SELL "S"
No ──► No Signal No ──► No Signal
7. NON-REPAINTING GUARANTEE
Why PRMA Never Repaints
Factor Explanation
Fixed kernel Weight matrix computed once on first bar, never recalculated
Fixed lookback Each bar uses exactly length bars ending at length bars ago
No future data Uses source[length-1] through source[0] — all confirmed
Deterministic smoothing All smoothing methods are causal (backward-looking only)
One value per bar Once a bar closes, its PRMA value is permanently locked
Important Note
The indicator uses source[length] check, meaning the PRMA value is plotted with a length-bar delay from the source data. This ensures that ALL input data is from closed, confirmed bars — the ultimate non-repainting guarantee.
Repainting vs Non-Repainting Comparison
text
REPAINTING Polynomial Regression Channel:
Bar 100: Draws curve across bars 1-100
Bar 101: REDRAWS curve across bars 2-101 ← ALL previous values change!
NON-REPAINTING PRMA:
Bar 100: Computes endpoint of regression on bars 1-100 → single fixed value
Bar 101: Computes endpoint of regression on bars 2-101 → new single fixed value
Bar 100's value NEVER changes ✅
8. USE CASES
8.1 Trend Following
Goal: Identify and ride medium-to-long-term trends
Setup:
text
Period: 150–200
Degree: 1.5–2.5
Smoothing: EMA, Length 10, Iterations 2
Strategy:
Go Long when PRMA turns green (rising) + price above PRMA
Go Short when PRMA turns fuchsia (falling) + price below PRMA
Exit on opposite signal or when price crosses PRMA against position
Example:
text
SELL signal
↓
Price: ──╱╲──╱╲──╱╲──╲╱──╲──╲╱──╲──
PRMA: ────────╱──────╲────────╲────
Color: ████████GREEN███FUCHSIA██████
↑ BUY signal
Markets: Stocks, ETFs, Forex (trending pairs like EUR/USD, USD/JPY)
Risk Management:
Stop loss: Below PRMA line (for longs) or recent swing low
Take profit: When opposite signal appears or fixed R:R ratio
Position sizing: Based on ATR distance from PRMA
8.2 Swing Trading
Goal: Capture medium-term price swings with clean entry/exit signals
Setup:
text
Period: 50–100
Degree: 3.0–4.0
Smoothing: HMA, Length 5, Iterations 1
Strategy:
Enter Long on "L" signal when price is above a higher-timeframe support
Enter Short on "S" signal when price is below a higher-timeframe resistance
Use PRMA direction color as bias filter
Example — Multi-Timeframe Approach:
text
Daily PRMA (Period 100, Degree 2): Rising → BULLISH BIAS
4H PRMA (Period 50, Degree 4): "L" signal appears
Action: Enter Long (aligned with daily bias)
Markets: Stocks, Crypto (BTC, ETH), Commodities
8.3 Scalping / Day Trading
Goal: Quick entries and exits on short timeframes
Setup:
text
Period: 20–50
Degree: 1.0–2.0
Smoothing: TEMA, Length 3, Iterations 1
Strategy:
Use on 1m–15m charts
Enter on signal in direction of PRMA slope
Exit quickly — target 1:1 or 1:1.5 R:R
Avoid signals during consolidation (flat PRMA)
Example — 5-Minute Chart:
text
09:30 ─────────╱── PRMA turns green
09:35 ── "L" signal, price > PRMA → BUY
09:50 ── Target hit, close position
10:15 ──╲──── PRMA turns fuchsia → flat/reverse
Markets: Futures (ES, NQ), Forex (major pairs), Crypto
8.4 Mean Reversion
Goal: Trade pullbacks to the PRMA line
Setup:
text
Period: 100–150
Degree: 2.0–3.0
Smoothing: Gaussian, Length 8, Iterations 2
Strategy:
Identify trend direction via PRMA color
Wait for price to pull back TO the PRMA line (touch or cross slightly)
Enter in the direction of the PRMA trend when price bounces off PRMA
Stop loss: Beyond the PRMA line
Example:
text
Uptrend (PRMA green):
Price: ──╱──╱──╲──╱──╱──╲──╱──
PRMA: ────╱────╱────╱────╱────
↑ ↑
Pullback Pullback
to PRMA to PRMA
= BUY = BUY
Markets: Stocks with strong trends, Index ETFs (SPY, QQQ)
8.5 Volatility Regime Detection
Goal: Determine if market is trending or ranging
Setup:
text
Period: 100
Degree: 4.0 (high responsiveness)
Smoothing: SMA, Length 15, Iterations 3 (ultra-smooth)
Strategy:
Flat PRMA (minimal direction changes) → Ranging market → Use mean reversion strategies
Clearly sloped PRMA (consistent color) → Trending market → Use trend following strategies
Frequent color changes → Choppy market → Reduce position size or stay out
Example:
text
Trending Phase: Choppy Phase: Ranging Phase:
PRMA: ────╱──╱── PRMA: ╱╲╱╲╱╲╱╲ PRMA: ──────────
Color: GREEN GREEN Color: G F G F G F Color: GREEN (flat)
Action: TREND FOLLOW Action: STAY OUT Action: MEAN REVERT
Markets: All — this is a meta-strategy for selecting other strategies
8.6 Multi-PRMA System
Goal: Use multiple PRMA instances for confluence-based trading
Setup (3 PRMA instances on same chart):
Instance Period Degree Smoothing Role
Fast PRMA 30 3.0 TEMA, 3, 1 Entry trigger
Medium PRMA 80 2.5 EMA, 5, 1 Trend filter
Slow PRMA 200 1.5 SMA, 10, 2 Major trend direction
Strategy:
text
STRONG BUY:
✅ Slow PRMA rising (major uptrend)
✅ Medium PRMA rising (confirmed trend)
✅ Fast PRMA gives "L" signal (entry timing)
✅ Price > all 3 PRMAs
STRONG SELL:
✅ Slow PRMA falling (major downtrend)
✅ Medium PRMA falling (confirmed trend)
✅ Fast PRMA gives "S" signal (entry timing)
✅ Price < all 3 PRMAs
AVOID:
❌ PRMAs disagree on direction
❌ Price between fast and slow PRMA
Markets: All — particularly effective on Daily charts for position trading
8.7 Crossover System with Other Indicators
Goal: Combine PRMA with traditional indicators for confirmation
PRMA + RSI:
text
Setup: PRMA (100, 3.0, EMA 5) + RSI(14)
Long Entry:
✅ PRMA "L" signal
✅ RSI > 50 (bullish momentum)
✅ RSI not overbought (< 70)
Short Entry:
✅ PRMA "S" signal
✅ RSI < 50 (bearish momentum)
✅ RSI not oversold (> 30)
PRMA + MACD:
text
Setup: PRMA (80, 2.5, HMA 5) + MACD(12,26,9)
Long: PRMA "L" + MACD histogram positive + MACD above signal line
Short: PRMA "S" + MACD histogram negative + MACD below signal line
PRMA + Volume:
text
Setup: PRMA (100, 3.0, VWMA 5) — already volume-aware via VWMA smoothing
Long: "L" signal + Volume > 1.5× average volume = HIGH CONVICTION
Long: "L" signal + Volume < average = LOW CONVICTION (smaller position)
8.8 Crypto-Specific Use Case
Goal: Navigate volatile crypto markets with adaptive smoothing
Setup:
text
Chart: 4H BTC/USDT
Period: 60
Degree: 3.5
Smoothing: Gaussian, Length 8, Iterations 2
Strategy:
Crypto moves fast → higher degree (3.5) catches reversals quickly
Crypto is noisy → Gaussian smoothing + 2 iterations removes whipsaws
Only trade signals aligned with Daily PRMA direction
Use wider stops (crypto volatility is 3-5× traditional markets)
Example — BTC Bull Run:
text
$40,000 ──────╱── PRMA green, "L" signal → ENTER LONG
$45,000 ──╱───── PRMA still green → HOLD
$48,000 ──╲───── PRMA turns fuchsia, "S" signal → EXIT
$44,000 ──╲───── PRMA still fuchsia → SHORT or FLAT
$42,000 ──╱───── PRMA green, "L" → ENTER LONG again
8.9 Portfolio / Asset Allocation
Goal: Use PRMA as a filter for risk-on/risk-off decisions
Setup:
text
Asset: SPY (S&P 500 ETF)
Period: 200
Degree: 1.5
Smoothing: RMA, Length 20, Iterations 3
Strategy:
text
Weekly PRMA Rising (Green):
→ 100% Equities allocation
→ Overweight growth stocks
→ Risk-on positioning
Weekly PRMA Falling (Fuchsia):
→ Reduce to 50% Equities
→ Increase bonds / cash
→ Risk-off positioning
Weekly PRMA Flat / Choppy:
→ 70% Equities
→ Diversified allocation
→ Neutral positioning
8.10 Adaptive Degree Selection Guide
Goal: Choose the right degree for current market conditions
text
Market Condition → Recommended Degree
─────────────────────────────────────────────
Strong linear trend → 1.0 - 1.5
Gradual curve/acceleration→ 2.0 - 2.5
Trend with pullbacks → 3.0 - 3.5
Complex / oscillating → 4.0 - 5.0
Very choppy → 1.0 (with heavy smoothing)
9. PARAMETER OPTIMIZATION TABLE
Trading Style Timeframe Period Degree Smooth Method Smooth Length Iterations
Scalping 1m–5m 20–30 1.0–2.0 TEMA 3 1
Day Trading 5m–15m 30–60 2.0–3.0 HMA 5 1
Swing Trading 1H–4H 50–100 3.0–4.0 EMA 5–8 1–2
Position Trading Daily 100–200 2.0–3.0 Gaussian 8–12 2
Investing Weekly 50–100 1.0–2.0 RMA 10–20 2–3
Crypto Trading 4H 50–80 3.0–4.0 Gaussian 8 2
Forex 1H 60–120 2.0–3.0 DEMA 5 1
Futures 5m–30m 30–60 2.0–3.0 HMA 5 1
Low Noise Any Any 1.5–2.5 SMA 15–20 3–4
Fast Response Any 20–50 4.0–5.0 None – –
10. DEGREE COMPARISON VISUAL
text
Degree 1.0 (Linear):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ────────╱────────── Very smooth, slow to turn
Signals: ▲ Rare signals
Degree 2.0 (Quadratic):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ──────╱──────╲──── Moderate curvature
Signals: ▲ ▼ Balanced signals
Degree 3.0 (Cubic):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ────╱──╱──╲──╲╱─── Catches inflections
Signals: ▲ ▲ ▼ ▲ More signals
Degree 4.0 (Quartic):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ──╱╲─╱╲──╲╱╲─╱╲── Very responsive
Signals: ▲▼ ▲▼ ▼▲▼ ▲▼ Many signals (may whipsaw)
Degree 4.0 + Smoothing (EMA 5, Iter 2):
Price: ╱╲╱──╱╲──╱╲╱╲──╱╲
PRMA: ───╱───╱───╲───╲── Responsive but clean
Signals: ▲ ▲ ▼ ▼ Filtered, reliable signals ✅
11. SMOOTHING ITERATIONS VISUAL
text
Raw PRMA (No Smoothing):
╱╲╱╲╱──╱╲──╲╱╲╱╲──╱╲ Noisy, many direction changes
1 Iteration (EMA 5):
─╱╲╱───╱╲───╲╱╲───╱─ Some noise removed
2 Iterations (EMA 5):
──╱─────╱─────╲────╱─ Much cleaner
3 Iterations (EMA 5):
───╱─────╱──────╲───╱ Very smooth, clear trend
5 Iterations (EMA 5):
────╱──────╱───────╲─ Ultra-smooth, trend only
12. STRENGTHS & LIMITATIONS
✅ Strengths
Feature Benefit
Non-repainting Reliable for backtesting and live trading — what you see is what you get
Fractional degree Unprecedented fine-tuning between integer polynomial degrees
10 smoothing methods Adapt to any market condition or trading style
Multi-iteration smoothing Cascaded filtering for noise-free output
Precomputed kernel Computationally efficient — fixed weights, simple weighted sum
Generalizes LSMA Degree 1 = LSMA; higher degrees capture curves
Confirmed signals Price must be on the correct side of PRMA for signal validation
Visual clarity Color-coded direction makes trend identification instant
⚠️ Limitations
Limitation Mitigation
Lag (inherent in all MAs) Use lower period, higher degree, or TEMA/HMA smoothing
Overfitting (high degree + short period) Keep degree ≤ period/20 as rule of thumb
Whipsaws in ranging markets Increase smoothing iterations or add trend filter
No prediction — shows current state, not forecast Combine with leading indicators (RSI, MACD)
Runge's phenomenon at extreme degrees Stay below degree 8–10 for practical use
Fixed lag offset of length bars This ensures non-repainting — a deliberate trade-off
Over-smoothing possible with high iterations Start with 1–2 iterations, increase only if needed
13. QUICK-START RECOMMENDATIONS
Beginner Setup (Start Here)
text
Period: 100 | Degree: 2.0 | Smooth: EMA | Length: 5 | Iterations: 1
→ Clean, balanced, works on most markets and timeframes
Intermediate Setup
text
Period: 80 | Degree: 3.0 | Smooth: HMA | Length: 5 | Iterations: 1
→ More responsive to curves, low-lag smoothing
Advanced Setup
text
Period: 60 | Degree: 3.5 | Smooth: Gaussian | Length: 8 | Iterations: 2
→ Captures complex patterns with natural noise reduction
14. SUMMARY
PRMA bridges the gap between simple moving averages and complex curve-fitting analysis. It transforms polynomial regression from a repainting analytical overlay into a practical, non-repainting trading tool with:
Fractional polynomial degrees for precision tuning
9 smoothing methods + multi-iteration for adaptive noise reduction
Clean directional signals validated by price confirmation
Zero repainting guaranteed by fixed kernel architecture
Whether you're scalping crypto on a 1-minute chart or managing a portfolio on weekly timeframes, PRMA's configurable parameters can be optimized for your specific trading style and market conditions.
リリースノート
PRMA — Polynomial Regression Moving AverageWhat Is It?
A non-repainting moving average built from the endpoint of polynomial regression, generalized to any degree — including fractional values — with a multi-method smoothing layer on top.
It fits a polynomial curve to recent price, extracts the last point, then optionally smooths it using 9 algorithms applied up to 10 times in sequence.
Degree 1 = LSMA. Higher degrees capture curves, acceleration, and complex price structures that linear regression misses.
How It Works
text
Price → Polynomial Regression (OLS) → Endpoint → Smoothing (Method × Iterations) → Final Value → Signals
Key innovation: A fixed weight kernel is precomputed once from the regression math. Each bar is just a simple weighted sum — fast and guaranteed non-repainting.
Fractional degrees (e.g., 3.7) interpolate between integer kernels, giving fine-grained control over responsiveness.
Parameters
Parameter Default Purpose
Source close Price input
Period 100 Regression lookback window
Degree 4.0 Polynomial complexity (step 0.1)
Smoothing Method EMA Filter type (None/SMA/EMA/WMA/RMA/HMA/DEMA/TEMA/VWMA/Gaussian)
Smoothing Length 5 Smoothing lookback
Smoothing Iterations 1 Sequential passes (1–10)
Show Signals true Buy/Sell labels
Smoothing Methods
Method Lag Best For
None Zero Raw, fastest response
SMA High Simple baseline
EMA Medium General purpose
WMA Medium Recent-data emphasis
RMA High Ultra-smooth trends
HMA Low Low-lag smoothing
DEMA Low Lag reduction
TEMA Very Low Minimum lag
VWMA Medium Volume-aware
Gaussian Medium Cleanest, most natural
More iterations = smoother and more lag. Start with 1–2; use 3+ only for trend-extraction.
Signal Logic
Signal Condition
Buy "L" PRMA turns up (was falling) AND close > PRMA
Sell "S" PRMA turns down (was rising) AND close < PRMA
Direction change alone isn't enough — price must confirm the side. This filters false signals.
Non-Repainting Guarantee
Fixed precomputed kernel + confirmed bars only + causal smoothing = once a bar closes, its value never changes. What you see in backtesting is what you'd see live.
Quick-Start Presets
Style Period Degree Smoothing
Beginner 100 2.0 EMA 5, 1 iter
Swing 50–100 3.0–4.0 HMA 5, 1 iter
Scalping 20–50 1.0–2.0 TEMA 3, 1 iter
Position/Investing 100–200 1.5–2.5 Gaussian 10, 2 iter
Crypto 50–80 3.5 Gaussian 8, 2 iter
Degree Guide
Degree Behavior
1.0–1.5 Linear trend, fewest signals, most lag
2.0–2.5 Captures acceleration/deceleration
3.0–3.5 Catches inflection points and pullbacks
4.0–5.0 Highly responsive — pair with smoothing to avoid whipsaws
Rule of thumb: Keep degree ≤ period / 20.
Use Cases
Trend following — Ride PRMA color (green = long, fuchsia = short)
Mean reversion — Trade pullbacks to PRMA line in direction of its slope
Multi-PRMA — Fast (30) + Medium (80) + Slow (200) for confluence
Regime filter — Flat PRMA = ranging; sloped = trending; choppy color = stay out
Combine with RSI/MACD/Volume for confirmation
Strengths & Limitations
✅ Non-repainting · Fractional degree precision · 9 smoothing options · Efficient computation · Generalizes LSMA · Price-confirmed signals
⚠️ Inherent MA lag · Can overfit with high degree + short period · Whipsaws in ranges (add smoothing iterations) · Not predictive on its own
⚠️ Not financial advice. Use proper risk management.
リリースノート
PRMA — Polynomial Regression Moving Average━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔷 OVERVIEW
A non-repainting moving average built from the endpoint of polynomial regression, generalized to any degree — including fractional values — with a multi-method smoothing layer on top.
It fits a polynomial curve to recent price, extracts the last point, then optionally smooths it using 9 algorithms applied up to 10 times in sequence.
Degree 1 = LSMA. Higher degrees capture curves, acceleration, and complex price structures that linear regression misses.
🔷 HOW IT WORKS
Price → Polynomial Regression (OLS) → Endpoint → Smoothing (Method × Iterations) → Final Value → Signals
A fixed weight kernel is precomputed once from the regression math. Each bar is just a simple weighted sum — fast and guaranteed non-repainting.
Fractional degrees (e.g. 3.7) interpolate between integer kernels, giving fine-grained control over responsiveness.
🔷 PARAMETERS
Source (close) — Price input
Period (100) — Regression lookback window
Degree (4.0) — Polynomial complexity, step 0.1
Smoothing Method (EMA) — Filter type: None / SMA / EMA / WMA / RMA / HMA / DEMA / TEMA / VWMA / Gaussian
Smoothing Length (5) — Smoothing lookback
Smoothing Iterations (1) — Sequential passes, 1–10
Show Signals (true) — Toggle buy/sell labels
🔷 SMOOTHING METHODS
None → Zero lag, raw fastest response
SMA → High lag, simple baseline
EMA → Medium lag, general purpose ⭐
WMA → Medium lag, recent-data emphasis
RMA → High lag, ultra-smooth trends
HMA → Low lag, low-lag smoothing ⭐
DEMA → Low lag, lag reduction
TEMA → Very low lag, minimum lag ⭐
VWMA → Medium lag, volume-aware
Gaussian → Medium lag, cleanest and most natural ⭐
More iterations = smoother + more lag. Start with 1–2, use 3+ only for pure trend extraction.
🔷 SIGNAL LOGIC
Buy "L" — PRMA turns up (was falling) AND close > PRMA
Sell "S" — PRMA turns down (was rising) AND close < PRMA
Direction change alone isn't enough — price must confirm the side. This filters false signals.
🔷 NON-REPAINTING GUARANTEE
Fixed precomputed kernel + confirmed bars only + causal smoothing = once a bar closes, its value never changes. What you see in backtesting is what you would have seen live.
🔷 QUICK-START PRESETS
Beginner — Period 100, Degree 2.0, EMA 5, 1 iteration
Swing — Period 50–100, Degree 3.0–4.0, HMA 5, 1 iteration
Scalping — Period 20–50, Degree 1.0–2.0, TEMA 3, 1 iteration
Position/Investing — Period 100–200, Degree 1.5–2.5, Gaussian 10, 2 iterations
Crypto — Period 50–80, Degree 3.5, Gaussian 8, 2 iterations
🔷 DEGREE GUIDE
1.0–1.5 → Linear trend, fewest signals, most lag
2.0–2.5 → Captures acceleration and deceleration
3.0–3.5 → Catches inflection points and pullbacks
4.0–5.0 → Highly responsive — pair with smoothing to avoid whipsaws
Rule of thumb: keep degree ≤ period / 20.
🔷 USE CASES
• Trend following — ride PRMA color (green = long, fuchsia = short)
• Mean reversion — trade pullbacks to PRMA line in direction of its slope
• Multi-PRMA — overlay Fast (30) + Medium (80) + Slow (200) for confluence
• Regime filter — flat PRMA = ranging, sloped = trending, choppy color changes = stay out
• Combine with RSI, MACD, or Volume for confirmation
🔷 STRENGTHS
✓ Non-repainting — reliable for backtesting and live trading
✓ Fractional degree precision — fine-tune between integer polynomials
✓ 9 smoothing options with multi-iteration — adapt to any market
✓ Efficient computation — precomputed kernel, constant-time per bar
✓ Generalizes LSMA — degree 1 recovers classic linear regression MA
✓ Price-confirmed signals — reduces false entries
🔷 LIMITATIONS
✗ Inherent MA lag (all moving averages lag — mitigate with lower period or TEMA/HMA)
✗ Can overfit with high degree + short period
✗ Whipsaws in ranging markets — increase smoothing iterations or add a trend filter
✗ Not predictive on its own — combine with other tools
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Not financial advice. Use proper risk management.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。