// 简称: MinsXAverage
// 名称: 1分钟转换N分钟的指数平均
// 类别: 用户函数
// 类型: 用户函数
// 输出: 数值型
//------------------------------------------------------------------------
Params
Numeric nMinSet(3);
NumericSeries Price(10);
Numeric Length(10);
Vars
NumericSeries MinsBarIndex;
BoolSeries FirstMin(True);
Numeric sFcactor;
NumericSeries XAvgValue;
Begin
If(CurrentBar == 0)
{
FirstMin = True;
}Else
{
FirstMin = FirstMin[1];
If(FirstMin && IntPart(Minute/nMinSet) != IntPart(Minute[CurrentBar]/nMinSet))
{
FirstMin = False;
}
}
If(IntPart(Minute%nMinSet)==0)
{
MinsBarIndex = 1;
}Else
{
MinsBarIndex = MinsBarIndex[1] + 1;
}
sFcactor = 2 / ( Length + 1 );
if (FirstMin)
{
XAvgValue = Price;
}else
{
XAvgValue = XAvgValue[MinsBarIndex] + sFcactor * ( Price - XAvgValue[MinsBarIndex] ) ;
}
Return XAvgValue;
End
哪的问题运行不起
想问什么?
就是有问题,不知是语法,还是其他,编译不了
能不能解决,有没有技术部的人