OPEN-SOURCE SCRIPT
Güncellendi Artemis Oscillator PRO

Artemis Oscillator PRO is a momentum oscillator built on a custom Directional Range Momentum (DRM) engine — an original algorithm that measures signed range impulse, not price distance. Unlike RSI or Stochastic, DRM scores the direction and force of range expansion relative to its own history, normalized to 0–100. The result is an oscillator that reacts cleanly to structural momentum shifts without the lag inherent in traditional smoothed-ratio oscillators.
The indicator integrates five analytical layers — oscillator core, volume pressure, momentum state scoring, divergence detection, and KNN machine learning bias — each operating independently and rendered on a single, clean oscillator panel.
🟦 HOW THE CORE ENGINE WORKS
**Directional Range Momentum (DRM)**
Each bar, the engine measures the current highest high and lowest low over the lookback period. It then assigns a signed range force:
- If the range is expanding to the upside → positive force (full range span)
- If the range is expanding to the downside → negative force (negative full span)
- If range is stable → raw tick delta (neutral)
This signed force is split into two smoothed components:
- `sUp` — smoothed directed force (can be positive or negative)
- `sAbs` — smoothed absolute force (always positive, represents total activity)
The oscillator value is: `(sUp / sAbs) * 50 + 50`
This produces a 0–100 scale where 50 is neutral, above 50 means upward range pressure dominates, and below 50 means downward range pressure dominates. Division by the absolute component normalizes the output regardless of asset volatility.
**Signal Line**
A second independently configurable smoothing pass over the oscillator value. Crossovers between the oscillator and signal line mark momentum regime changes.
**Smoothing Methods**
Four algorithms available for both oscillator and signal line:
- RMA — Wilder's Moving Average (default, most stable, minimal overreaction)
- EMA — Exponential, faster response
- SMA — Simple, equal weight across all bars
- TMA — Double-smoothed SMA, maximum smoothness
🟦 VOLUME PRESSURE
**Dual MFI Architecture**
Volume Pressure uses two Money Flow Index calculations simultaneously:
- Fast MFI: `Period / 1.33` (shorter window, more reactive)
- Slow MFI: `Period * 1.33` (longer window, structural bias)
These are blended 50/50, then passed through a power-curve compression function (`x^0.75`) that reduces extreme readings while preserving directional accuracy. The result is mapped to 0–100 and rendered as fill areas anchored at the midline:
- Above 50: Inflow fill (buying pressure dominates)
- Below 50: Outflow fill (selling pressure dominates)
The MFI price source is configurable: HLC3 (default), Close, HL2, or OHLC4.
🟦 MOMENTUM STATE SCORING
A composite score from 0 to 3 is calculated each bar using three independent binary conditions:
| Condition | +1 Point |
|---|---|
| Oscillator > Signal Line | Momentum direction |
| Oscillator > 50 | Oscillator position |
| Volume Pressure > 50 | Volume confirmation |
**Score interpretation:**
- Score 3 → Full overbought state fill (all three conditions bull-aligned)
- Score 2 → Partial overbought fill (two conditions)
- Score 1 → Partial oversold fill (one condition)
- Score 0 → Full oversold state fill (all three conditions bear-aligned)
Fills render inside the oscillator panel at adjustable opacity. The scoring is continuous — it updates every bar without look-ahead.
🟦 MOMENTUM EXHAUSTION
Exhaustion labels (`✦ OB` / `✦ OS`) fire when the oscillator is inside a zone but weakening consecutively. Specifically:
✦ OB — oscillator is at or above the OB threshold AND has closed lower for N consecutive bars
✦ OS — oscillator is at or below the OS threshold AND has closed higher for N consecutive bars
N (Confirmation Bars) is configurable from 1 to 4. Higher values produce fewer but more structurally confirmed signals. This is not a predictive signal — it marks the process of momentum fading, not the reversal itself.
🟦 DIVERGENCE DETECTION
Pivots are calculated using `ta.pivothigh` and `ta.pivotlow` with an arm of `Period / 2`. All divergence results appear `Period / 2` bars late — this is standard Pine Script pivot behavior, not a bug.
**Four divergence types:**
| Type | Price | Oscillator | Signal |
|---|---|---|---|
| Regular Bull (D▲) | Lower Low | Higher Low | Potential reversal up |
| Regular Bear (D▼) | Higher High | Lower High | Potential reversal down |
| Hidden Bull (H▲) | Higher Low | Lower Low | Uptrend continuation |
| Hidden Bear (H▼) | Lower High | Higher High | Downtrend continuation |
Regular divergence uses solid lines. Hidden divergence uses dashed lines. Labels use clean symbol-only style with no background box.
**Smart Divergence Filter (AI)**
An optional pre-filter that rejects low-quality divergence signals before they render. Three conditions must pass (each configurable independently):
1. Minimum oscillator swing between the two pivot points (default: 5 units)
2. Minimum price swing as a percentage of recent range (default: 0.3%)
3. Volume Pressure confirmation — VP must agree with divergence direction
When the filter is OFF, all detected divergences render. When ON, only structurally significant divergences pass. The filter applies identically to both chart rendering and alert conditions — no mismatch between visual and alert signals.
🟦 KNN BIAS PANEL
**What KNN Does**
K-Nearest Neighbors (KNN) is a non-parametric machine learning algorithm. Each bar, the indicator stores the current market state as a point in 3-dimensional feature space. When making a prediction, it finds the K historically most similar states and votes on the likely outcome.
**The Three Features**
| Feature | Calculation | Signal |
|---|---|---|
| O (Oscillator) | `oscVal / 100` | O+ = above 50 (bull zone) |
| V (Volume) | `vpMid / 100` | V+ = above 50 (inflow) |
| S (Signal gap) | `(oscVal - sigVal + 100) / 200` | S+ = oscillator above trigger |
**ATR-Normalized Output Label**
The classification target uses ATR-adjusted thresholds rather than a raw `close > close[1]` comparison. A bar is labeled bullish only if close moved more than `0.1 × ATR(14)` upward, bearish if it moved more than `0.1 × ATR(14)` downward, otherwise the previous label is carried forward. This eliminates noise-driven label flips caused by micro price movements.
**Distance Calculation**
Euclidean distance in 3D feature space:
```
d = sqrt((kf1_now - kf1_hist)^2 + (kf2_now - kf2_hist)^2 + (kf3_now - kf3_hist)^2)
```
The K nearest historical points vote. If majority voted bullish → BULL bias. Result thresholds: ≥60% bull vote = BULL, ≤40% = BEAR, between = NEUTRAL.
**Panel Display**
| Row | Left | Right |
|---|---|---|
| Header | KNN AI | Direction (▲ BULL / ▼ BEAR / ◈ NEUTRAL) |
| Row 1 | Confidence | Percentage (0–100%) |
| Row 2 | Progress bar (█░) | Bars in training memory |
| Row 3 | O± V± S± feature states | K= neighbor count |
Panel renders with monospace font, theme-aware backgrounds, and a single accent color derived from the active theme.
🟦 COLOR THEMES
Eight complete palettes, each defining five independently tuned colors (bull, bear, signal, VP buy, VP sell):
| Theme | Character | Bull Color | Bear Color |
|---|---|---|---|
| Aurora | Dark mode, high contrast | Cyan | Violet |
| Ember | Dark mode, warm | Amber | Steel Blue |
| Cyber | Dark mode, neon | Lime Green | Crimson |
| Arctic | Dark mode, cool | Sky Blue | Soft Purple |
| Solar | Dark mode, warm gold | Yellow Gold | Salmon |
| Obsidian | Dark mode, pro trader | Emerald | Scarlet |
| Classic | Light mode | Navy Blue | Crimson |
| Mono | Light mode, minimal | Near Black | Gray |
All five color roles (bull/bear/signal/VP buy/VP sell) change simultaneously when the theme changes. No per-color manual adjustment required.
🟦 ALERT SYSTEM
Twelve alert conditions, all using `alert.freq_once_per_bar`:
| Alert | Condition |
|---|---|
| Bullish Cross | Oscillator crosses above signal while below midline |
| Bearish Cross | Oscillator crosses below signal while above midline |
| Exit Oversold | Oscillator crosses above OS level |
| Exit Overbought | Oscillator crosses below OB level |
| Regular Bull Divergence | Price LL + oscillator HL (+ Smart Filter if enabled) |
| Regular Bear Divergence | Price HH + oscillator LH (+ Smart Filter if enabled) |
| Hidden Bull Divergence | Price HL + oscillator LL (+ Smart Filter if enabled) |
| Hidden Bear Divergence | Price LH + oscillator HH (+ Smart Filter if enabled) |
| VP Inflow | Volume Pressure crosses above 50 |
| VP Outflow | Volume Pressure crosses below 50 |
| Exhaustion OB | Oscillator weakening N bars while above OB level |
| Exhaustion OS | Oscillator strengthening N bars while below OS level |
Divergence alerts respect the Smart Divergence Filter — if the filter is ON and a divergence is rejected visually, the alert will also not fire.
🟦 SETTINGS REFERENCE
**Oscillator**
- Period — DRM lookback window. Also controls divergence pivot arm (Period / 2). Default: 14
- Smoothing — EMA / SMA / RMA / TMA. Default: RMA
- Source — Price input for the range engine. Default: Close
- Adaptive Color — Oscillator line shifts between bull/bear colors based on position. Default: ON
**Signal Line**
- Period — Signal smoothing window. Default: 7
- Smoothing — EMA / SMA / RMA / TMA. Default: EMA
- Show Cross Dots — Dot on signal line at each crossover. Default: ON
**Zones & Fills**
- Overbought level — Default: 80
- Oversold level — Default: 20
- Zone fill opacity — Configurable per zone. Default: 20
**Volume Pressure**
- Show Volume Pressure — Toggle. Default: ON
- MFI Source — HLC3 / Close / HL2 / OHLC4. Default: HLC3
- Opacity — Default: 18
**Momentum State**
- Show Momentum State — Toggle. Default: ON
- OB Opacity / OS Opacity — Default: 35 each
**Divergence**
- Regular / Hidden — Independent toggles and opacity controls
- Label Size — Tiny / Small / Normal / Large. Default: Tiny
- Smart Divergence Filter — ON/OFF. Default: OFF
- Min Oscillator Swing — Default: 5.0
- Min Price Swing % — Default: 0.3%
- Require VP Confirmation — Default: ON
**Momentum Exhaustion**
- Show Labels — Toggle. Default: ON
- Confirmation Bars — 1 to 4. Default: 4
**KNN Bias**
- Show KNN Panel — Toggle. Default: ON
- Neighbors (K) — 3 to 10. Default: 5
- Training Window — 50 to 300 bars. Default: 100
- Panel Position — Four corners. Default: Bottom Right
- Panel Text Size — Tiny / Small / Normal / Large. Default: Small
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in TradingView Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
The DRM engine normalizes by its own absolute smoothed component, making it volatility-agnostic across assets and timeframes without manual recalibration.
🟦 TECHNICAL NOTES
- Pine Script v6
- max_lines_count = 500`, `max_labels_count = 500` (divergence drawings)
- No repainting — all values calculated on bar close. Pivot-based divergence results appear `Period / 2` bars late by design
- KNN training updates only after `bar_index > 1` to avoid cold-start artifacts
- Volume Pressure fill anchors use `color = na` (not `display.none`) to maintain Pine v6 `fill()` compatibility
- OB/OS state fills render outside the 0–100 oscillator range (104–110 and −10 to −4) to avoid visual overlap
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own analysis and apply proper risk management.
The indicator integrates five analytical layers — oscillator core, volume pressure, momentum state scoring, divergence detection, and KNN machine learning bias — each operating independently and rendered on a single, clean oscillator panel.
🟦 HOW THE CORE ENGINE WORKS
**Directional Range Momentum (DRM)**
Each bar, the engine measures the current highest high and lowest low over the lookback period. It then assigns a signed range force:
- If the range is expanding to the upside → positive force (full range span)
- If the range is expanding to the downside → negative force (negative full span)
- If range is stable → raw tick delta (neutral)
This signed force is split into two smoothed components:
- `sUp` — smoothed directed force (can be positive or negative)
- `sAbs` — smoothed absolute force (always positive, represents total activity)
The oscillator value is: `(sUp / sAbs) * 50 + 50`
This produces a 0–100 scale where 50 is neutral, above 50 means upward range pressure dominates, and below 50 means downward range pressure dominates. Division by the absolute component normalizes the output regardless of asset volatility.
**Signal Line**
A second independently configurable smoothing pass over the oscillator value. Crossovers between the oscillator and signal line mark momentum regime changes.
**Smoothing Methods**
Four algorithms available for both oscillator and signal line:
- RMA — Wilder's Moving Average (default, most stable, minimal overreaction)
- EMA — Exponential, faster response
- SMA — Simple, equal weight across all bars
- TMA — Double-smoothed SMA, maximum smoothness
🟦 VOLUME PRESSURE
**Dual MFI Architecture**
Volume Pressure uses two Money Flow Index calculations simultaneously:
- Fast MFI: `Period / 1.33` (shorter window, more reactive)
- Slow MFI: `Period * 1.33` (longer window, structural bias)
These are blended 50/50, then passed through a power-curve compression function (`x^0.75`) that reduces extreme readings while preserving directional accuracy. The result is mapped to 0–100 and rendered as fill areas anchored at the midline:
- Above 50: Inflow fill (buying pressure dominates)
- Below 50: Outflow fill (selling pressure dominates)
The MFI price source is configurable: HLC3 (default), Close, HL2, or OHLC4.
🟦 MOMENTUM STATE SCORING
A composite score from 0 to 3 is calculated each bar using three independent binary conditions:
| Condition | +1 Point |
|---|---|
| Oscillator > Signal Line | Momentum direction |
| Oscillator > 50 | Oscillator position |
| Volume Pressure > 50 | Volume confirmation |
**Score interpretation:**
- Score 3 → Full overbought state fill (all three conditions bull-aligned)
- Score 2 → Partial overbought fill (two conditions)
- Score 1 → Partial oversold fill (one condition)
- Score 0 → Full oversold state fill (all three conditions bear-aligned)
Fills render inside the oscillator panel at adjustable opacity. The scoring is continuous — it updates every bar without look-ahead.
🟦 MOMENTUM EXHAUSTION
Exhaustion labels (`✦ OB` / `✦ OS`) fire when the oscillator is inside a zone but weakening consecutively. Specifically:
✦ OB — oscillator is at or above the OB threshold AND has closed lower for N consecutive bars
✦ OS — oscillator is at or below the OS threshold AND has closed higher for N consecutive bars
N (Confirmation Bars) is configurable from 1 to 4. Higher values produce fewer but more structurally confirmed signals. This is not a predictive signal — it marks the process of momentum fading, not the reversal itself.
🟦 DIVERGENCE DETECTION
Pivots are calculated using `ta.pivothigh` and `ta.pivotlow` with an arm of `Period / 2`. All divergence results appear `Period / 2` bars late — this is standard Pine Script pivot behavior, not a bug.
**Four divergence types:**
| Type | Price | Oscillator | Signal |
|---|---|---|---|
| Regular Bull (D▲) | Lower Low | Higher Low | Potential reversal up |
| Regular Bear (D▼) | Higher High | Lower High | Potential reversal down |
| Hidden Bull (H▲) | Higher Low | Lower Low | Uptrend continuation |
| Hidden Bear (H▼) | Lower High | Higher High | Downtrend continuation |
Regular divergence uses solid lines. Hidden divergence uses dashed lines. Labels use clean symbol-only style with no background box.
**Smart Divergence Filter (AI)**
An optional pre-filter that rejects low-quality divergence signals before they render. Three conditions must pass (each configurable independently):
1. Minimum oscillator swing between the two pivot points (default: 5 units)
2. Minimum price swing as a percentage of recent range (default: 0.3%)
3. Volume Pressure confirmation — VP must agree with divergence direction
When the filter is OFF, all detected divergences render. When ON, only structurally significant divergences pass. The filter applies identically to both chart rendering and alert conditions — no mismatch between visual and alert signals.
🟦 KNN BIAS PANEL
**What KNN Does**
K-Nearest Neighbors (KNN) is a non-parametric machine learning algorithm. Each bar, the indicator stores the current market state as a point in 3-dimensional feature space. When making a prediction, it finds the K historically most similar states and votes on the likely outcome.
**The Three Features**
| Feature | Calculation | Signal |
|---|---|---|
| O (Oscillator) | `oscVal / 100` | O+ = above 50 (bull zone) |
| V (Volume) | `vpMid / 100` | V+ = above 50 (inflow) |
| S (Signal gap) | `(oscVal - sigVal + 100) / 200` | S+ = oscillator above trigger |
**ATR-Normalized Output Label**
The classification target uses ATR-adjusted thresholds rather than a raw `close > close[1]` comparison. A bar is labeled bullish only if close moved more than `0.1 × ATR(14)` upward, bearish if it moved more than `0.1 × ATR(14)` downward, otherwise the previous label is carried forward. This eliminates noise-driven label flips caused by micro price movements.
**Distance Calculation**
Euclidean distance in 3D feature space:
```
d = sqrt((kf1_now - kf1_hist)^2 + (kf2_now - kf2_hist)^2 + (kf3_now - kf3_hist)^2)
```
The K nearest historical points vote. If majority voted bullish → BULL bias. Result thresholds: ≥60% bull vote = BULL, ≤40% = BEAR, between = NEUTRAL.
**Panel Display**
| Row | Left | Right |
|---|---|---|
| Header | KNN AI | Direction (▲ BULL / ▼ BEAR / ◈ NEUTRAL) |
| Row 1 | Confidence | Percentage (0–100%) |
| Row 2 | Progress bar (█░) | Bars in training memory |
| Row 3 | O± V± S± feature states | K= neighbor count |
Panel renders with monospace font, theme-aware backgrounds, and a single accent color derived from the active theme.
🟦 COLOR THEMES
Eight complete palettes, each defining five independently tuned colors (bull, bear, signal, VP buy, VP sell):
| Theme | Character | Bull Color | Bear Color |
|---|---|---|---|
| Aurora | Dark mode, high contrast | Cyan | Violet |
| Ember | Dark mode, warm | Amber | Steel Blue |
| Cyber | Dark mode, neon | Lime Green | Crimson |
| Arctic | Dark mode, cool | Sky Blue | Soft Purple |
| Solar | Dark mode, warm gold | Yellow Gold | Salmon |
| Obsidian | Dark mode, pro trader | Emerald | Scarlet |
| Classic | Light mode | Navy Blue | Crimson |
| Mono | Light mode, minimal | Near Black | Gray |
All five color roles (bull/bear/signal/VP buy/VP sell) change simultaneously when the theme changes. No per-color manual adjustment required.
🟦 ALERT SYSTEM
Twelve alert conditions, all using `alert.freq_once_per_bar`:
| Alert | Condition |
|---|---|
| Bullish Cross | Oscillator crosses above signal while below midline |
| Bearish Cross | Oscillator crosses below signal while above midline |
| Exit Oversold | Oscillator crosses above OS level |
| Exit Overbought | Oscillator crosses below OB level |
| Regular Bull Divergence | Price LL + oscillator HL (+ Smart Filter if enabled) |
| Regular Bear Divergence | Price HH + oscillator LH (+ Smart Filter if enabled) |
| Hidden Bull Divergence | Price HL + oscillator LL (+ Smart Filter if enabled) |
| Hidden Bear Divergence | Price LH + oscillator HH (+ Smart Filter if enabled) |
| VP Inflow | Volume Pressure crosses above 50 |
| VP Outflow | Volume Pressure crosses below 50 |
| Exhaustion OB | Oscillator weakening N bars while above OB level |
| Exhaustion OS | Oscillator strengthening N bars while below OS level |
Divergence alerts respect the Smart Divergence Filter — if the filter is ON and a divergence is rejected visually, the alert will also not fire.
🟦 SETTINGS REFERENCE
**Oscillator**
- Period — DRM lookback window. Also controls divergence pivot arm (Period / 2). Default: 14
- Smoothing — EMA / SMA / RMA / TMA. Default: RMA
- Source — Price input for the range engine. Default: Close
- Adaptive Color — Oscillator line shifts between bull/bear colors based on position. Default: ON
**Signal Line**
- Period — Signal smoothing window. Default: 7
- Smoothing — EMA / SMA / RMA / TMA. Default: EMA
- Show Cross Dots — Dot on signal line at each crossover. Default: ON
**Zones & Fills**
- Overbought level — Default: 80
- Oversold level — Default: 20
- Zone fill opacity — Configurable per zone. Default: 20
**Volume Pressure**
- Show Volume Pressure — Toggle. Default: ON
- MFI Source — HLC3 / Close / HL2 / OHLC4. Default: HLC3
- Opacity — Default: 18
**Momentum State**
- Show Momentum State — Toggle. Default: ON
- OB Opacity / OS Opacity — Default: 35 each
**Divergence**
- Regular / Hidden — Independent toggles and opacity controls
- Label Size — Tiny / Small / Normal / Large. Default: Tiny
- Smart Divergence Filter — ON/OFF. Default: OFF
- Min Oscillator Swing — Default: 5.0
- Min Price Swing % — Default: 0.3%
- Require VP Confirmation — Default: ON
**Momentum Exhaustion**
- Show Labels — Toggle. Default: ON
- Confirmation Bars — 1 to 4. Default: 4
**KNN Bias**
- Show KNN Panel — Toggle. Default: ON
- Neighbors (K) — 3 to 10. Default: 5
- Training Window — 50 to 300 bars. Default: 100
- Panel Position — Four corners. Default: Bottom Right
- Panel Text Size — Tiny / Small / Normal / Large. Default: Small
🟦 COMPATIBILITY
Works on all asset classes and all timeframes in TradingView Pine Script v6.
- Crypto: Spot, futures, perpetual contracts
- Forex: All pairs
- Equities: Stocks, ETFs, indices
- Commodities: Metals, energy, agriculture
- Timeframes: 1m through Monthly
The DRM engine normalizes by its own absolute smoothed component, making it volatility-agnostic across assets and timeframes without manual recalibration.
🟦 TECHNICAL NOTES
- Pine Script v6
- max_lines_count = 500`, `max_labels_count = 500` (divergence drawings)
- No repainting — all values calculated on bar close. Pivot-based divergence results appear `Period / 2` bars late by design
- KNN training updates only after `bar_index > 1` to avoid cold-start artifacts
- Volume Pressure fill anchors use `color = na` (not `display.none`) to maintain Pine v6 `fill()` compatibility
- OB/OS state fills render outside the 0–100 oscillator range (104–110 and −10 to −4) to avoid visual overlap
🟦 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own analysis and apply proper risk management.
Sürüm Notları
🟦UPDATE — v1.1.0 Three PRO themes added: Bloomberg (Wall Street finance terminal heritage), Solar (Solarized developer palette), Royal (imperial gold + purple luxury). The original "Solar" theme (warm gold + salmon) has been renamed to "Helios" to free up the Solar namespace for the Solarized palette.
Sürüm Notları
🟦 UPDATE — v1.2.0The biggest update yet — four new decision layers, a smarter AI core, and a fully anti-repaint engine. Everything heavy ships OFF or None by default, so your existing setup stays exactly as it was until you switch a feature on.
NEW
• MTF Confluence Panel — runs the DRM oscillator on four higher timeframes at once and grades their agreement: ▲▲▲▲ / ▼▼▼▼ ALIGNED for full conviction, ◮ MIXED when they disagree. Six ready presets (Scalp through Position, plus Crypto & Forex). Fully anti-repaint (lookahead_off); any timeframe below your chart shows "— n/a" and never skews the result.
• AOP Score (0–100) — one composite read of overall bias, blending Oscillator (30%), Volume Pressure (25%), Momentum State (20%) and KNN (25%) into a single number with a tier (STRONG BULL through STRONG BEAR), plus a live up/down momentum arrow showing whether the score is strengthening or fading over the last 3 bars.
• Reversal Confluence marker (R▲ / R▼) — the highest-conviction signal in the indicator: prints only when Momentum Exhaustion AND a same-direction Regular Divergence line up at the same swing. Two independent confirmations, one mark.
• Adaptive OB/OS Zones (optional) — overbought/oversold bands that self-calibrate to each asset using a percentile of recent behavior, clamped to your manual levels so they never invert.
• Volume Pressure Divergence (optional) — flags where price and money-flow disagree at a swing (VP▲ / VP▼) — exhaustion-by-participation that price-vs-oscillator divergence can miss.
• Bar Coloring (optional) — paint price bars by Oscillator, Volume Pressure, Momentum State, or AOP Score, all in the active theme palette.
ENGINE & FIXES
• KNN is now leakage-free — the current bar is excluded from its own nearest-neighbor search, so the vote is honest and never sees itself.
• Fully repaint-safe MTF — every higher-timeframe request uses lookahead_off and resolves on closed bars.
• Clean compile — adaptive levels and all cross signals are computed every bar (no conditional-ta warnings).
• Polished UI — brighter, readable NEUTRAL / FLAT readouts; tighter tooltips; every on-chart marker's hover text now opens with its own symbol (D▲, H▼, VP▲, ✦ OS, R▲). Panels gain Middle-Right / Middle-Left positions so AOP, MTF and KNN can stack on one edge.
• 17 alert conditions — cross, zone exit, regular / hidden / VP divergence, exhaustion, reversal confluence, and MTF aligned.
NOTES FOR EXISTING USERS
• The AOP Score badge, MTF Panel, and R▲ / R▼ markers are ON by default — you'll see them on existing charts. Toggle any of them off in Settings for the classic look.
• KNN readings shift slightly versus 1.1.0 — this is the corrected, non-leaking behavior, not a regression.
• Adaptive OB/OS, Volume Pressure Divergence, and Bar Coloring all ship OFF / None — nothing changes until you enable them.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.