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

Postby franksv » 25 Jan 2012

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

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: StandardDev of a fixed price

Postby TJ » 25 Jan 2012

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

Postby franksv » 25 Jan 2012

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

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: StandardDev of a fixed price

Postby TJ » 25 Jan 2012

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

Postby franksv » 25 Jan 2012

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

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: StandardDev of a fixed price

Postby TJ » 25 Jan 2012

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.

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

Re: StandardDev of a fixed price

Postby franksv » 25 Jan 2012

Thanks for your Answear

how can set the stdDev for a specific date

STDDev(Close,Date) ?

Thanks

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: StandardDev of a fixed price

Postby TJ » 25 Jan 2012

Thanks for your Answear

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

Postby franksv » 25 Jan 2012

Thank you for yor Help

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: StandardDev of a fixed price

Postby TJ » 25 Jan 2012

Thanks for your Answear

how can set the stdDev for a specific date

STDDev(Close,Date) ?

Thanks
Please read the last line of post #6.


Return to “MultiCharts”