Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 08:27:43 +0000



Post From: How to replace AreRenkoBars() ?

[2020-08-28 13:29:40]
gomifromparis - Posts: 244
Hi,

I've got my first clients having issues with my studies not working because they updated their Sierra post 2155 , so I'm trying to recompile.

It seems that, along the whole new DateTime change, you also removed useful (to me !) functions like AreRenkoBars()

Basically I need to check the top an bottom of bars, which in the case of Renko bars is held in SC_RENKO_XX
So I test AreRenkoBars() to see if I need to access the Renko time series

I have something like

    
double SCBridge::GetHigh(int i)
{
if (!sc.AreRenkoBars())
return (double)sc.High[i];
else
return (max(sc.High[i], max(sc.BaseData[SC_RENKO_OPEN][i], sc.BaseData[SC_RENKO_CLOSE][i])));
};

Now I suppose need to use sc.GetBarPeriodParameters() and check s_BarPeriod::IntradayChartBarPeriodType:


IBPT_DAYS_MINS_SECS = 0
IBPT_VOLUME_PER_BAR = 1
IBPT_NUM_TRADES_PER_BAR = 2
IBPT_RANGE_IN_TICKS_STANDARD = 3
IBPT_RANGE_IN_TICKS_NEWBAR_ON_RANGEMET = 4
IBPT_RANGE_IN_TICKS_TRUE = 5
IBPT_RANGE_IN_TICKS_FILL_GAPS = 6
IBPT_REVERSAL_IN_TICKS = 7
IBPT_RENKO_IN_TICKS = 8
IBPT_DELTA_VOLUME_PER_BAR = 9
IBPT_FLEX_RENKO_IN_TICKS = 10
IBPT_RANGE_IN_TICKS_OPEN_EQUAL_CLOSE = 11
IBPT_PRICE_CHANGES_PER_BAR = 12
IBPT_MONTHS_PER_BAR = 13
IBPT_POINT_AND_FIGURE = 14
IBPT_FLEX_RENKO_IN_TICKS_INVERSE_SETTINGS = 15
IBPT_ALIGNED_RENKO = 16
IBPT_RANGE_IN_TICKS_NEW_BAR_ON_RANGE_MET_OPEN_EQUALS_PRIOR_CLOSE = 17
IBPT_ACSIL_CUSTOM = 18: This is used when the chart contains an advanced custom study that creates custom chart bars. The study name is contained within

So I guess I need to check if the value is 8,10,15 and 16 ?

What happens if you guys add a new Renko Type bar ? We need to recompile the study again ?

Is there any way to check if the SC_RENKO_XXX series are populated or not now that the useful function is gone ?

Thanks