Support Board
Date/Time: Sat, 07 Jun 2025 20:08:54 +0000
[Programming Help] - Programming Help ACSIL
View Count: 1188
[2022-10-13 18:48:23] |
User183724 - Posts: 194 |
I'm learning ACSIL. I'm working though the examples provided by SC. I've hit a snag... User Contributed Advanced Custom Study System Source Code OnBalanceVolumeByTickMACDWithFilters.cpp I loaded this study into Notepad++ provided with my installation of SC. I saved it to my local directory: C:\SierraChart\ACS_Source when I attempted to remote build this study, i received the following error. OnBalanceVolumeByTickMACDWithFilters.cpp: In function 'void scsf_OBVByTickMACDWithFilters(SCStudyInterfaceRef)': OnBalanceVolumeByTickMACDWithFilters.cpp:184:53: error: 'SC_NT' was not declared in this scope; did you mean 'SC_NO'? 184 | else {Up = SC_ASKNT; Down = SC_BIDNT; VolumeType = SC_NT;} | ^~~~~ | SC_NO -- End of Build -- 13:35:23 being new to ACSIL, I don't know what this error means or how to fix it. any assistance appreciated thanks |
[2022-10-13 23:49:15] |
ForgivingComputers.com - Posts: 1063 |
Searching for SC_ASKNT in the header files, I found this: //Refer to ACSIL Arrays and Variables documentation for descriptions of each of these sc.BaseDataIn[] constants const int SC_OPEN = 0; const int SC_HIGH = 1; const int SC_LOW = 2; const int SC_LAST = 3; const int SC_VOLUME = 4; const int SC_OPEN_INTEREST = 5; const int SC_NUM_TRADES = 5; const int SC_OHLC_AVG = 6; const int SC_OHLC = 6; const int SC_HLC_AVG = 7; const int SC_HLC = 7; const int SC_HL_AVG = 8; const int SC_HL = 8; const int SC_BIDVOL = 9; const int SC_ASKVOL = 10; const int SC_UPVOL = 11; const int SC_DOWNVOL = 12; const int SC_BIDNT = 13; const int SC_ASKNT = 14; const int SC_ASKBID_DIFF_HIGH = 15; const int SC_ASKBID_DIFF_LOW = 16; const int SC_ASKBID_NUM_TRADES_DIFF_HIGH = 17; //SC_ASKBID_NT_DIFF_HIGH const int SC_ASKBID_NUM_TRADES_DIFF_LOW = 18; //SC_ASKBID_NT_DIFF_LOW const int SC_UPDOWN_VOL_DIFF_HIGH = 19; const int SC_UPDOWN_VOL_DIFF_LOW = 20; const int SC_RENKO_OPEN = 21; const int SC_POINT_FIGURE_HIGH = SC_RENKO_OPEN; const int SC_RENKO_CLOSE = 22; const int SC_POINT_FIGURE_LOW = SC_RENKO_CLOSE; const int SC_BID_PRICE = 23; const int SC_ASK_PRICE = 24; const int SC_ASK_BID_VOL_DIFF_MOST_RECENT_CHANGE = 25; Since SC_ASKNT is Number of Ask trades, I suggest trying SC_NUM_TRADES. Date Time Of Last Edit: 2022-10-14 01:51:31
|
[2022-10-14 00:56:09] |
User183724 - Posts: 194 |
thanks for replying. I'm just getting started in ACSIL and am going though the examples. I wouldn't think the training examples would have errors so when I saw that, I was really lost. I appreciate you taking the time to offer assistance
|
[2022-10-14 01:53:38] |
ForgivingComputers.com - Posts: 1063 |
What you are seeing is from User Contributed Studies, not necessarily official training examples. Most of the included studies do have source code, and they are up to date in your ACS_Source folder. They make great training examples.
|
[2022-10-14 03:46:55] |
User183724 - Posts: 194 |
thanks again. I looked for the file sierrachart.h and I dont think i have it. I'm assuming my version of SC is remote build only and didn't come with a complier. could you upload a copy for me here so I can look at it if I come across other issues like this. thanks.
|
[2022-10-14 13:57:13] |
ForgivingComputers.com - Posts: 1063 |
It should be in the ACS_Source folder.
|
[2022-10-14 15:53:32] |
User183724 - Posts: 194 |
its not there. I did a search of my entire computer.
|
[2022-10-14 17:42:50] |
ForgivingComputers.com - Posts: 1063 |
I don't know for sure, but perhaps you do need to install the Visual C++ compiler to get the files.
|
[2022-10-14 18:47:04] |
User183724 - Posts: 194 |
thanks... I installed the latest version of SC and it had the file so I'm good now.
|
[2023-02-17 18:33:45] |
Ragy - Posts: 29 |
Could someone provide me with the code/calculation of these two funcitons: SC_ASKBID_NUM_TRADES_DIFF_HIGH SC_ASKBID_NUM_TRADES_DIFF_LOW |
[2023-02-17 19:14:51] |
User90125 - Posts: 715 |
Scroll down to read here: ACSIL Interface Members - Variables and Arrays: sc.BaseDataIn[][] / sc.BaseData[][] sc.BaseData[SC_ASKBID_NUM_TRADES_DIFF_HIGH]: The array containing the maximum difference between the number of trades at the Ask price or higher and the number of trades at the Bid price or lower, for the bar at the specified Index. This is calculated at every tick during the creation of the bar. For the data in this array to be accurate, the Intraday Data Storage Time Unit setting in Global Settings >> Data/Trade Service Settings must be 1 Tick. The data in this array will not be available for historical data that does not have Ask and Bid volume.
If you are using this array in your study function, you must set sc.MaintainAdditionalChartDataArrays to 1 in the sc.SetDefaults code block. sc.BaseData[SC_ASKBID_NUM_TRADES_DIFF_LOW]: The array containing the minimum difference between the number of trades at the Ask price or higher and the number of trades at the Bid price or lower, for the bar at the specified Index. This is calculated at every tick during the creation of the bar. For the data in this array to be accurate, the Intraday Data Storage Time Unit setting in Global Settings >> Data/Trade Service Settings must be 1 Tick. The data in this array will not be available for historical data that does not have Ask and Bid volume. If you are using this array in your study function, you must set sc.MaintainAdditionalChartDataArrays to 1 in the sc.SetDefaults code block. Hope this helps :} |
[2023-02-17 19:19:41] |
Ragy - Posts: 29 |
Thanks for your reply. But is there a specific code for these two functions?
|
[2023-02-17 19:38:04] |
User90125 - Posts: 715 |
Code? These are both data arrays, not functions. SC has outlined how they specifically maintain each array; you'll just have to interpret what they give you and proceed accordingly. Good luck:) |
[2023-02-17 21:04:06] |
Ragy - Posts: 29 |
I need the code of how they calculate the array containing the maximum/minimum difference between the number of trades at the Ask price or higher and the number of trades at the Bid price or lower, for the bar at the specified Index.
|
[2023-02-17 21:37:39] |
User90125 - Posts: 715 |
So you want SC to give you their proprietary, internal code?
|
[2023-02-17 21:43:58] |
Ragy - Posts: 29 |
Is it? I did not know that? Actually how do you know that? All source codes are there in documentation and available to their customers. So why the codes for these two specific array would be proprietary?
|
[2023-02-17 21:51:17] |
User90125 - Posts: 715 |
Wait for SC Support to tell you then.
|
[2023-02-17 22:54:17] |
John - SC Support - Posts: 40275 |
The code you have access to are custom studies. Most of the rest of Sierra Chart is proprietary code, and that includes how the Max/Min deltas are calculated. Therefore, this is not available.
For the most reliable, advanced, and zero cost futures order routing, use 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: