|
6楼
楼主 |
发表于 2018-11-16 18:03:27
|
只看该作者
//------------------------------------------------------------------------
// 简称:testjc
// 名称:testjc
// 类别: 交易指令
// 类型: 用户应用
//------------------------------------------------------------------------
Params
//参数定义
Integer nn(10);
GlobalVars
//全局变量定义
Vars
//局部变量定义
Begin
//策略执行区
/*
ATYP:=((CLOSE)+(HIGH)+(LOW))/3;//求最新价,最高价和最低价三者的简单平均
ANN:=10;
MA601KA:=(ATYP-MA(ATYP,ANN))/(0.015*AVEDEV(ATYP,ANN));//TYP与TYP的N周期平均值做差,该差值与TYP在N个周期内的0.015倍的平均绝对偏差值做比值
AKA:=MA(((MA601KA+REF(MA601KA,2)+REF(MA601KA,4)+REF(MA601KA,3)+REF(MA601KA,1))/5),1),COLORYELLOW;
GGAMA601KA+AKA)/2,COLORBLUE;
115;
-115;
*/
Numeric atyp = (Close + High + Low)/3;
Numeric ma601ka = (atyp - MA(atyp, nn))/ (0.015 * StandardDev(atyp, nn));
Numeric aka = MA((ma601ka + REF(ma601ka, 4) + REF(ma601ka, 3) + REF(ma601ka, 2) + REF(ma601ka, 1))/5, 1);
Numeric gga = (ma601ka + aka)/2;
//PlotNumeric("fc", aka, Yellow);
PlotNumeric(" ",115,Yellow);
PlotNumeric(" ",-115,Rgb(255,0,193));
PlotNumeric("gga", gga, Rgb(255,0,193));
End |
|