- 精华
- 1
- 在线时间
- 964 小时
- UID
- 727
- 积分
- 3770
- 帖子
- 537
- 阅读权限
- 80
- 注册时间
- 2007-11-11
- 最后登录
- 2015-4-8
- 精华
- 1
- UID
- 727
- 积分
- 3770
- 帖子
- 537
- 主题
- 55
- 阅读权限
- 80
- 注册时间
- 2007-11-11
- 最后登录
- 2015-4-8
|
- // 简称: atrs
- // 名称: ATR指标
- // 类别: 技术指标
- // 类型: 其它类
- // 输出:
- //------------------------------------------------------------------------
- Params
- Numeric length(10);
- Vars
- Numeric atr;
- string strkey;
- string strValue;
- Begin
- atr= AverageFC(TrueRange,Length);;
- strKey = DateToString(Date);
- strValue = Text(atr);
- SetTBProfileString("Dayatr",strKey,strValue);
- PlotNumeric("atr",atr);
- End
复制代码- // 简称: atrmin
- // 名称: ATR分钟指标
- // 类别: 技术指标
- // 类型: 其它类
- // 输出:
- //------------------------------------------------------------------------
- Params
- Numeric Currentmaxdate(20090201);
- Vars
- NumericSeries dayatrValue;
- StringSeries strKey;
- string strValue;
- Begin
- If(Date!=Date[1])
- {
- strKey = DateToString(Date[1]);
- }Else
- {
- strKey = strKey[1];
- }
-
- strValue = GetTBProfileString("Dayatr",strKey);
- If(strValue != InvalidString)
- {
- dayatrValue = Value(strValue);
- }Else
- {
- dayatrValue = dayatrValue[1];
- }
- if(date>=Currentmaxdate)
- {
- PlotNumeric("Dayatr",DayatrValue);
- }
- End
复制代码 |
|