MHermes

Wick Percentages Table

MHermes Mis à jour   
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.
Notes de version:
minor modifications
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?