Custom Function Error
3 replies
Farhan
2 months ago #281739
I successfully add my custom code to the SQX by adding it to the end of code (..code\MetaTrader5\CustomFunctions\CustomFunctions.mq5) and I also saw my code at the end of the also wizard source code
And, it works well in the MetaTrader5 platform but I don’t why it is not working in Algowizard and received Error: CustomFunction is not implemented in strategy quant”. I attached the Error pic
this is my simple code:
//————————–
int MyFun()
{
int Clean=-1; int LengDownUp=5;
for(int x=3; x<LengDownUp+3; x++)
{ if (iClose(NULL,PERIOD_CURRENT,x) > iOpen(NULL,PERIOD_CURRENT,x))
Clean=0;
Print(“Close[“+x+”]= ” + iClose(NULL,PERIOD_CURRENT,x)+” Result= “+Clean );
}
return(Clean);
}

tomas262
2 months ago #281784
Hi,
custom code placed into the CustomFunctions.mq5 cannot be used in StrategyQuantX. The functions and code is supposed to be used only in MetaTrader 4 / 5 unfortunately
If you want new functions available in StrategyQuantX you need to add new Java code. See examples here https://strategyquant.com/codebase
Farhan
2 months ago #281792
I don’t know Java, Is it possible to convert it to Java by your team?
Also, do you have any guidelines to learn me how to code in Java & where to compile it in SQX? I want to see if maybe I can do it by myself.
To be honest, the Algo wizard is a very useful & creative tool but unfortunately, it doesn’t have the popular “For ” function I think it is essential and needs to be added in the Algowizrd.

tomas262
2 months ago #281817
Hi,
sure, if you need a hand with Java, you can request help using this page https://strategyquant.com/codebase/request-coding/
Viewing 4 posts - 1 through 4 (of 4 total)