Close Position Index MT5 by Sublime Algo
- インディケータ
- Krystof Zak
- バージョン: 1.0
📊 Close Position Index (CPI)
Close Position Index (CPI) is a normalized oscillator that measures the relative position of the closing price within recent market structure.
It transforms price into a value between 0 and 1, allowing traders to quickly assess whether the market is trading near its highs, lows, or equilibrium.
🔍 Core Idea
CPI answers a simple but powerful question:
👉 Where is the current close relative to recent price behavior?
- 0 → price near recent lows
- 1 → price near recent highs
- 0.5 → price near balance
Because the output is normalized, CPI can be applied consistently across different instruments and timeframes.
⚙️ Calculation Modes
🟦 Mean Mode (Statistical Perspective)
Calculates the average relative close position over the selected period.
- Smooth and stable behavior
- Reduces short-term noise
- Suitable for mean reversion strategies
🟧 Range Mode (Structural Perspective)
Calculates the close relative to the highest high and lowest low over the selected period.
- More responsive to price changes
- Reflects current market structure
- Ideal for breakout and momentum strategies
📈 How to Interpret
- Above 0.8 → market near upper range (potential strength or exhaustion)
- Below 0.2 → market near lower range (potential weakness or reversal)
- Around 0.5 → balanced / neutral conditions
🧠 Key Features
- Normalized output (0 to 1)
- Dual calculation modes (Mean & Range)
- Works on any symbol and timeframe
- Lightweight and efficient
- Suitable for both manual and algorithmic trading
⚙️ Inputs
- Period – number of bars used in calculation
- Timeframe – timeframe used for data
- Mode – calculation method (Mean or Range)
