Hallo,
closed(1) of data2 is generating STD error,
can somebody test it, maybe it is only problem of my data ?!
ciao
radekj
closed(1) of data2 does not work, STD error
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
DEfinition of closed:
CloseD (Series Function)
The CloseD function allows you to reference the daily Close of previous days in an intraday chart (minute or tick-based) or a daily chart.
CloseD is a function in a family of functions that allows historical daily, weekly, monthly, and yearly references in intraday charts. See also: HighD, LowD, OpenD, CloseW, CloseM, and CloseY.
Usage
CloseD(PeriodsAgo)
Returns (Double)
A numeric value for the current bar. If the PeriodsAgo parameter is out of range (> 50), or there is not enough data, the function will return –1.
Parameters
PeriodsAgo
A numeric value. The number of days/periods back to reference a previous day’s closing price. (50 days back maximum) (0 = Today’s current Close)
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous close. For example, if you want to look back at the close of 25 days ago on a 5-minute chart, you must have 25 days of 5-minute bars in the chart.
The value for the PeriodsAgo input parameter should always be a positive whole number greater than or equal to 0, but less than 51. Setting PeriodsAgo to 0 equals today’s current Close.
Example
Assigns the Close of the previous day on an intraday chart to Value1, then plots Value1:
Value1 = CloseD(1);
Plot1(Value1, "PrevClose");
CloseD (Series Function)
The CloseD function allows you to reference the daily Close of previous days in an intraday chart (minute or tick-based) or a daily chart.
CloseD is a function in a family of functions that allows historical daily, weekly, monthly, and yearly references in intraday charts. See also: HighD, LowD, OpenD, CloseW, CloseM, and CloseY.
Usage
CloseD(PeriodsAgo)
Returns (Double)
A numeric value for the current bar. If the PeriodsAgo parameter is out of range (> 50), or there is not enough data, the function will return –1.
Parameters
PeriodsAgo
A numeric value. The number of days/periods back to reference a previous day’s closing price. (50 days back maximum) (0 = Today’s current Close)
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous close. For example, if you want to look back at the close of 25 days ago on a 5-minute chart, you must have 25 days of 5-minute bars in the chart.
The value for the PeriodsAgo input parameter should always be a positive whole number greater than or equal to 0, but less than 51. Setting PeriodsAgo to 0 equals today’s current Close.
Example
Assigns the Close of the previous day on an intraday chart to Value1, then plots Value1:
Value1 = CloseD(1);
Plot1(Value1, "PrevClose");
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
it works in my MC.
Version 5.0 Beta 5 (Build 2199)
Version 5.0 Beta 5 (Build 2199)
Last edited by TJ on 18 May 2009, edited 2 times in total.