READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

Custom functions to MetaTrader 4

1 replies

Javier Fernández

Subscriber, bbp_participant, customer, community, sq-ultimate, 3 replies.

Visit profile

1 year ago #290081

Hi everyone,

I’ve created several custom functions in Java within StrategyQuant, and they work well inside the platform when building and testing strategies.

However, I have some doubts regarding how these functions behave during strategy export to MetaTrader 4 (MT4):

Do custom functions (e.g., ones defined under Blocks/Functions in Java) automatically get included in the generated .mq4 file when I export a strategy that uses them?

I noticed that in the SQ interface, my functions are showing the message “Missing code for this block in MetaTrader4” (among other platforms).

Does this mean that I need to manually define the export template (XML) for each custom function so that it works properly in MT4 (and in which path)?

If I don’t define the export code manually, does StrategyQuant simply skip the function or raise an error during export?

I’d really appreciate some clarification on this topic, or guidance on how to structure the XML code correctly to ensure the custom function is translated into valid MQL4 code.

Thanks in advance for your help!

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

1 year ago #290098

Yes, you need to create MQ5 and TPL files to ensure the reference is accurate.

You can find the complete instructions, including TPL and other details, here:
https://strategyquant.com/doc/programming-for-sq/adding-envelopes-indicator-step-by-step/

0

Viewing 1 replies (of 1 total)