九毛八公式指标
源码如下: INPUT: P1(60,0,100),P2(5,0,100),P3(10,0,100); REFLINE:0; VAR0:=MIN(COUNT(ORDER(2),0),P1); VAR1:=EMA((2 - BIGORDER(1) - BIGORDER(2)) * VOL/(ORDER(1) + ORDER(2)),60); DDY:(ORDER(2) - ORDER(1))/CAPITAL * VAR1 * 100,COLOR3D; DDY1:EMA((ORDER(2) - ORDER(1))/CAPITAL * VAR1 * 100,VAR0) * VAR0; DDY2:MA(DDY1,P2); DDY3:MA(DDY1,P3); DRAWTEXTABS(0,0,'涨跌动因'); 1,DOTLINE; 想选出: 一、DDYI>DDY2>DDY3,这样的情形,在最近20天内,至少出现4次。 二、在这20天内,DDY1从未小于DDY2。 谢谢!
公式模块:
VAR0:=MIN(COUNT(ORDER(2),0),60); VAR1:=EMA((2 - BIGORDER(1) - BIGORDER(2)) * vol/(ORDER(1) + ORDER(2)),60); DDY1:=EMA((ORDER(2) - ORDER(1))/CAPITAL * VAR1 * 100,VAR0) * VAR0; DDY2:=MA(DDY1,5); DDY3:=MA(DDY1,10); COUNT(DDY1>DDY2 AND DDY2>DDY3,20)>=4 AND LAST(DDY1>DDY2)>=20;