OPEN-SOURCE SCRIPT

Realized Price Oscillator [InvestorUnknown]

Overview
The Realized Price Oscillator is a fundamental analysis tool designed to assess Bitcoin's price dynamics relative to its realized price. The indicator calculates various metrics using data from the realized market capitalization and total supply. It applies normalization techniques to scale values within a specified range, helping investors identify overbought or oversold conditions over the long time horizon. The oscillator also features DCA-based signals to assist in strategic market entry and exit.

Key Features
1. Normalization and Scaling:
  • The indicator scales values using a limit that can be adjusted for decimal precision (Limit). It allows for both positive and negative values, providing flexibility in analysis.
  • Decay functionality is included to progressively reduce the extreme values over time, ensuring recent data impacts the oscillator more than older data.




2. Realized Price Oscillator Calculation:
  • Realized Price Oscillator is computed using logarithmic differences between the open, high, low, and close prices and the realized price. This helps in identifying how the current market price compares with the average cost basis of the Bitcoin supply.




3. Oscillator Normalization:
  • The normalized oscillator calculates the range between the maximum and minimum values over time. It adjusts the oscillator values based on these bounds, considering a decay factor. This normalized range assists in consistent signal generation.




4. Dollar-Cost Averaging (DCA) Signals:
  • DCA-based signals are generated using user-defined thresholds (DCA IN and DCA OUT). The oscillator triggers buy signals when the normalized low value falls below the DCA IN threshold and sell signals when the normalized high value exceeds the DCA OUT threshold.


снимок

5. Visual Representation:
  • The indicator plots candlestick representations of the normalized Realized Price Oscillator values (open, high, low, close) over time, starting from a specified date (plot_start_date).
  • Colors are dynamically adjusted using a gradient to represent the state of the oscillator, ranging from green (buy zone) to red (sell zone). Background and bar colors also change based on DCA conditions.


How It Works
  1. Data Sourcing: Realized price data is sourced using Bitcoin’s realized market cap (BTC_MARKETCAPREAL) and total supply (BTC_SUPPLY).
  2. Realized Price Oscillator Metrics: Logarithmic differences between price and realized price are computed to generate Realized Price Oscillator values for open, high, low, and close.
  3. Normalization: The indicator rescales the oscillator values based on a defined limit, adjusting for negative values if allowed. It employs a decay factor to reduce the influence of historical extremes.


Conclusion
The Realized Price Oscillator is a sophisticated tool that combines market price analysis with realized price metrics to offer a robust framework for understanding Bitcoin's valuation. By leveraging normalization techniques and DCA thresholds, it provides actionable insights for long-term investing strategies.
CyclesFundamental AnalysisOscillators

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности