Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 08:37:12 +0000



Flex Renko High and Low and sc.High and sc.Low do not match

View Count: 1576

[2018-09-24 21:42:26]
bradh - Posts: 854
I want to draw Arrows above and below the high and the low of a Flex Renko Bar. I am using sc.Low and sc.High, but sc.BaseDataIn[SC_LOW] and sc.BaseDataIn[SC_HIGH] produce the same results.

When I do that I get some of the arrows inside the body of the candle:
http://www.sierrachart.com/image.php?Image=1537824174727.png

It only seems to happen on Flex Renko. If I add the Heiken Ashi study, set it to region 1 and check Display as Main Graph, then the arrows appear in the right places. I haven't seen the issue on any other bar type, but I have not tested them all.

// The top of every source code file must include this line
#include "sierrachart.h"

// For reference, refer to this page:
// Advanced Custom Study Interface and Language (ACSIL)

// This line is required. Change the text within the quote
// marks to what you want to name your group of custom studies.
SCDLLName("TestArrow")

//This is the basic framework of a study function. Change the name 'TemplateFunction' to what you require.
SCSFExport scsf_TestArrow(SCStudyInterfaceRef sc)
{
  SCSubgraphRef ArrowUp = sc.Subgraph[0];
  SCSubgraphRef ArrowDown = sc.Subgraph[1];
  
  SCInputRef TickOffset = sc.Input[0];
  
  // Section 1 - Set the configuration variables and defaults
  if (sc.SetDefaults)
  {
    sc.GraphName = "Test High and Low with Flex Renko";
    
    // During development set this flag to 1, so the DLL can be rebuilt without restarting Sierra Chart. When development is completed, set it to 0 to improve performance.
    sc.FreeDLL = 1;

    sc.AutoLoop = 1; //Automatic looping is enabled.
    
    sc.GraphRegion = 0;
    
    ArrowUp.Name = "Arrow Up";
    ArrowUp.DrawStyle = DRAWSTYLE_ARROWUP;
    ArrowUp.PrimaryColor = RGB (0, 255, 0);
    
    ArrowDown.Name = "Arrow Down";
    ArrowDown.DrawStyle = DRAWSTYLE_ARROWDOWN;
    ArrowDown.PrimaryColor = RGB (255, 0, 0);
    
    TickOffset.Name = "Tick Offset";
    TickOffset.SetInt(1);
    
    
    
    
    return;
  }
  
  
  // Section 2 - Do data processing here
    
    ArrowUp[sc.Index] = sc.Low[sc.Index] - sc.TickSize * TickOffset.GetFloat();
    ArrowDown[sc.Index] = sc.High[sc.Index] + sc.TickSize * TickOffset.GetFloat();
}

[2018-09-25 04:30:36]
Sierra Chart Engineering - Posts: 104368
Refer to:
Renko Bar Charts: Renko Open, High, Low, Close Values
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
[2018-09-25 10:34:29]
bradh - Posts: 854
Thanks. I tried that. It works for the bodies, but not the wicks.

http://www.sierrachart.com/image.php?Image=1537870825890.png

I need the arrows above and below the wicks. The documentation says:

The candlestick wicks, if visible on a Renko bar, are based upon the true High and Low values of the Renko bar, which are based upon the actual underlying price data. In ACSIL these are accessed with the SC_HIGH and SC_LOW sc.BaseData[] arrays.

If you cannot make SC_HIGH and SC_LOW consistent with the way every other candle works, how about adding SC_RENKO_HIGH and SC_RENKO_LOW? I would really prefer to not have to deal with an exception for this type of chart, so please fix the SC_HIGH and SC_LOW.
Date Time Of Last Edit: 2018-09-25 10:39:04
[2018-09-25 17:08:18]
Sierra Chart Engineering - Posts: 104368
Okay there is definitely nothing wrong here nothing for us to fix but we understand the nature of the problem.

In the case of the high you would need to use the highest of the high, the Renko close and the Renko open. You need to pick among the highest of all of those. And then the same for the low. You need to use the standard low, the Renko open and the Renko close and use the lowest among all of those.

This just has to do with the nonsense concept of these Flex Renko bars of where they are showing fake data .
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: 2018-09-25 17:11:07
[2018-09-25 18:13:28]
bradh - Posts: 854
When you say "there is definitely nothing wrong here", what about the documentation I quoted in #3? It says:
In ACSIL these are accessed with the SC_HIGH and SC_LOW sc.BaseData[] arrays.

"These" refers to the Wicks, if visible, correct?
[2018-09-25 18:30:34]
Sierra Chart Engineering - Posts: 104368
They refer to the true high and low.
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