zz:=FLATZIG(4,16);
z:=IF(ISLASTBAR,0,IF(zz=0,1,IF(zz=1,2,0)));
S:=SUM(z>0,0);
p:=DATACOUNT;
ss:=s[p]-s+1;
bL:=BARSLAST(z=1);
{分析家公式网www.fxjgsw.com}
a1:=TROUGHBARS(2,0.1,1);
a2:=PEAKBARS(1,0.1,1);
光标位置:=SYSPARAM(1);
cldis:=a1[SYSPARAM(1)];
chdis:=a2[SYSPARAM(1)];
tcl:=光标位置-cldis;
tch:=光标位置-chdis;
K1:=IF(tcl>tch,tcl,tch);
PH:=HIGH;
PL:=LOW;
P1:=IF(tcl>=tch,PL[tcl+0],PH[tch+0]);
VERTLINE(BARPOS=K1),COLORYELLOW,LINEDOT;
{DRAWTEXT(数据位置=K1,SYSPARAM(4)*0.95,'转\n \n折\n \n点'),COLORYELLOW;}
IF tcl>=tch THEN BEGIN
PARTLINE(BARPOS>K1,P1*1.042),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.042,' 15° '+NUMTOSTR(P1*1.042,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.083),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.083,' 30° '+NUMTOSTR(P1*1.083,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.125),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.125,' 45° '+NUMTOSTR(P1*1.125,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.167),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.167,' 60° '+NUMTOSTR(P1*1.167,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.208),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.208,' 75° '+NUMTOSTR(P1*1.208,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.25),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.25,' 90° '+NUMTOSTR(P1*1.25,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.292),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.292,' 105° '+NUMTOSTR(P1*1.292,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.33),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.33,' 120° '+NUMTOSTR(P1*1.33,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.375),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.375,' 135° '+NUMTOSTR(P1*1.375,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.417),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.417,' 150° '+NUMTOSTR(P1*1.417,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.458),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.458,' 165° '+NUMTOSTR(P1*1.458,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.5),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.5,' 180° '+NUMTOSTR(P1*1.5,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.542),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.542,' 195° '+NUMTOSTR(P1*1.542,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.583),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.583,' 210° '+NUMTOSTR(P1*1.583,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.625),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.625,' 225° '+NUMTOSTR(P1*1.625,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.667),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.667,' 240° '+NUMTOSTR(P1*1.667,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.708),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.708,' 255° '+NUMTOSTR(P1*1.708,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.75),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.75,' 270° '+NUMTOSTR(P1*1.75,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.792),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.792,' 285° '+NUMTOSTR(P1*1.792,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.833),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.833,' 300° '+NUMTOSTR(P1*1.833,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.875),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.875,' 315° '+NUMTOSTR(P1*1.875,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.917),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.917,' 330° '+NUMTOSTR(P1*1.917,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*1.958),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*1.958,' 345° '+NUMTOSTR(P1*1.958,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1*2),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1*2,' 360° '+NUMTOSTR(P1*2,3)),COLORYELLOW;
END;
{ELSE BEGIN}
IF tcl<tch THEN BEGIN
PARTLINE(BARPOS>K1,P1-P1*0.042),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.042,' 15° '+NUMTOSTR(P1-P1*0.042,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.083),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.083,' 30° '+NUMTOSTR(P1-P1*0.083,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.125),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.125,' 45° '+NUMTOSTR(P1-P1*0.125,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.167),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.167,' 60° '+NUMTOSTR(P1-P1*0.167,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.208),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.208,' 75° '+NUMTOSTR(P1-P1*0.208,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.25),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.25,' 90° '+NUMTOSTR(P1-P1*0.25,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.292),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.292,' 105° '+NUMTOSTR(P1-P1*0.292,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.33),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.33,' 120° '+NUMTOSTR(P1-P1*0.33,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.375),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.375,' 135° '+NUMTOSTR(P1-P1*0.375,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.417),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.417,' 150° '+NUMTOSTR(P1-P1*0.417,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.458),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.458,' 165° '+NUMTOSTR(P1-P1*0.458,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.5),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.5,' 180° '+NUMTOSTR(P1-P1*0.5,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.542),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.542,' 195° '+NUMTOSTR(P1-P1*0.542,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.583),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.583,' 210° '+NUMTOSTR(P1-P1*0.583,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.625),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.625,' 225° '+NUMTOSTR(P1-P1*0.625,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.667),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.667,' 240° '+NUMTOSTR(P1-P1*0.667,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.708),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.708,' 255° '+NUMTOSTR(P1-P1*0.708,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.75),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.75,' 270° '+NUMTOSTR(P1-P1*0.75,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.792),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.792,' 285° '+NUMTOSTR(P1-P1*0.792,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.833),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.833,' 300° '+NUMTOSTR(P1-P1*0.833,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.875),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.875,' 315° '+NUMTOSTR(P1-P1*0.875,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.917),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.917,' 330° '+NUMTOSTR(P1-P1*0.917,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1*0.958),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1*0.958,' 345° '+NUMTOSTR(P1-P1*0.958,3)),COLORYELLOW;
PARTLINE(BARPOS>K1,P1-P1),COLOR00CCFF,LINEDOT;
DRAWTEXT(BARPOS=K1,P1-P1,' 360° '+NUMTOSTR(P1-P1,3)),COLORYELLOW;
END;
bh:=BARSLAST(z=2);
ba:=IF(bL[p]<bh[p],1,2);
Wa:=BARSSINCE(ss=1)+1;
Wb:=BARSSINCE(ss=2)+1;
Wc:=BARSSINCE(ss=3)+1;
Wd:=BARSSINCE(ss=4)+1;
We: |