StandardDev of a fixed price

Questions about MultiCharts and user contributed studies.
franksv
Posts: 8
Joined: 13 Jan 2011
Location: Norway
Contact:

StandardDev of a fixed price

Does anybody know the code to make a StandardDev of a fixed price?

TJ
Posts: 6834
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 979 times
Been thanked: 1968 times

Re: StandardDev of a fixed price

franksv wrote:Does anybody know the code to make a StandardDev of a fixed price?

What do you mean by that?
Can you post the mathematical formula and description?

franksv
Posts: 8
Joined: 13 Jan 2011
Location: Norway
Contact:

Re: StandardDev of a fixed price

hello again
My mistake
Basicly I need a formula which is calculating Standardev of a series of Prices from a specific day and backwards
In an Excel formula it would look like this ROUND(STDEV(H4:H31);2)
The StdDev would then be ex 1.2 which is a number I can use for the next series
To compare development in STDDev

I know I probebly can get at Stdev from a Series in MC calculated like
= STdDev(close, Length);
But that would be a variable from day to day.

Hope you can help
Thanks

TJ
Posts: 6834
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 979 times
Been thanked: 1968 times

Re: StandardDev of a fixed price

franksv wrote:hello again
My mistake
Basicly I need a formula which is calculating Standardev of a series of Prices from a specific day and backwards
In an Excel formula it would look like this ROUND(STDEV(H4:H31);2)
The StdDev would then be ex 1.2 which is a number I can use for the next series
To compare development in STDDev

I know I probebly can get at Stdev from a Series in MC calculated like
= STdDev(close, Length);
But that would be a variable from day to day.

Hope you can help
Thanks

What is the difference between the following?

STDEV(H4:H31)

STdDev(close, Length)

franksv
Posts: 8
Joined: 13 Jan 2011
Location: Norway
Contact:

Re: StandardDev of a fixed price

Hello Again

STDEV(H4:H31) Could Be a specific Time Series
Ex From 2011-12-02 to 2011-12-30

That would be 20 Trading Days

STdDev(close, 20)
Would be from Close of Today and 20 Days Back

Thanks

TJ
Posts: 6834
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 979 times
Been thanked: 1968 times

Re: StandardDev of a fixed price

franksv wrote:Hello Again

STDEV(H4:H31) Could Be a specific Time Series
Ex From 2011-12-02 to 2011-12-30

That would be 20 Trading Days

STdDev(close, 20)
Would be from Close of Today and 20 Days Back

Thanks

you can reference previous StdDev by using the [1] bracket.

eg.

Code: Select all

`variable:stand(0);stand = STdDev(close, 20);`

stand[4] would be the stddev of 4 days ago.

if you want to compare the stddev of 4 days ago with stddev of 10 days ago, you would code it this way:

stand[4] - stand[10]

if you want to compare a specific date, then you have to first find out how many days ago is that specific date.
These users thanked the author TJ for the post:
JoshM

franksv
Posts: 8
Joined: 13 Jan 2011
Location: Norway
Contact:

Re: StandardDev of a fixed price

how can set the stdDev for a specific date

STDDev(Close,Date) ?

Thanks

TJ
Posts: 6834
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 979 times
Been thanked: 1968 times

Re: StandardDev of a fixed price

how can set the stdDev for a specific date

STDDev(Close,Date) ?

Thanks

No, you can not do it by date, neither could excel.

In EasyLanguage, you reference everything by bar.

The function STDDev(Close, 20) refers to
the standard deviation of the closing price of the previous 20 bars, starting from, and including the current bar.

Anything previous to the current bar can be referenced with the square bracket [ ].

Please see the EasyLanguage manuals for further explanation and examples.
https://www.multicharts.com/multicharts/ ... mentation/

franksv
Posts: 8
Joined: 13 Jan 2011
Location: Norway
Contact:

Re: StandardDev of a fixed price

Thank you for yor Help

TJ
Posts: 6834
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 979 times
Been thanked: 1968 times