Here's my code:
char buff[1000];
sprintf(buff, "%d;0;0;%s;Close", 60, StrMAType(ma_EMA));
IndMA = CreateIndicator("EURUSD", 120, "MovingAverage", buff);
SetIndicatorBuffStyle(IndMA, 0, psSolid, 1, clYellow);
But running that in FT2, directly after code "IndMA = CreateIndicator(.." the following error-box occures.
Any idea???
Debug Assertion Failed
-
- Posts: 1479
- Joined: Mon Apr 01, 2013 3:55 am
Re: Debug Assertion Failed
Hello,
You need to set this code in ResetStrategy function:
For example:
EXPORT void __stdcall ResetStrategy()
{
IndMACD = CreateIndicator("EURUSD", 15, "MACD", "8;20;12;Close");
char buff[1000];
sprintf(buff, "%d;0;0;%s;Close", MATrendPeriod, StrMAType(ma_EMA));
IndMA = CreateIndicator("USDJPY", 60, "MovingAverage", buff);
}
After this, everything should work properly
You can find all necessary info in Forex Tester program, Help -> Stategies API menu, click on CreateIndicator at the bottom of the window.
You need to set this code in ResetStrategy function:
For example:
EXPORT void __stdcall ResetStrategy()
{
IndMACD = CreateIndicator("EURUSD", 15, "MACD", "8;20;12;Close");
char buff[1000];
sprintf(buff, "%d;0;0;%s;Close", MATrendPeriod, StrMAType(ma_EMA));
IndMA = CreateIndicator("USDJPY", 60, "MovingAverage", buff);
}
After this, everything should work properly
You can find all necessary info in Forex Tester program, Help -> Stategies API menu, click on CreateIndicator at the bottom of the window.
-
- Posts: 3
- Joined: Mon Dec 21, 2015 6:25 pm
Re: Debug Assertion Failed
Hi,
thanks for the immediate reply, but unfortunally this not helps. Seem's to be a bug in forextester.exe!?
In the attachment you can find my complete (extremely simple) VS-project: The only real code there is "int IndMACD = CreateIndicator("EURUSD", 15, "MACD", "8;20;12;Close");"
But this code now produces only that:
Any solution?
thanks for the immediate reply, but unfortunally this not helps. Seem's to be a bug in forextester.exe!?
In the attachment you can find my complete (extremely simple) VS-project: The only real code there is "int IndMACD = CreateIndicator("EURUSD", 15, "MACD", "8;20;12;Close");"
But this code now produces only that:
Any solution?
- Attachments
-
- AssisiTest.zip
- (18.33 KiB) Downloaded 590 times
-
- Posts: 3
- Joined: Mon Dec 21, 2015 6:25 pm
Re: Debug Assertion Failed
The next resulting question could be:
How to access inbuilt indicator programmatically, importing it directly from it's DLL (for example: MovingAverage.dll)?
Any documentation about? If not, could you provide the sources for those DLL's please? This should help to make there buffers available from outside ... .
How to access inbuilt indicator programmatically, importing it directly from it's DLL (for example: MovingAverage.dll)?
Any documentation about? If not, could you provide the sources for those DLL's please? This should help to make there buffers available from outside ... .
Who is online
Users browsing this forum: No registered users and 20 guests