OPEN-SOURCE SCRIPT

Candle Size Tracker

Use Case
This script is particularly useful for traders who want to identify periods of increasing candle volatility or momentum.

Functionality
Candle Size Calculation:
The script calculates the size of each candle by subtracting the low price from the high price.

Comparison with Previous Candle:
It checks if the current candle's size is greater than or equal to the previous candle's size. If true, a visual label is added above the candle.

Dynamic Label Management:
To avoid cluttering the chart, it uses a lookback period (lookback) to remove old labels. Labels are removed if they exceed the defined lookback period.

Customization Options:

Lookback Period: You can set the number of bars to retain labels (default: 2).
Vertical Offset: Adjusts the position of the label above the candle relative to the high price.
Label Opacity: Controls the transparency of the label (default: 50%).

The full script:


candlecandlesizeCandlestick analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明