explanation of the CALL instruction

Forums ProRealTime English forum ProOrder support explanation of the CALL instruction

Viewing 6 posts - 1 through 6 (of 6 total)
  • #110905

    Hi ALL,

     

    I am trying to understand the “CALL”  function.

    I read the documentation but didn’t how to use it in the code.

    For example, I saw strategy that had 5 values but 6 parameters (rsi indicator) , also the number didn’t make sense:

    value1, value2, value3, value4, value5 = CALL RSI (30, 0, 1, 100, 8, 10)(CLOSE)

     

    What the coder means by that?

    Thanks for any help.

    Assi

     

    #110913

    The values are the returns of the indicator so if the last line of the indicator is:

    then value1 = a, value2 = b value3 = c etc

    The parameters in brackets are the variables that the indicator needs. So for example an RSI indicator that just needs to know the period that it should be calculated on would just need one parameter. 14 for RSI[14] or 2 for RSI[2] for example.

    The parameters are the adjustable variables that you would find in the indicator settings window in the order they are presented there.

    1 user thanked author for this post.
    #110914

    Got it!!

    wow!! i really thank you.

    If there are only 3 values and 5 parameters (none of them is zero), then the logic is that the first value always get the firs parameter?

    #110915

    If there are only 3 values and 5 parameters (none of them is zero), then the logic is that the first value always get the firs parameter?

    I’m not sure that I understand what you are asking.

    An indicator might have four adjustable parameters and return two values.

    You call it with whatever parameter values you want to use and it returns the output of that indicator.

     

    So if you have an indicator (called myIndicator) that is as follows with adjustable variables of p1, t1, p2, t2 in that order:

    Then you call it in your strategy using:

    That would retrieve the 50 period simple moving average and the 100 period exponential average and your strategy would then store those values as ave1 and ave2

     

    #110916

    Thanks for the example, it’s clears the thing.

     

    Thanks for your time.

    #110929

    Link to explanation added as Log 179 here …

    Snippet Link Library

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

Create your free account now and post your request to benefit from the help of the community
Register or Login