High and Low on Renko returning incorrect values

Created at 09 Jan 2025, 08:49
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
IG

iggys77

Joined 20.02.2024

High and Low on Renko returning incorrect values
09 Jan 2025, 08:49


I am using Renko charts, the built-it Renko does not show wicks, when I fetch the high or low I get the valuer displayed on the chart, even though there might have been a higher or lower value in that interval, so it seems not only that the wicks are not displayed but they are not considered when fetching the high or low. 

To overcome that I downloaded a Renko chart with wicks, so now wicks are being displayed but if I fetch the high or low it's still returnign the open or close, so the wicks are ignored.

How do I get the correct high and low?

I use Bars.HighPrices to get the High and LowPrices to get the Low.

 

 


@iggys77
Replies

firemyst
10 Jan 2025, 00:22

How do I get the correct high and low?

You'll have to keep track of the highs/lows yourself. You could modify the indicator to do this if you have access to the source code.

The easiest way would be to create two new data series in the indicator, one for highs and one for lows. 

On each tick in the calculate method, do something like the following to save the high/low from each bar:

HighsDataSeries[index] = Math.Max(HighsDataSeries[index], Bars.HighPrices[index]);

LowsDataSeries[index] = Math.Min(LowsDataSeries[index], Bars.LowPrices[index]);

 

 


@firemyst