Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
How to obtain values from another Indicator using ACSIL
SCSFExport scsf_StudyName(SCStudyInterfaceRef sc)
{
// Define a reference to the first subgraph array
SCGraphData StudyData;
SCFloatArrayRef Array1 = StudyData[0];
// Get the study data from the specified chart
sc.GetStudyArraysFromChartUsingID(Input_Subgraph3Reference.GetChartNumber(), Input_Subgraph3Reference.GetStudyID(), StudyData);
Array1 = StudyData[0];
//Check if the study has been found. If it has, GetArraySize() will return the number of Subgraphs in the study.
if (StudyData.GetArraySize() > 0)
{
// Check if array is not empty.
if (Array1.GetArraySize() != 0)
{
// Get last value in array
float LastValue = Array1[Array1.GetArraySize() - 1];
}
}
}
If that doesn't work, maybe one of the ACSIL gurus around here can straighten us out.
And test shows the value for the Bands Ratio (SG1).
Since the subgraph reference is 0-Based...
If I change to this:
SCFloatArrayRef Array1 = StudyData[1];
Then test shows the value for the Squeeze Indicator (SG2)
If you still can't access your indicator values like that, then not sure what's going on.
One thing to check: Click on Analysis -> Studies and make certain all your Study IDs are sequentially numbered. I seem to recall that if there is a missing Study ID number in the middle, studies after that can't be accessed.
So if you had five studies, IDs 1, 2, 3, 4, 5... and you deleted Study 3, and were left with 1, 2, 4, 5... then study 4 and 5 can't be accessed. As I recall, that happened to me in the past and I had to delete 4 and 5 and re-add them as 3 and 4.
But don't quote me on that! lol
And this may be what you were looking for on Sierra Chart:
Wow! It ended up being that I had 2 charts open. So It was throwing me off....I appreciate your input on this. You really helped me navigate this wonderful world of Sierra ACSIL programming.