Reply

Custom Function Error

3 replies

Farhan

Subscriber, bbp_participant, sq-ultimate, 3 replies.

Visit profile

1 year 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);
}

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

1 year 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

0

Farhan

Subscriber, bbp_participant, sq-ultimate, 3 replies.

Visit profile

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

1 year ago #281817

Hi,

sure, if you need a hand with Java, you can request help using this page https://strategyquant.com/codebase/request-coding/

0

Viewing 3 replies - 1 through 3 (of 3 total)