I have to create a indicator by C++ Language.
I have been troubled for execution error occurs when using the TimeCurrent() function.
I was testing with the following sample code.
Result of checking the logs from Print() function, I'm sure that Time() function is executed without any problems.
And Pop-up message is displayed when executed the TimeCurrent() function.
Please check the following sample code and Screen Shot.
Let me know how to use the TimeCurrent() function.
Do I need to obtain the latest version of the "IndicatorInterfaceUnit.h"?
Code: Select all
EXPORT void __stdcall Calculate(int pIndex) {
char WorkText[100];
if (pIndex == 0) {
sprintf(WorkText, "Time(pIndex)=%f", Time(pIndex));
Print(WorkText);
sprintf(WorkText, "TimeCurrent()=%f", TimeCurrent());
Print(WorkText);
}
}
[My development environment]
Windows 7 Home Edition Premiun (Service Pack 1) 64Bit
Microsoft Visual C++ 2010 Express (Version 10.0.40219.1 SP1Rel)
[Forex Tester environment(C++)]
TechnicalFunctions.h (2011/02/10 23:23)
IndicatorInterfaceUnit.h (2011/08/27 09:02)
Code: Select all
I was fixing the bug in IndicatorInterfaceUnit.h.
###Before###
1678: //-----Delete all objects------------------------------------------------------
1679: void ObjectsDeleteAll(int window = 0, TObjectType ObjType = obj_AnyObject)
###After###
1678: //-----Delete all objects------------------------------------------------------
1679: void ObjectsDeleteAll(int window, TObjectType ObjType)