使用这个公式一定要结合趋势走势使用,上升趋势和下降趋势用法不一样,网上有很多讲解,不赘述了
源码
A1:=C>REF(C,4);
A2:=C<REF(C,4);
T1:=A2 AND REF(A1,1);
T2:=A2 AND REF(T1,1);
T3:=A2 AND REF(T2,1);
T4:=A2 AND REF(T3,1);
T5:=A2 AND REF(T4,1);
T6:=A2 AND REF(T5,1);
T7:=A2 AND REF(T6,1);
T8:=A2 AND REF(T7,1);
T9:=A2 AND REF(T8,1);
T10:=A2 AND REF(T9,1);
T11:=A2 AND REF(T10,1);
T12:=A2 AND REF(T11,1);
T13:=A2 AND REF(T12,1);
T14:=A2 AND REF(T13,1);
DRAWTEXT(T1,L*0.98,'1'),colorgreen;
DRAWTEXT(T2,L*0.98,'2'),colorgreen;
DRAWTEXT(T3,L*0.98,'3'),colorgreen;
DRAWTEXT(T4,L*0.98,'4'),colorgreen;
DRAWTEXT(T5,L*0.98,'5'),colorgreen;
DRAWTEXT(T6,L*0.98,'6'),colorgreen;
DRAWTEXT(T7,L*0.98,'7'),colorgreen;
DRAWTEXT(T8,L*0.98,'8'),colorgreen;
DRAWTEXT(T9,L*0.98,'9'),colorblue;
B1:=C<REF(C,4);
B2:=C>REF(C,4);
D1:=B2 AND REF(B1,1);
D2:=B2 AND REF(D1,1);
D3:=B2 AND REF(D2,1);
D4:=B2 AND REF(D3,1);
D5:=B2 AND REF(D4,1);
D6:=B2 AND REF(D5,1);
D7:=B2 AND REF(D6,1);
D8:=B2 AND REF(D7,1);
D9:=B2 AND REF(D8,1);
D10:=B2 AND REF(D9,1);
D11:=B2 AND REF(D10,1);
D12:=B2 AND REF(D11,1);
D13:=B2 AND REF(D12,1);
D14:=B2 AND REF(D13,1);
DRAWTEXT(D1,H*1.010,'1'),colorblue;
DRAWTEXT(D2,H*1.010,'2'),colorblue;
DRAWTEXT(D3,H*1.010,'3'),colorblue;
DRAWTEXT(D4,H*1.010,'4'),colorblue;
DRAWTEXT(D5,H*1.010,'5'),colorblue;
DRAWTEXT(D6,H*1.010,'6'),colorblue;
DRAWTEXT(D7,H*1.010,'7'),colorblue;
DRAWTEXT(D8,H*1.010,'8'),colorblue;
DRAWTEXT(D9,H*1.010,'9'),colorgreen;