N:=10;
{财务数据}
DRAWTEXT_FIX(ISLASTBAR ,0.065,0.01,1,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR ,0.065,0.01,0,HYBLOCK),COLORYELLOW;
周期:=N;{是可见的周期数,设为参数N(30,480,240),自己调}
高1:=CONST(HHV(H,周期)); 低1:=CONST(LLV(L,周期)); H_L:=高1-低1;{阶段高低差}
{HH:=H+H_L*0.1; LL:=L-H_L*0.1;}
顶: 高1,COLORRED;
HL809: 低1+H_L*0.809,COLORBLUE,POINTDOT;
HL618: 低1+H_L*0.618,COLORBLUE,POINTDOT;
HL500: 低1+H_L*0.500,COLORBLUE,POINTDOT;
HL382: 低1+H_L*0.382,COLORBLUE,POINTDOT;
HL191: 低1+H_L*0.191,COLORBLUE,POINTDOT;
底: 低1,COLORGREEN;
LTJ:= L=低1;
LSJ:=BARSLAST(LTJ)+1;
L00:=低1+H_L*0.05;
{DRAWTEXT(LSJ=5,L00,'5');
DRAWTEXT(LSJ=8,L00,'8');
DRAWTEXT(LSJ=13,L00,'13');}
DRAWTEXT(LSJ=21,L00,'21');
DRAWTEXT(LSJ=34,L00,'34');
DRAWTEXT(LSJ=55,L00,'55');
DRAWTEXT(LSJ=89,L00,'89');
DRAWTEXT(LSJ=144,L00,'144');
DRAWTEXT(LSJ=233,L00,'233');
HTJ:= H=高1;
HSJ:=BARSLAST(HTJ)+1;
H00:=高1-H_L*0.03;
{DRAWTEXT(HSJ=5,H00,'5');
DRAWTEXT(HSJ=8,H00,'8');
DRAWTEXT(HSJ=13,H00,'13');}
DRAWTEXT(HSJ=21,H00,'21');
DRAWTEXT(HSJ=34,H00,'34');
DRAWTEXT(HSJ=55,H00,'55');
DRAWTEXT(HSJ=89,H00,'89');
DRAWTEXT(HSJ=144,H00,'144');
DRAWTEXT(HSJ=233,H00,'233');