Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 01:04:50 +0000



How to distinguish Flex Renko from Universal Renko in ASCIL?

View Count: 844

[2017-03-13 15:29:28]
DabbaDo - Posts: 146
I see sc.AreRenkoBars(), but is there some way to discover which of the four Renko bar types are on the chart?

Thanks,
Dale
[2017-03-13 17:50:51]
Sierra Chart Engineering - Posts: 104368
No, there is not.

This kind of capability will be done sometime this year.
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
[2017-03-18 12:13:30]
DabbaDo - Posts: 146
FYI and FWIW to anyone who cares about this, the distinguishing name does exist in GetStudyName(0). Here is some code I use to pull it out. Not tested on every kind of symbol, so YMMV. I could have done more error checking, and Sierra Chart may break this with future changes, of course.
void GetContinuousContractAndBarsPeriodTypeCodes(SCStudyInterfaceRef sc, SCString& ccCode, SCString& barsPeriodType)
  {
    SCString thisName = sc.GetStudyName(0); // like ESM7 [CB] Flex Renko 32-31-1 #5 --but Continuous None gives no []
    std::vector<char*> tokens;
    thisName.Tokenize(" ", tokens);
    SCString token0 = tokens[0];
    if (tokens.size() < 3
      || token0 != sc.Symbol)
    {
      ccCode = barsPeriodType = "INVALID";
      return;
    }
    auto token1 = tokens[1];
    int barsPeriodStartIndex;
    if (token1[0] == '[')
    {
      ccCode = token1;
      barsPeriodStartIndex = 2;
    }
    else
    {
      ccCode = "[C0]";
      barsPeriodStartIndex = 1;
    }
    for (size_t i = barsPeriodStartIndex; i < tokens.size() - 2; i++)
    {
      barsPeriodType += tokens[i];
    }
  }

[2017-03-18 18:45:19]
Sierra Chart Engineering - Posts: 104368
the distinguishing name does exist in GetStudyName(0).
It definitely does!

This is an example of what you will get:
ESH17 1 Min #1
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

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

Login

Login Page - Create Account