You can pass the bar date/time to a DLL just by specifying that parameter “AS date” when you describe the DLL parameter in the “External DLL call” indicator. Dates are double float where the whole part is the date and the fractional part is the time. Dates are in Julian format where 1 is January 1, 1900. The time is just the fraction of the day so 1/24 = 1 hour, 1/1440 = 1 minute, etc. Therefore January 3, 1900 at 9am would be 3.375. June 1, 2004 at 4:10 PM would be 38139 + 16/24 + 10/1440 = 38139.67361111. Note that there could be precision and rounding issues involved in these floating point numbers.
Related Articles
-
Example 23 External DLL call for True Range Indicator
- -1
- 2022
-
June 2018 Newsletter – Can Your Models Evolve With Changing Markets?
- 0
- 1335
-
Adaptive Moving Average Source Code
- 2
- 3059
-
How to create a regular Windows DLL by using Visual C++ .NET
- 0
- 1600
-
Another PowerBasic Example – a Random Number Generator
- 0
- 1459
-
SDK for Building Custom DLLs
- 0
- 1806