the STD function

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #110988 quote
    assi
    Participant
    Senior

    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 quote
    robertogozzi
    Moderator
    Master

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

    #111022 quote
    assi
    Participant
    Senior

    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 quote
    robertogozzi
    Moderator
    Master

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

    #111026 quote
    Nicolas
    Keymaster
    Master

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

    STD[period][offset]

    The offset period is always in brackets:

    STD[12][234]

    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.

    robertogozzi thanked this post
    #111058 quote
    assi
    Participant
    Senior

    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 quote
    Nicolas
    Keymaster
    Master

    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 quote
    assi
    Participant
    Senior

    Thank you for clarify that for me!!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

the STD function


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
assi @assi Participant
Summary

This topic contains 7 replies,
has 3 voices, and was last updated by assi
6 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/23/2019
Status: Active
Attachments: No files
Logo Logo
Loading...