【主图】色带指标
指标分类:主图指标效果图:
指标代码:
//------------------------------------------------------------------------
// 简称:SD
// 名称:色带
// 类别: 交易指令
// 类型: 用户应用
//------------------------------------------------------------------------
Params
//参数定义
Integer jishu(13);
Integer db(1);
Integer zb(26);
Integer hz2db(8);
Integer hz2zb(39);
GlobalVars
//全局变量定义
Vars
//局部变量定义
Begin
//策略执行区
Numeric zhuxian = (MA(Close,6) + MA(Close, 12) + MA(Close, 24) + MA(Close, 36))/4;
PlotNumeric("主线", zhuxian, Rgb(255,0,255));
Numeric hz = EMA(Close, jishu);
Numeric duanbo = EMA(hz, db);
Numeric zhongbo = EMA(hz, zb);
PlotNumeric("短波", duanbo, Rgb(0,187,0));
PlotNumeric("中波", zhongbo, Red);
Numeric hz2 = EMA(hz, hz2db);
Numeric hz4 = EMA(hz, hz2zb);
PlotNumeric("HZ2", hz2, Green);
SetShapeStyle("HZ2",2);
PlotNumeric("HZ4", hz4, Rgb(255,00,255));
SetShapeStyle("HZ4",2);
If(hz2 < hz4){
PlotStickLine(" ",hz2, hz4,Blue);
}
if(duanbo >hz2){
PlotStickLine("", duanbo, hz2, Green);
}
if(zhongbo > hz4){
PlotStickLine(" ", zhongbo, hz4, Rgb(255, 0, 255));
}
End
页:
[1]