Support Board
Date/Time: Tue, 24 Jun 2025 00:27:07 +0000
Post From: ACSIL Renko Open Close
[2022-02-09 23:51:02] |
1+1=10 - Posts: 270 |
Hi, I'm a fellow user that codes in ACSIL a lot. 1. "SCSubgraphRef" is a type like "int". You use it when you declare the Subgraph variables but not when you assign to them later in the study. See below. 2. You're confused about how to reference the data in an array whether you're using manual looping or automatic looping. See the example code below but it would be helpful to reread this: Working with ACSIL Arrays and Understanding Looping SCSubgraphRef Subgraph_Renko_PriorOpen = sc.Subgraph[0]; SCSubgraphRef Subgraph_Renko_PriorClose = sc.Subgraph[1]; SCSubgraphRef Subgraph_Renko_Open = sc.Subgraph[2]; SCSubgraphRef Subgraph_Renko_Close = sc.Subgraph[3]; if(sc.SetDefaults) { // You would have the typical set-up code here sc.Autoloop = true; // NOTE: working with automatic looping is easier but in the link above you // can see how to do manually looping correctly } if (sc.Index >= 1) { Subgraph_Renko_PriorOpen[sc.Index] = sc.BaseData[SC_RENKO_OPEN][sc.Index - 1]; Subgraph_Renko_PriorClose[sc.Index] = sc.BaseData[SC_RENKO_CLOSE][sc.Index - 1]; Subgraph_Renko_Open[sc.Index] = sc.BaseData[SC_RENKO_OPEN][sc.Index]; Subgraph_Renko_Close[sc.Index] = sc.BaseData[SC_RENKO_CLOSE][sc.Index]; } |