I have a dll which get raw data from external data source and returns a signal in real time. Signals are 1(means buy), 0 (hold) and -1(sell). How can I get these signals from my dll to use in MC like every one minute? And how to plot it and execute it?
If there is a timer in Multicharts, then I can use the timer to call the dll every one minute and get signals, but I didn't find(maybe someone knows)
Or I can set a timer in my dll?
Can someone let me know? Thanks a lot
how to get signals from dll every one minute?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: how to get signals from dll every one minute?
Hello tzsmile,
In order to get a value from dll you need to use DefineDLLFunc reserved word.
How to use DefineDLLFunc:
“dll name”, the parameter dll returns, “the name of the function you refer to (inside the external dll)”, the type of the data you send to the external dll.
Example: "GlobalVariable.dll", float, "GV_GetFloat", int ;
The code is executed on each study calcualtion. If you need to generate orders then your study type should be Signal.
There are multiple ways the signals are calculated in MultiCharts. Please refer to the following article for more details:How_Signals_are_Calculated
In order to get a value from dll you need to use DefineDLLFunc reserved word.
How to use DefineDLLFunc:
“dll name”, the parameter dll returns, “the name of the function you refer to (inside the external dll)”, the type of the data you send to the external dll.
Example: "GlobalVariable.dll", float, "GV_GetFloat", int ;
The code is executed on each study calcualtion. If you need to generate orders then your study type should be Signal.
There are multiple ways the signals are calculated in MultiCharts. Please refer to the following article for more details:How_Signals_are_Calculated
Re: how to get signals from dll every one minute?
Thanks, but the problem is that the external data source is returning data at all times, so I need to use a timer through which I can call dll ,for example, every minute. Is there a timer in Multicharts or I can write the timer in my dll ?
Re: how to get signals from dll every one minute?
RecalcLastBarAfter can helpTso I need to use a timer through which I can call dll ,for example, every minute. Is there a timer in Multicharts or I can write the timer in my dll ?