Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 22:05:22 +0000



How to replace AreRenkoBars() ?

View Count: 709

[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
[2020-08-28 17:32:51]
Ackin - Posts: 1865
+1

I solve the same thing
[2020-08-28 21:33:11]
Sierra Chart Engineering - Posts: 104368
You do need to use this function:
sc.GetBarPeriodParameters() and check s_BarPeriod::IntradayChartBarPeriodType:

And we will add to the s_BarPeriod data structure the following function: AreRenkoBars. This will be out in the next release.

We are not going to be adding new Renko bars. And if that happens at some point once in a few years, then you just rebuild the study. This is not much of an issue over very long spans of time.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-08-28 21:33:33
[2020-08-29 09:23:23]
gomifromparis - Posts: 244
It's not only about the recompiling process.

Firstly, developers would need to be aware that you guys have created a new renko bar so they need recompiling any study using SC_RENKO_XXX data because you changed the IBPT constants. How could that be done ?

Secondly, if I have to recompile, I create a huge version dependency for all my clients, they need to use latest SC version if they want to update their study, which maybe for whatever reason they don't/can't do.

Currently my studies are compiled with 1708 version which is the first 64 bit version. So clients can basically use whatever build they want, I don't want to have to force them to use some latest version because you changed a constant in a file.

So please limit to the very minimum the number of forced recompilations we need to go through.

And thanks for putting the useful function AreRenkoBars(), that solves all the above issues, back.
[2020-09-02 07:03:14]
Sierra Chart Engineering - Posts: 104368
Secondly, if I have to recompile, I create a huge version dependency for all my clients, they need to use latest SC version if they want to update their study, which maybe for whatever reason they don't/can't do.
No this is not true. We explain the solution here:
Version 2151 Available: Foundation For Millisecond/Microsecond Timestamping | Post: 230147

So please limit to the very minimum the number of forced recompilations we need to go through.
The last required re-compilation was for versions earlier than 1225. This is extremely infrequent.

We have also released version 2160 which supports AreRenkoBars.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-09-02 07:03:45
[2020-09-03 19:47:36]
gomifromparis - Posts: 244
It seems the implementation does not really solve the issue, the IBPT constants are hard wired in the scstructures.h header

  int AreRenkoBars()
  {
    return IntradayChartBarPeriodType == IBPT_RENKO_IN_TICKS
      || IntradayChartBarPeriodType == IBPT_FLEX_RENKO_IN_TICKS
      || IntradayChartBarPeriodType == IBPT_FLEX_RENKO_IN_TICKS_INVERSE_SETTINGS
      || IntradayChartBarPeriodType == IBPT_ALIGNED_RENKO;
  }

So if one day you add a Renko, this code won't work and I will have to recompile.

Previous versions used

  int AreRenkoBars()
  {
    if (RenkoTicksPerBar != 0)
      return 1;

    return 0;
  }

So as long as RenkoTicksPerBar > 0 it would work, and you could add new Renko bars, and it would still work.


My actual need is to know if I need to test the data held in SC_RENKO_OPEN and SC_RENKO_CLOSE to be able to compute the actual High and Low of the candles

Would it be possible to get something like : AreRenkoChartBarArrayAllocated()

Thanks
[2020-09-08 19:39:40]
Sierra Chart Engineering - Posts: 104368
This really is absolutely beyond belief. So if hypothetically, which will never happen, there is some new Renko bar type that no one would use you are complaining about having to recompile after many years. You have got to be kidding us. And in any case tell the user to update if needed. They are not going to have a problem with updating. There is no reason for people to be behind more than a few months behind at most.

Should anyone wonder why it is have terminated support for multiple data feeds/trading services, your post only reaffirms this. Why would we want to be maintaining all of these feeds and providing all of the support for them. Here you are complaining about a hypothetical which will never happen and having to potentially recompile years later. This is super trivial and super super tiny by comparison to supporting an external data or trading service.


Regarding checking the size of an array to see if it is used, refer to:
Working with ACSIL Arrays and Understanding Looping: Array Indexing and Sizes

But not sure how well this would work. You would really need to check the size of sc.BaseData itself and compare it to SC_RENKO_CLOSE
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-09-08 19:50:30

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account