Support Board
Date/Time: Mon, 03 Feb 2025 18:31:28 +0000
Post From: Signals from other symbols and charts with ACSIL
[2019-11-22 15:02:20] |
MattK - Posts: 42 |
Thanks Ted! I actually found this: Referencing Other Time Frames and Symbols When Using the ACSIL I managed to import the price and a study, but I can't figure out how to calculate the EMA based on the price instead of having to import the the study. Do you see what I'm doing wrong here? SCGraphData BaseGraphData; sc.GetChartBaseData(2, BaseGraphData); SCFloatArrayRef Chart6EPrice = BaseGraphData[SC_LAST]; int RefChartIndex = sc.GetExactMatchForSCDateTime(2, sc.BaseDateTimeIn[sc.Index]); float ExactChart6EPrice = Chart6EPrice[RefChartIndex]; SCGraphData StudyData; sc.GetStudyArraysFromChartUsingID(2, 1, StudyData); SCFloatArrayRef ImportedEMA6E = StudyData[0]; int RefChartIndex2 = sc.GetNearestMatchForDateTimeIndex(2, sc.BaseDateTimeIn[sc.Index]); float ExactImportedEMA6E = ImportedEMA6E[RefChartIndex2]; //Problem here -- the calculated EMA is not right. sc.ExponentialMovAvg(Chart6EPrice, EMA6ESubgraph, 60); float CalculatedEMA6E = EMA6ESubgraph[sc.Index]; |