Support Board
Date/Time: Wed, 27 Nov 2024 20:38:31 +0000
[Programming Help] - calling functions from another function
View Count: 369
[2023-07-07 17:44:40] |
WeroTrader - Posts: 46 |
Greetings, Sierra Chart team. I'm trying to build a function for the SuperTrend indicator and I've run into a problem. I already put the "#includes" for "SierraChart.h", and "SCStudyFunctions.h" and "Myfile.h" , but when I try to use the functions of "sc.MovingMedia", "sc.TrueRange", "sc. ATR" "sc.ValueFormat"; The compiler gives me an error indicating that "sc" has not been declared in this scope. Could you give me a guide to know where I could check documentation to call the mentioned class of functions, from another function? |
[2023-07-08 19:55:15] |
JohnR - User831573 - Posts: 306 |
Have you seen this part of the docs? ACSIL Programming Concepts: Passing ACSIL Interface Members Structure To Secondary Function Passing ACSIL Interface Members Structure To Secondary Function /*==========================================================================*/ void PassingSCStrutureExampleFunction(SCStudyInterfaceRef sc) { //The "sc" structure can be used anywhere within this function. } /*============================================================================ "An example of calling a function that receives the Sierra Chart ACSIL structure (sc)." ----------------------------------------------------------------------------*/ SCSFExport scsf_PassingSCStrutureExample(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Passing sc Structure Example Function"; sc.StudyDescription = "An example of calling a function that receives the Sierra Chart ACSIL structure (sc)."; return; } // Do data processing // The definition of the function called below must be above this function.a PassingSCStrutureExampleFunction(sc); } Hope this helps, JohnR |
To post a message in this thread, you need to log in with your Sierra Chart account: