参数声明的数据类型错误,请高手指点! [开拓者 TB]
- 咨询内容:
Params
NumericSeries Price(1);
Numeric EffRatioLength(10);
Numeric FastAvgLength(2);
Numeric SlowAvgLength(30);
Vars
Numeric NetChg(0);
Numeric TotChg(0);
Numeric EffRatio(0);
Numeric ScaledSFSqr(0);
NumericSeries AMAValue;
Numeric SFDiff;
Begin
if(CurrentBar == 0)
{
AMAValue = Price;
}Else
{
NetChg = Abs( Price - Price[EffRatioLength] );
TotChg = Summation( Abs( Price - Price[1] ), EffRatioLength );
EffRatio = IIF(TotChg > 0, NetChg / TotChg, 0);
SFDiff = 2 / ( FastAvgLength + 1 ) - 2 / ( SlowAvgLength + 1 );
ScaledSFSqr = Sqr( 2 / ( SlowAvgLength + 1 ) + EffRatio * SFDiff );
AMAValue = AMAValue[1] + ScaledSFSqr * ( Price - AMAValue[1] );
}
Return AMAValue;
End
QQ截图20140208173826.jpg (29.3 KB, 下载次数: 0) 2014-2-8 17:39:03 上传 - TB技术人员: 数值
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容