Login Page - Create Account

Support Board

Date/Time: Mon, 23 Apr 2018 22:37:08 +0000

ACSIL : How can I use sc.UseTool() in an external function ?

Support Request:
[2013-04-11 13:11:46]
SoundsLikeSun - Posts: 29

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


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.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);    
      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;
      Visualisator1.BeginValue = Low_f[abcde_f] - 15* sc.TickSize;        
[2013-04-11 18:28:28]
Sierra Chart Engineering - Posts: 59357
Please see:
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.

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


Login Page - Create Account