Debug Assertion Failed

Bug reports and errors in the program
Message
Author
t56
Posts: 3
Joined: Mon Dec 21, 2015 6:25 pm

Debug Assertion Failed

#1 Postby t56 » Mon Dec 21, 2015 6:41 pm

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???

attachment.jpg
attachment.jpg (41.71 KiB) Viewed 28809 times

FX Helper
Posts: 1475
Joined: Mon Apr 01, 2013 3:55 am

Re: Debug Assertion Failed

#2 Postby FX Helper » Tue Dec 22, 2015 8:47 am

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.

t56
Posts: 3
Joined: Mon Dec 21, 2015 6:25 pm

Re: Debug Assertion Failed

#3 Postby t56 » Wed Dec 23, 2015 4:27 am

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:

attachment2.jpg
attachment2.jpg (40.78 KiB) Viewed 28792 times

Any solution?
Attachments
AssisiTest.zip
(18.33 KiB) Downloaded 577 times

t56
Posts: 3
Joined: Mon Dec 21, 2015 6:25 pm

Re: Debug Assertion Failed

#4 Postby t56 » Wed Dec 23, 2015 4:44 am

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 ... .


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 3 guests