Login Page - Create Account

Support Board


Date/Time: Thu, 13 Mar 2025 01:37:25 +0000



Post From: How to access sc.BaseData data from an additional symbol in ASCIL?

[2022-05-30 08:43:38]
BenjFlame - Posts: 335
Hi,
what is the proper way to access all BaseData elements for a data symbol added with "Add additional symbol" study?

I need to access all what is in sc.BaseData[][] ( ACSIL Interface Members - Variables and Arrays: sc.BaseDataIn[][] / sc.BaseData[][] ).

For example,
for an NQ chart, I added with study "Add additional symbol" an ES chart. So on same chart I have both NQ and ES.
Now from ASCIL I want to access: sc.BaseData[SC_NUM_TRADES] or sc.NumberOfTrades[] but from the added symbol ES, not base NQ.

How to do this?

I tried:

1) Import ES in an array:


SCFloatArray StudyReference3;
if (sc.GetStudyArrayUsingID(23, 0, StudyReference3) > 0 && StudyReference3.GetArraySize() > 0)
{
//Copy the study data that we retrieved using GetStudyArrayUsingID, into a subgraph data output array
SubGraph_Ref_ES[sc.Index] = StudyReference3[sc.Index];

}

So now I have ES on SubGraph_Ref_ES[sc.Index].
Now how to access from it and store it in another array?

By the way, is the step of storing the ES in an array necessary?
Date Time Of Last Edit: 2022-05-30 08:44:36