Support Board
Date/Time: Mon, 03 Feb 2025 15:02:39 +0000
Signals from other symbols and charts with ACSIL
View Count: 1686
[2019-11-22 12:17:40] |
MattK - Posts: 42 |
Hi, I would like to develop some cross symbols signals. For example: if the price of the ESZ9 is above the 30-day MA, go short the 6BZ9. However, I don't know where to start and I probably have the keywords wrong. If you could help me find what I'm looking for that would be great! Thanks in advance, Best regards. |
[2019-11-22 14:24:45] |
TedMar - Posts: 190 |
start here :) sc.GetBasicSymbolData() |
[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]; |
[2019-11-22 16:52:56] |
TedMar - Posts: 190 |
im no remember exactly , but i think is not possible to calculate with Data from Other Chart in local Function, i got simlery Problem , then if u get not PriceUpdate(autoLoop) on other Chart (Null (DrawZeros)) then function result is wrong or skipped. I do it in Other Chart a Study and pull StudyValue from other chart direct. do not forget make local study right sc.ValueFormat and sc.CalculationPrecedence = VERY_LOW_PREC_LEVEL;
|
[2019-11-22 17:05:22] |
MattK - Posts: 42 |
Thanks so much for your help!
|
[2019-11-22 18:26:14] |
Sierra Chart Engineering - Posts: 104368 |
You do have the ability to add an additional symbol to the same chart: Add Additional Symbol And you can base studies on that symbol and then access the study data: ACSIL Programming Concepts: Using or Referencing Study/Indicator Data in an ACSIL Function 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: 2019-11-22 22:30:32
|
[2019-11-22 21:08:25] |
MattK - Posts: 42 |
Awesome! Thanks, I'll try that. I don't know how to use a study from the chart in ACSIL yet but that seems easier that way so I'll give it a try. Thanks! |
[2019-11-25 11:46:23] |
MattK - Posts: 42 |
Quick question: I'm trying to work with the Add Additional Symbol study but I'm only getting 2 months of data. However, I loaded a chart with the "Additional Symbol" for the main chart and loaded 5 years of data so I don't understand why it's not loading on the main chart. I went to Edit > Reload and Recalculate but it doesn't change the data. Any advice? Thanks in advance. |
[2019-11-25 15:46:09] |
Sierra Chart Engineering - Posts: 104368 |
For what symbol are using with the Add Additional Symbol study?
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 |
[2019-11-25 15:49:11] |
MattK - Posts: 42 |
My main chart is the ES and the Additional Symbol is the ZF.
|
[2019-11-26 05:46:58] |
Sierra Chart Engineering - Posts: 104368 |
Ok these are futures contracts so the Add Additional Symbol study does not support Continuous Futures Contracts.
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: 2019-11-26 05:47:21
|
[2019-11-26 09:44:48] |
MattK - Posts: 42 |
Okay, I figured. I'm using the "referencing another chart" way so in the end it works :) Thanks for your help. Best, Matt Date Time Of Last Edit: 2019-11-26 09:45:22
|
To post a message in this thread, you need to log in with your Sierra Chart account: