This script was inspired by the Chart Champions team who generously share the key levels that they are monitoring with the group. It provides a way for TradingView users to import the levels from a text file (known as the “dataset”) which can also be shared with the community. The script will plot the levels with different colours depending on whether they are daily, weekly, monthly. volume or fibs. It will also calculate and draw the high/low for the previous day.
The dataset
The format for the dataset is as follows:
:<type>=<price>:<optional comment>:
The type value can be:
D - Daily level
W - Weekly level
M- Monthly level
V - Volume level (eg. VAH, POC, VAL)
F - Fib level
Alternatively you can use freeform text for the type but it may not be colour-coded as you wish
Note, lines and fields without an “=“ are ignored.
It is recommended to create the dataset with a text editor.
To import it:
Open the indicator settings
Click the ‘Import Dataset’ field, press Control-A and Delete to clear out the contents
Copy/paste the dataset into the field
Click Ok
Additional settings
You can choose the line colour for each type of level Show imported datarows - Check this box to displays the imported dataset values in tabular format on the bottom-left of the chart Show yellow dots - Show yellow diamonds when price touches a level - see alerting below. Hide levels > N% from current price - Levels more than 20% away from the current price will be hidden if this box is checked. The percentage value can be changed.
Alerting
The script can raise alerts when the price touches any of the levels. This is visually represented on the chart by a yellow dot when the "show yellow dots option" is checked. To avoid duplicate alerts when price repeatedly touches the level, the following criteria must be satisfied before an alert is raised (or a yellow dot printed).
1) Price first touches the level (open,high,low or close) 2) Price did not touch the level in the previous 10 candles
Notes de version
Fixed the alerts which were not firing on the very first touch of the level.
Notes de version
Minor cosmetic improvement
Notes de version
New Features:
Added a "Convert levels to zones" setting. This will convert all the levels into zones that are 0.1% high by default. When enabled, yellow dots and alerts are triggered whenever price hits the upper or lower part of the zone, ie. before the price level is hit, which can help with situation where key levels are front-run or when you need more time to respond before the level is hit.
Improvements:
Yellow dots now appear above the candle when price is rising, or below the candle when price is falling. The alert message now tells you if price is rising or falling.
Sample dataset:
The is a sample dataset that you can copy/paste into the "Import dataset" field on the settings menu:
Ce script est publié en code source fermé et vous pouvez l'utiliser librement. Vous pouvez le préférer pour l'utiliser sur un graphique. Vous ne pouvez pas visualiser ou modifier son code source.
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.