MHermes

Wick Percentages Table

MHermes 已更新   
This script is designed to calculate and display the percentage representation of wick lengths in relation to the total candle range for the last 100 candles on a trading chart. Here's a breakdown of its functionality:

Indicator Initialization: It sets up an indicator named "Wick Percentages Table" (WPT) that overlays on the trading chart.

Variables Initialization: The script initializes variables to store the total lengths of top wicks, bottom wicks, and the total ranges for the last 100 candles.

Wick and Range Calculations: For the past 100 candles, it calculates:
The length of the top wick (the distance between the high and the higher of the open or close).
The length of the bottom wick (the distance between the low and the lower of the open or close).
The total range of each candle (the distance between the high and the low).

Percentage Calculations: It computes the top and bottom wick lengths as percentages of the total candle range across the last 100 candles.

Table Display: It creates or updates a table displayed on the top right of the chart showing these percentages. The table has two rows: one for the "Top Wick %" and another for the "Bottom Wick %", with the corresponding percentages calculated and displayed.

Visibility Maintenance: It plots a dummy variable to ensure the indicator's visibility on the chart.

The purpose of this script is to provide traders with a visual representation of the wick lengths as percentages, offering insights into market behavior and potential price movements based on recent candlestick patterns. It aids in assessing market volatility and trader sentiment through the analysis of wick lengths relative to the total candle sizes.
...
Any improvements to this code would be more then welcome.
I was getting an error in line 30, the only thing I could find was to comment it out.
版本注释:
minor modifications
开源脚本

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

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?