//------------------------------------------------------------------------
// 简称: hl999
// 名称: 红绿999
// 类别: 策略应用
// 类型: 用户应用
// 输出: Void
//------------------------------------------------------------------------
Params
Vars
Plot plt_line5;
Series<Bool> dtpl;
Series<Bool> ktpl;
Defs
//此处添加策略函数
Events
//此处实现事件函数
//初始化事件函数,策略运行期间,首先运行且只有一次,应用在订阅数据等操作
OnInit()
{plt_line5.figure(0);
}
OnBar(ArrayRef<Integer> indexs)
{
dtpl= ma(c,10)<ma(c,20) and ma(c,5)<ma(c,10) and ma(c,20)<ma(c,30) ;
if(dtpl==True )
{ plt_line5.icon("多投下", 40, "ICO4");
}
if( ma(c,5)<ma(c,10) )
{ plt_line5.icon("多投下1", 10, "you");
}
if( ma(c,10)<ma(c,20) )
{ plt_line5.icon("多投下2", 20, "you");
}
if( ma(c,20)<ma(c,30) )
{ plt_line5.icon("多投下3", 30, "you");
}
ktpl= (ma(c,5)>ma(c,10) and ma(c,10)>ma(c,20) and ma(c,20)>ma(c,30) );
if( ktpl==True )
{ plt_line5.icon("空投上", 70, "ICO5");
}
if( ma(c,5)>ma(c,10) )
{ plt_line5.icon("空投上1", 100, "youshou");
}
if( ma(c,10)>ma(c,20) )
{ plt_line5.icon("空投上2", 90, "youshou");
}
if( ma(c,20)>ma(c,30) )
{ plt_line5.icon("空投上3", 80, "youshou");
}
}
正确情况下 上面的要都都有图才会出现绿色箭头 下面的也是需要3层都有图才出现红色箭头 但是 上面有的不满足条件就出现绿色箭头 下面满足条件却没有出现红色箭头