the STD function

  • This topic has 7 replies, 3 voices, and was last updated 5 years ago by avatarassi.
Viewing 8 posts - 1 through 8 (of 8 total)
  • #110988

    Hi,

     

    I have easy question, I think…

    I’m use to work with this function with two parameters: period, price.

    I came across with few indicators that use “BarIndex”: STD[period](barindex)

    What can I learn from that? for example, if the period is 12 and the barindex is 234.

     

    thanks, assi

    #110998

    It will return the STD[12] of the 234th bar (233rd previous bar, being 0 the current one).

    #111022

    thank you for the explanation, I still don’t underspend what I learn from that.

    Do you mean that it’s return the STD for close at the first bar?

    #111025

    Yes, because BARINDEX is the number of bars elapsed, thus as an index it will bring you back to the first bar.

    #111026

    Your syntax is incorrect, if you want to get the 12 periods Standard Deviation, 234 bars ago, the syntax must be:

    The offset period is always in brackets:

    And since BARINDEX is the bars quantity loaded since the start of the history, the offset is a difference between the current barindex and the candle you want to get the value from, not the real barindex number.

     

    1 user thanked author for this post.
    #111058

    OK.

    I don’t know what the coder means in this syntax, I read the documentation and it’s only mention the period and price.

    So now i’m confuse because the code for the offset was written was not in [] but in (): STD[period](barindex).

    In this case, STD[12](barindex), what I will get and learn from that?

    #111061

    Sorry, but the coder means nothing with that line, he is wrong. What is the purpose of getting the standard deviation of the bars numbers?!

    The order is: STD[period](applied price)[offset]

    If you don’t specify the applied price, it is considered as Close by default (like it is for almost indicators instructions).

    #111062

    Thank you for clarify that for me!!

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

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