MHermes

Wick Percentages Table

MHermes Atualizado   
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.
Notas de Lançamento:
minor modifications
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?