How to get the candle width to use it as width for a DrawTrendLine ?
Created at 16 Apr 2025, 01:40
How to get the candle width to use it as width for a DrawTrendLine ?
16 Apr 2025, 01:40
Hi,
I use an indicator to draw Heikin Ashi candle for a tick chart. The indicator use a fixed width that is not correct when the chart is zooming dezooming.
I try some combination to use a fixed value depending on the number of candles visible but it is not accurate when the window is small or bigger…it depend on the total pixel size of the chart.
So, is there a way to get the actual candle pixel width or a way to calculate it ?
Thanks
Luc
firemyst
17 Apr 2025, 00:48
Nope.
If you want to draw candles, draw a vertical trend line for the wicks. That way, you can adjust the width.
@firemyst