Support Board
Date/Time: Tue, 24 Jun 2025 00:23:12 +0000
Post From: ACSIL Renko Open Close
[2022-02-10 00:51:26] |
User92573 - Posts: 565 |
Hi thanks, Yes, very useful I program quite a lot with ASCIL. Maybe my explanation was poor and I noticed a few errors pasting. sc.SubgraphRef is actually an array as opposed to just an Integer variable. For example: SCSubgraphRef Subgraph_Range = sc.Subgraph[0]; // array if (sc.SetDefaults) { sc.GraphName = "Bars Range"; sc.AutoLoop = 1; // called for every new bar as opposed to manual etc. etc. } // do processing Subgraph_Range[sc.Index] = sc.High[sc.Index] - sc.Low[sc.Index]; ... and yes you can reference the bars back index with -1; -2; -3 etc. So, sc.BaseData[SC_RENKO_OPEN][-1]; // has two indexing options; 0 is the first element; -1 the second. Alt sc.Subgraph[][] sc.BaseData[SC_RENKO_CLOSE][-1]; sc.BaseData[SC_RENKO_OPEN][0]; sc.BaseData[SC_RENKO_CLOSE][0]; ... this is the method provided to input the Renko data as defined in Sierra's own examples. The issue is, as simple as it should be I cannot seem reference these value in my code? Subgraph_Renko_PriorOpen[sc.Index] = sc.BaseData[SC_RENKO_OPEN][-1]; Subgraph_Renko_PriorClose[sc.Index] = sc.BaseData[SC_RENKO_CLOSE][-1]; Subgraph_Renko_Open[sc.Index] = sc.BaseData[SC_RENKO_OPEN][0]; Subgraph_Renko_Close[sc.Index] = sc.BaseData[SC_RENKO_CLOSE][0]; Should populate the following four arrays with the Renko values after every bar. Subgraph_Renko_PriorOpen[sc.Index] = the RENKO OPEN 1 bar ago. Subgraph_Renko_PriorClose[sc.Index] = the RENKO CLOSE 1 bar ago Subgraph_Renko_Open[sc.Index] = the RENKO OPEN current bar Subgraph_Renko_Close[sc.Index] = the RENKO CLOSE current All pretty simple but alas the [SC_RENKO_OPEN] and [SC_RENKO_CLOSE] are nowhere to be found? That's what I'd hoped to explain. Many thanks. |