I am looking for a code that displays the high of a finished candle in points and “writes” that number on top of a finished candle. I searched for a script like that on this page but could not find it. I habe never learned to script, maybe someone can help? It would be great if that script works on all timeframes, so that it hows me the candle lenght in the hourly and also -example- in the daily chart when switching. I would like to have them permanently in my charts, if possible also historic or at least some weeks or months.
Thank you in advance.
To specify: I need the candle lenght (low to high) in points.
Do you want it to also draw the points range of the candlesticks on the whole history or only on the last closed bar? (the previous one from now).
The whole history would be great, or at least 100-200 candles. Thank you for your reply, Nicolas.
This script does it, on any timeframe:
CandleHight=high-low
drawtext("#CandleHight#",barindex,1.1*high,Dialog,Standard,10)
Return
but it is, in my view, useless since the “candle hight” numbers overlap if you want them to appear on top of every candle. PRT graphical command set does not support slanted text or 90degrees rotated text. There are few ways around this: (1) not display the number on every bar, (2) display the indicator in a separate window as a bar graph below the price graph – no numbers but very visual, (3) print the numbers at different hight so they do not overlap
Thanks Pinny, that’s why I asked Marius if he wanted the text to be drawn on every candlestick 🙂
You can use “range” keyword to get the (high-low) value.
A quick fix would be to alternate the position of the text: draw the range text one time above the candle and the next time below it. etc.