Support Board
Date/Time: Fri, 22 Nov 2024 07:00:17 +0000
ACSIL : How can I use sc.UseTool() in an external function ?
View Count: 2421
[2013-04-11 13:11:46] |
SoundsLikeSun - Posts: 30 |
Hi, I have a main study with several external functions (void / int etc.). I would like to export sc.UseTool to an external function because it takes lots of code space. However, the compiler doesn't recognize sc functions Here is the error I get : In function 'void Visualisator_Create(int, int, float, int)': C:\SierraChart\ACS_Source\TcVisualisatorModules.h:10:27: error: 'sc' was not declared in this scope And below is my code. Thank you very much for your help Thomas PS : Knowing how to use sierra charts functions outside the main study would be of great help. #include "sierrachart.h" void Visualisator_Create(int abcde_f, int Current_Trade_Direction_f, float Trade_ProfitOrLoss_In_Points_f, int Visualisator_Mode) { SCFloatArrayRef High_f = sc.BaseData[SC_HIGH]; SCFloatArrayRef Low_f = sc.BaseData[SC_LOW]; s_UseTool Visualisator1; if (Visualisator_Mode == 1) { int Visualisator1_LineNumber = 3556789; Visualisator1.Clear(); Visualisator1.ChartNumber = sc.ChartNumber; Visualisator1.DrawingType = DRAWING_TEXT; Visualisator1.LineNumber = Visualisator1_LineNumber + abcde_f; Visualisator1.BeginDateTime = sc.BaseDateTimeIn[abcde_f-4]; Visualisator1.AddMethod = UTAM_ADD_OR_ADJUST; Visualisator1.FontBold = 1; Visualisator1.FontBackColor = RGB(164,164,164); Visualisator1.Color = RGB(215,0,0); if (Trade_ProfitOrLoss_In_Points_f>0) Visualisator1.Text.Format("+%.1f pts",Trade_ProfitOrLoss_In_Points_f); else Visualisator1.Text.Format("%.1f pts",Trade_ProfitOrLoss_In_Points_f); if (Current_Trade_Direction_f>0) Visualisator1.BeginValue = High_f[abcde_f] + 15* sc.TickSize; else Visualisator1.BeginValue = Low_f[abcde_f] - 15* sc.TickSize; sc.UseTool(Visualisator1); } } |
[2013-04-11 18:28:28] |
Sierra Chart Engineering - Posts: 104368 |
Please see: http://www.sierrachart.com/index.php?l=doc/doc_ACSILProgrammingConcepts.html#PassingACSILMembers 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: