Reply

Stochastic Syntax

1 replies

Dustin Baker

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

Visit profile

1 week ago #279954

Hello,

 

I have noticed that functions in the PseudoCode and in the other Engines can sometimes be somehow customized. For example there is an SQ_ prefix on SQ_Stochastic() and this is not a function that is in the MT5 general library.

This makes it difficult to interpret and use in other languages such as Haasscript and Python.

Pseudo:
Stochastic(Main chart, <span style=”text-decoration: underline;”>StochSlowDKPeriod, StochSlowDDPeriod, StochSlowDSlowing</span>).Slow%D[1] > 7
MT5:
indicatorHandles[STOCHASTIC_1] = iCustom(NULL,0, “SqStochastic”, <span style=”text-decoration: underline;”>StochSlowDKPeriod</span>, <span style=”text-decoration: underline;”>StochSlowDDPeriod</span>, <span style=”text-decoration: underline;”>StochSlowDSlowing</span>, MODE_SMA, STO_LOWHIGH);
This code for example, utilizes some naming conventions that are not readily apparent.
In the STOCH function in another language, I find that it’s looking for:
  1. fastK – Number

    Fast %K period length.

  2. slowK – Number

    Slow %K period length.

  3. slowD – Number

    Slow %D period length.

Searching for MT5 syntax and function help didn’t solve the issue since they don’t have this Function called “SqStochastic”.  I figured this might be my limited knowledge on MT5 but I found the same in MT4, Tradestation, and JForex code examples, with similar lack of info on google.

 

Could someone point me in the right direction of where I can find out what the calculations/code is “behind the psuedo-code functions” that were used in the backtest?  So for example if I ran the Builder using the MT5 engine, then where can I find the Formula or details of the Parameter Inputs that MT5 is expecting so that I can kind of “convert” that over to other languages that don’t ask for the same names?

Thanks!

0

tomas262

Administrator, sq-ultimate, 1 replies.

Visit profile

3 days ago #280103

Hi,

navigate to the internal\extend\Code\MetaTrader5\blocks and you will find templates for all building blocks.

There are function calls and parameter settings. You can also look into the source code of the indicator itself.

Indicators can be found in custom_indicators\MetaTrader5\Indicators. Alternatively, you can also look at Java snippets as well

0

Viewing 2 posts - 1 through 2 (of 2 total)