Login Page - Create Account

Support Board


Date/Time: Thu, 09 May 2024 03:41:26 +0000



[Programming Help] - Basic Acsil Question for Users

View Count: 711

[2018-03-02 17:53:00]
Devil_On_WallStreet - Posts: 67
I'm pulling my hair out over probably a very basic process!!! I've figured out how to write all the basic if, then, elses... figured out the inputs, including taking data from another study subgraph... for the life of me, I CANNOT figure out how to simple change "sc.BaseData[InputDataHigh.GetInputDataIndex()]" so it will properly take data from the inputed subgraph from another study OR from a subgraph already part of the current study. I have created an array from the inputed subgraphref from another study, GOING CRAZY!!! hopefully someone with some knowledge can help a brother out!!!
[2018-03-03 22:32:33]
Sierra Chart Engineering - Posts: 104368
Here is the documentation for the Data array on study Subgraphs:
ACSIL Interface Members - sc.Subgraph Array: sc.Subgraph[].Data[] / sc.Subgraph[][]

Did you actually want to change the values in sc.BaseData?
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
[2018-03-03 23:14:58]
Devil_On_WallStreet - Posts: 67
Not change values... just input from Subgraphs... 2 examples... moving averages have the input parameters of "sc.BaseData[InputDataHigh.GetInputDataIndex()] AND sc.BaseData[InputDataLow.GetInputDataIndex()]" one task I am trying to do is attach a moving average to an existing study...

The 2nd example... I'll include some of the basic code I have so far...

for inputs I have changed the inputs for"InputDataHigh and InputDataLow to

StudySubgraph1Reference.SetStudySubgraphValues(0, 0); AND StudySubgraph2Reference.SetStudySubgraphValues(0, 0);

Then I created an array for each here is 1, I made a 2nd for the other SubgraphRef

  SCFloatArray StudySubgraph1Array;
sc.GetStudyArrayUsingID(StudySubgraph1Reference.GetStudyID(), StudySubgraph1Reference.GetSubgraphIndex(), StudySubgraph1Array);
if(StudySubgraph1Array.GetArraySize() < sc.ArraySize)
    return;


All I want to do is input these into the "sc.BaseData[InputDataHigh.GetInputDataIndex()] and other to the LOW" In the same way that changing the "Based ON" section of the study window would work. But since another part of the program is actually taking scHIGH and LOW data from the main price graph, I cannot simply change the input parameters within the study window. I've read over the documentation many times, and have tried SO MANY approaches to create indexes and input them... I KNOW it is probably WAY easier than I am making it, but I cannot find an example to save my life... And your documentation is phoenominal!!!
[2018-03-05 03:08:39]
Devil_On_WallStreet - Posts: 67
I figured it out!!! Was way easier than I was making it... Thank you!!!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account