the STD function
Forums › ProRealTime English forum › ProBuilder support › the STD function
- This topic has 7 replies, 3 voices, and was last updated 5 years ago by assi.
-
-
10/23/2019 at 8:40 PM #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
10/24/2019 at 12:16 AM #110998It will return the STD[12] of the 234th bar (233rd previous bar, being 0 the current one).
10/24/2019 at 8:01 AM #11102210/24/2019 at 8:17 AM #111025Yes, because BARINDEX is the number of bars elapsed, thus as an index it will bring you back to the first bar.
10/24/2019 at 8:19 AM #111026Your syntax is incorrect, if you want to get the 12 periods Standard Deviation, 234 bars ago, the syntax must be:
1STD[period][offset]The offset period is always in brackets:
1STD[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.
1 user thanked author for this post.
10/24/2019 at 1:02 PM #111058OK.
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?
10/24/2019 at 1:19 PM #111061Sorry, 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).
10/24/2019 at 1:26 PM #111062 -
AuthorPosts
Find exclusive trading pro-tools on