多空:=1;第一点:=9;第二点:=8;
K1:=IF(多空=1,TROUGHBARS(2,1,1),PEAKBARS(1,1,1));
F1:=IF(多空=1,PEAKBARS(1,1,1),TROUGHBARS(2,1,1));
K2:=BacKSET(ISLASTBAR,SUMBARS(K1=0,第一点));
F2:=BACKSET(ISLASTBAR,SUMBARS(F1=0,第二点));
P1:=IF(K2>0,1,-1);
P2:=IF(F2>0,1,-1);
PK1:=crOSS(P1,0);
PK2:=CROSS(P2,0);
KTONOW1:=BArslAST(PK1)=0;
KTONOW2:=BARSLAST(PK2);
STICKLINE(PK1,HHV(H,240),LLV(L,240),0,0),COLORF08080;
STICKLINE(PK2,HHV(H,240),LLV(L,240),0,0),COLOR80F080;
HE:=IF(多空=1,CONST(REF(H,KTONOW2)),CONST(REF(H,KTONOW1)));
LE:=IF(多空=1,CONST(REF(L,KTONOW1)),CONST(REF(L,KTONOW2)));
LL:=HE-LE;
STICKLINE(REF(P2,1)>0 AND 多空=1,LE+LL*0.236,LE+LL*0.236,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=1,LE+LL*0.382,LE+LL*0.382,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=1,LE+LL*0.5,LE+LL*0.5,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=1,LE+LL*0.618,LE+LL*0.618,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=1,LE+LL*0.764,LE+LL*0.764,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=1,HE,HE,1,0),COLORRED;
DRAWLINE(PK1 AND 多空=1,L,PK2,H,1),COLORWHITE;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE+LL*0.191,1),COLOR808080;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE+LL*0.382,1),COLOR808080;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE+LL*0.5,1),COLOR808080;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE-LL*0.191,1),COLOR808080;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE-LL*0.382,1),COLOR808080;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE-LL*0.5,1),COLOR808080;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE-LL*0.618,1),COLOR808080;
DRAWLINE(PK1 AND 多空=1,L,PK2 AND 多空=1,HE-LL*0.809,1),COLOR808080;
STICKLINE(REF(P2,1)>0 AND 多空=0,HE-LL*0.236,HE-LL*0.236,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=0,HE-LL*0.382,HE-LL*0.382,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=0,HE-LL*0.5,HE-LL*0.5,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=0,HE-LL*0.618,HE-LL*0.618,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=0,HE-LL*0.764,HE-LL*0.764,1,0),COLOR808000;
STICKLINE(REF(P2,1)>0 AND 多空=0,LE,LE,1,0),COLORRED;
DRAWLINE(PK1 AND 多空=0,H,PK2 AND 多空=0,L,1),COLORWHITE;
DRAWLINE(PK1 AND 多空=0,H,PK2 AND 多空=0,(HE-LL*0.191),1),COLOR808080;
DRAWLINE(PK1 AND 多空=0,H,PK2 AND 多空=0,(HE-LL*0.382),1),COLOR808080;
DRAWLINE(PK1 AND 多空=0,H,PK2 AND 多空=0,(HE-LL*0.5),1),COLOR808080;
DRAWLINE(PK1 AND 多空=0,H,PK2 AND 多空=0,(HE-LL*0.618),1),COLOR808080;
DRAWLINE(PK1 AND 多空=0,H,PK2 AND 多空=0,(HE-LL*0.809),1),COLOR808080;
KO:=CLOSE;
KC:=REF(CLOSE,1);
STICKLINE(KO>KC,OPEN,LOW,0,0 ),COLOR2828FF;
STICKLINE(KO>KC,CLOSE,HIGH,0,0 ),COLOR2828FF;
STICKLINE(KO<=KC,CLOSE,LOW,0,0 ),COLORFFFF22;
STICKLINE(KO<=KC,OPEN,HIGH,0,0 ),COLORFFFF22;
STICKLINE(KO<=KC ,CLOSE ,OPEN,3,0 ),COLORCC6600;
STICKLINE(KO<=KC ,CLOSE ,OPEN,1,0 ),COLORFFFF11;
STICKLINE(KO>KC,CLOSE,OPEN,3,0 ),COLOR000099;
STICKLINE(KO>KC,CLOSE,OPEN,1,0 ),COLOR2828FF;
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)