常用黃金分割位及標(biāo)示 {立體K線} {紅K} STICKLINE(C>O,C,O,8,0),COLOR000038; STICKLINE(C>O,C,O,7,0),COLOR000048; STICKLINE(C>O,C,O,6,0),COLOR000058; STICKLINE(C>O,C,O,5,0),COLOR000068; STICKLINE(C>O,C,O,4,0),COLOR000078; STICKLINE(C>O,C,O,3,0),COLOR000088; STICKLINE(C>O,C,O,2,0),COLOR000098; STICKLINE(C>O,C,O,1,0),COLOR0000A8; STICKLINE(C>O,H,L,0,0),COLOR0008A8; {綠K} STICKLINE(C<O,C,O,8,0),COLOR003800; STICKLINE(C<O,C,O,7,0),COLOR004800; STICKLINE(C<O,C,O,6,0),COLOR005800; STICKLINE(C<O,C,O,5,0),COLOR006800; STICKLINE(C<O,C,O,4,0),COLOR007800; STICKLINE(C<O,C,O,3,0),COLOR008800; STICKLINE(C<O,C,O,2,0),COLOR009800; STICKLINE(C<O,C,O,1,0),COLOR00A800; STICKLINE(C<O,H,L,0,0),COLOR00A800; {漲停跌停標(biāo)示} C3:=REF(C,1); 漲停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0) or ((STRCMP(STRLEFT(STKNAME,2),'ST')=0 or STRCMP( STRLEFT(STKNAME,3),'*ST')=0) and c>=INTPART(REF(c ,1 )*1.05*100+0.5)/100); STICKLINE(漲停,OPEN,CLOSE,2.0,0),color00D8D8; 跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0) or ((STRCMP(STRLEFT(STKNAME,2),'ST')=0 or STRCMP( STRLEFT(STKNAME,3),'*ST')=0) and (C3-C)*100/C3>=INTPART(REF(c ,1 )*1.05*100+0.5)/100); STICKLINE(跌停,OPEN,CLOSE,2.0,0),COLOR00EE00; {漲停跌停標(biāo)示} C3:=REF(C,1); 漲停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0) or ((STRCMP(STRLEFT(STKNAME,2),'ST')=0 or STRCMP( STRLEFT(STKNAME,3),'*ST')=0) and c>=INTPART(REF(c ,1 )*1.05*100+0.5)/100); STICKLINE(漲停,OPEN,CLOSE,2.0,0),color00D8D8; :=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0) or ((STRCMP(STRLEFT(STKNAME,2),'ST')=0 or STRCMP( STRLEFT(STKNAME,3),'*ST')=0) and (C3-C)*100/C3>=INTPART(REF(c ,1 )*1.05*100+0.5)/100); STICKLINE(跌停,OPEN,CLOSE,2.0,0),COLOR00EE00; {星} STICKLINE(C=O,C,O,8,0),COLOR888888; STICKLINE(C=O,H,L,0,0),COLOR888888; {黃金分割線} lhnh:=BARSLAST(DISPSTATUS=1)+1; nnl:=DISPSTATUS=2; Al:=BACKSET(nnl,hhvBARS(h,lhnh)+1); Bl:=Al>REF(Al,1); Al2:=BACKSET(nnl,LLVBARS(L,lhnh)+1); Bl2:=Al2>REF(Al2,1); 前高:REF(H,BARSLAST(bl)),PRECIS2,COLOR00A800,LINETHICK1; DRAWTEXT(nnl,前高*0.995,'前高:'+NUMTOSTRN(前高,2)),ALIGN2,COLOR00A800,PRECIS2; 前低:REF(L,BARSLAST(Bl2)),PRECIS2,COLOR580058,LINETHICK1; DRAWTEXT(nnl,前低*1.010,'前低: '+NUMTOSTRN(前低,2)),ALIGN2,COLOR380088,PRECIS2; Fl1:((前高-前低)*0.191)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl1,'191(809): '+NUMTOSTRN(Fl1,2)),ALIGN2,Color282828; Fl2:((前高-前低)*0.236)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl2,'236(764): '+NUMTOSTRN(Fl2,2)),ALIGN2,Color383838; Fl3:((前高-前低)*0.382)+前低,DOTLINE,Color003838,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl3,'382(618): '+NUMTOSTRN(Fl3,2)),ALIGN2,COLOR003838; Fl4:((前高-前低)*0.5)+前低,DOTLINE,COLOR383800,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl4,'0.50: '+NUMTOSTRN(Fl4,2)),ALIGN2,Color000058; Fl5:((前高-前低)*0.618)+前低,DOTLINE,Color003838,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl5,'618(382): '+NUMTOSTRN(Fl5,2)),ALIGN2,COLOR003838; Fl6:((前高-前低)*0.764)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl6,'764(236): '+NUMTOSTRN(Fl6,2)),ALIGN2,COLOR383838; Fl7:((前高-前低)*0.809)+前低,DOTLINE,Color282828,LINETHICK1,PRECIS2; DRAWTEXT(nnl,Fl7,'809(191): '+NUMTOSTRN(Fl7,2)),ALIGN2,COLOR282828; A:=BARSLAST(DISPSTATUS=1)+1; HH:=HHV(H,A); LL:=LLV(L,A); 上漲:=BARSSINCE(BACKSET(DISPSTATUS=2,BARSLAST(L=LL)+1)); ↑空間%:=(C/REF(L,上漲)-1)*100; 最高%:=(HHVALL(HH)/REF(L,上漲)-1)*100; 下跌:=BARSSINCE(BACKSET(DISPSTATUS=2,BARSLAST(H=HH)+1)); ↓空間%:=(C/REF(H,下跌)-1)*100; 最低%:=(LLVALL(LL)/REF(H,下跌)-1)*100; W:=BARSLAST(DISPSTATUS=1); 低漲:=(H/LLV(LOW,W)-1)*100; 高跌:=(L/HHV(HIGH,W)-1)*100; 天日:=BARSLAST(L=LLV(LOW,W)); 天:=BARSLAST(H=HHV(HIGH,W)); {以下設(shè)置提示文字部分} DRAWTEXTREL(280,15,'▲低點至今日高點上漲:'+NUMTOSTRN(低漲,2)+'% '+NUMTOSTRN(天日,0)+'天'),COLOR000088,linethick1; DRAWTEXTREL(128,15,'▼高點至今日低點下跌:'+NUMTOSTRN(高跌,2)+'% '+NUMTOSTRN(天,0)+'天'),COLOR005800,linethick1; DRAWTEXTREL(018,15,'★目前可見K線數(shù):'+NUMTOSTRN(W+1,0)+'根'),COLOR585858,linethick1; VERTLINE(上漲=0,2),COLOR380088,LAYER7; VERTLINE(下跌=0,2),COLOR005800,LAYER7; {DRAWTEXT(上漲=0,LLVALL(HH)*0.99,'-最高'),COLOR0000D8; DRAWTEXT(下跌=0,LLVALL(LL)*1.01,'-最低'),COLORD85800;} DRAWTEXT(上漲=0 AND 最高%>10,LL*1.1,'-10% '+NUMTOSTRN(LL*1.1,2)),COLOR008888; DRAWTEXT(上漲=0 AND 最高%>20,LL*1.2,'-20% '+NUMTOSTRN(LL*1.2,2)),COLOR005800; DRAWTEXT(上漲=0 AND 最高%>30,LL*1.3,'-30% '+NUMTOSTRN(LL*1.3,2)),COLOR380088; DRAWTEXT(上漲=0 AND 最高%>40,LL*1.4,'-40% '+NUMTOSTRN(LL*1.4,2)),COLOR585858; DRAWTEXT(上漲=0 AND 最高%>50,LL*1.5,'-50% '+NUMTOSTRN(LL*1.5,2)),COLOR580058; DRAWTEXT(上漲=0 AND 最高%>60,LL*1.6,'-60% '+NUMTOSTRN(LL*1.6,2)),COLOR585800; DRAWTEXT(上漲=0 AND 最高%>70,LL*1.7,'-70% '+NUMTOSTRN(LL*1.7,2)),COLOR005800; DRAWTEXT(上漲=0 AND 最高%>80,LL*1.8,'-80% '+NUMTOSTRN(LL*1.8,2)),COLOR005858; DRAWTEXT(上漲=0 AND 最高%>90,LL*1.9,'-90% '+NUMTOSTRN(LL*1.9,2)),COLOR000058; DRAWTEXT(上漲=0 AND 最高%>100,LL*2,'-100% '+NUMTOSTRN(LL*2.0,2)),COLOR380088; DRAWTEXT(上漲=0 AND 最高%>100,LL*2.25,'-125% '+NUMTOSTRN(LL*2.25,2)),COLOR383800; DRAWTEXT(上漲=0 AND 最高%>150,LL*2.5,'-150% '+NUMTOSTRN(LL*2.5,2)),COLOR585858; DRAWTEXT(上漲=0 AND 最高%>200,LL*3.0,'-200% '+NUMTOSTRN(LL*3.0,2)),COLOR580058; DRAWTEXT(上漲=0 AND 最高%>250,LL*3.5,'-250% '+NUMTOSTRN(LL*3.5,2)),COLOR585800; DRAWTEXT(下跌=0 AND 最低%<-10,HH*0.9,'-10% '+NUMTOSTRN(HH*0.9,2)),COLOR00A800; DRAWTEXT(下跌=0 AND 最低%<-20,HH*0.8,'-20% '+NUMTOSTRN(HH*0.8,2)),COLORA83800; DRAWTEXT(下跌=0 AND 最低%<-30,HH*0.7,'-30% '+NUMTOSTRN(HH*0.7,2)),COLOR008800; DRAWTEXT(下跌=0 AND 最低%<-40,HH*0.6,'-40% '+NUMTOSTRN(HH*0.6,2)),COLOR380088; DRAWTEXT(下跌=0 AND 最低%<-50,HH*0.5,'-50% '+NUMTOSTRN(HH*0.5,2)),COLOR005858; DRAWTEXT(下跌=0 AND 最低%<-60,HH*0.4,'-60% '+NUMTOSTRN(HH*0.4,2)),COLOR580058; DRAWTEXT(下跌=0 AND 最低%<-70,HH*0.3,'-70% '+NUMTOSTRN(HH*0.3,2)),COLOR008800; DRAWTEXT(下跌=0 AND 最低%<-80,HH*0.2,'-80% '+NUMTOSTRN(HH*0.2,2)),COLORA83800; DRAWTEXT(下跌=0 AND 最低%<-90,HH*0.1,'-90% '+NUMTOSTRN(HH*0.1,2)),COLOR000088; |
|