Support Board
Date/Time: Thu, 13 Feb 2025 02:51:27 +0000
[Programming Help] - Calling my own dll to avoid double source code
View Count: 817
[2020-11-19 15:28:40] |
gfx2trade - Posts: 48 |
Hi SC team, I wrote a study using ASCIL that displays a colored bar based on a calculated number (capture1.jpg) In another dll I would like to get the calcultated number calling this DLL. I went through ACSIL Programming Concepts: Making Function Calls to External DLLs but I can't figure out on how to process. My dll file is gfx_Studies_64.dll In my trading system study, I could add the following line and compile // --------------------------------------------------------------------------
HINSTANCE hInstLibrary = LoadLibrary("gfx_Studies_64.dll"); // -------------------------------------------------------------------------- in gfx_Studies_64.dll I calculation is done in a specific study SCSFExport scsf_EasyTrend(SCStudyInterfaceRef sc)
{ What code do I need to add in my trading system study in order to call scsf_EasyTrend and retreive the computed value ? Also, is there any code to add to gfx_Studies_64.dll in order to allow external calls ? Thks for your help. B. gfx |
![]() |
[2020-11-20 15:40:23] |
ForgivingComputers.com - Posts: 1001 |
If EasyTrend has a subgraph that outputs the number you want then you can use sc.GetStudyArrayUsingID.
|
[2020-11-20 17:39:05] |
gfx2trade - Posts: 48 |
hi bradh, thks. EasyTrend is not displayed on the chart. I only did it to illustrate the issue. B. Gfx |
[2020-11-20 17:52:01] |
ForgivingComputers.com - Posts: 1001 |
EasyTrend is not displayed on the chart.
It doesn't have to be displayed, it could be hidden. If you are saying that EasyTrend is providing data to gfx_Studied.dll, does it use a subgraph? |
[2020-11-22 16:04:50] |
gfx2trade - Posts: 48 |
Hi, thks Sorry for the confusion. In fact, even hidden, it won't be attached to the chart. What I meant is to be able into my trading system to write such a line .... int myTrend = Call scsf_EasyTrend(sc)
and get as a result in myTrend the value calculated in the study gfx_Studies_64.dllI hope it clarifies. B. gfx |
To post a message in this thread, you need to log in with your Sierra Chart account: