Support Board
Date/Time: Fri, 29 Nov 2024 17:33:59 +0000
Post From: ACSIL: sc.ATR() - Output SCFloatArrayRef FloatArrayOut_2: No Vulues
[2023-02-01 21:50:31] |
Sierra_Chart Engineering - Posts: 17229 |
Code example: SCSFExport scsf_AverageTrueRangeExample(SCStudyInterfaceRef sc)
{ SCSubgraphRef Subgraph_ATR = sc.Subgraph[0]; SCInputRef Subgraph_Length = sc.Input[1]; if (sc.SetDefaults) { sc.GraphName = "Average True Range Example"; sc.GraphRegion = 1; sc.ValueFormat = VALUEFORMAT_INHERITED; sc.AutoLoop = 1; //Automatic looping Subgraph_ATR.Name = "ATR"; Subgraph_ATR.DrawZeros = false; Subgraph_ATR.PrimaryColor = RGB(0,255,0); Subgraph_ATR.DrawStyle = DRAWSTYLE_LINE; Subgraph_Length.Name = "Moving Average Length"; Subgraph_Length.SetInt(14); Subgraph_Length.SetIntLimits(1, MAX_STUDY_LENGTH); return; } sc.DataStartIndex = Subgraph_Length.GetInt() - 1; sc.ATR(sc.BaseDataIn, Subgraph_ATR.Arrays[0], Subgraph_ATR, Subgraph_Length.GetInt(), MOVAVGTYPE_SIMPLE); float TrueRange = Subgraph_ATR.Arrays[0][sc.Index]; } 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, use the Teton service: Sierra Chart Teton Futures Order Routing |