Announcement

Collapse
No announcement yet.

sma() function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sma() function

    Hi there,

    I'm trying to figure out (my goal is to reproduce) how sma() function works in the context of StochasticD.efs function.

    In StochasticD.efs :

    function main(inputKLength, inputKSmoothing, inputDSmoothing) {
    if (xStochK == null) xStochK = efsExternal("StochasticK.efs", inputKLength, inputKSmoothing);
    if (xStochD == null) xStochD = sma(inputDSmoothing, xStochK);
    return xStochD.getValue(0);
    }

    I've read the info on sma() fucntion in the knowledge base but something is missing for this context.

    I've set the output to Formula Output window and I can see that the parameters values are (sma(inputDSmoothing, xStochK) :

    -inputDSmoothing = 3
    -xStochK = null

    Is the result the average of the last 3 StochK function ?

    I'm sorry, this is probably obvious ... Is it possible to look at the source code of sma() function ?


    Thanks for your help

  • #2
    Re: sma() function

    Olyster

    Is the result the average of the last 3 StochK function ?
    That is correct
    Alex


    Originally posted by Olyster
    Hi there,

    I'm trying to figure out (my goal is to reproduce) how sma() function works in the context of StochasticD.efs function.

    In StochasticD.efs :

    function main(inputKLength, inputKSmoothing, inputDSmoothing) {
    if (xStochK == null) xStochK = efsExternal("StochasticK.efs", inputKLength, inputKSmoothing);
    if (xStochD == null) xStochD = sma(inputDSmoothing, xStochK);
    return xStochD.getValue(0);
    }

    I've read the info on sma() fucntion in the knowledge base but something is missing for this context.

    I've set the output to Formula Output window and I can see that the parameters values are (sma(inputDSmoothing, xStochK) :

    -inputDSmoothing = 3
    -xStochK = null

    Is the result the average of the last 3 StochK function ?

    I'm sorry, this is probably obvious ... Is it possible to look at the source code of sma() function ?


    Thanks for your help

    Comment

    Working...
    X