- 精华
- 0
- 在线时间
- 0 小时
- UID
- 22898
- 积分
- 30
- 帖子
- 9
- 阅读权限
- 10
- 注册时间
- 2011-1-2
- 最后登录
- 2012-3-31
- 精华
- 0
- UID
- 22898
- 积分
- 30
- 帖子
- 9
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2011-1-2
- 最后登录
- 2012-3-31
|
初学TB,原来在V3上弄了个公式,使用正常。软件现在升级到V4了,原来那个公式搬到V4中不能用了(编辑公式时可以通过校验)。
有请过路的达人看一下,是什么原因?菜鸟在些先谢过啦!公式原码如下:
Params
Numeric length2(5);
Numeric length3(9);
Numeric length4(3);
Vars
Numeric cshcolumcolor;
NumericSeries cshrs;
NumericSeries cshdiff;
NumericSeries cshdea;
NumericSeries cshcolum;
begin
cshrs=SMA(MAX(CLOSE-close[1],0),14,1)/SMA(ABS(CLOSE-close[1]),14,1)*100;
cshdiff=XAverage(cshrs,length2);
cshdea=Average(cshdiff,length3);
cshcolum=2*Average((cshdiff-cshdea),3);
If(cshcolum>cshcolum[1])
{
cshcolumcolor=Red;
}Else
{cshcolumcolor=Cyan;
}
PlotNumeric ("cshcolum",cshcolum,cshcolumcolor);
end |
|