drewby4321

Relative Candle

drewby4321 Updated   
This script visualizes the relative movement of a single OHLC candle compared to an index (or another symbol). The vertical location of the candle indicates the general positive/negative comparison of the bar vs the index. The color of the candle indicates how the candle moved relative to the index. The wick indicates the closing range compared to the index (did the symbol close at lows of the bar while the index closed at highs).

The area graph in the background shows the average relative close over a 10-day simple moving average.

I use this to pop any behavior that is out of line with the market, whether positive or negative. For example, is a red bar day due to the market pullback or something specific to the stock. Or did the market pull back and the stock did the opposite, strong day!
Release Notes:
Updates:
  • Added input.symbol type for Index so it's easier to select the comparative ticker.
  • Matched the resolution to the chart, so it can now be used on more than just Daily charts.

This script visualizes the relative movement of a single OHLC candle compared to an index (or another symbol). The vertical location of the candle indicates the general positive/negative comparison of the bar vs the index. The color of the candle indicates how the candle moved relative to the index. The wick indicates the closing range compared to the index (did the symbol close at lows of the bar while the index closed at highs).

The area graph in the background shows the average relative close over a 10-day simple moving average .

I use this to pop any behavior that is out of line with the market, whether positive or negative. For example, is a red bar day due to the market pullback or something specific to the stock. Or did the market pull back and the stock did the opposite, strong day!

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?