Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 19:44:20 +0000



Post From: Calling my own dll to avoid double source code

[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
imageCapture1.JPG / V - Attached On 2020-11-19 15:23:55 UTC - Size: 41.15 KB - 257 views