編程思路破譯輸出INPUT:N(26,5,300),P(2,0.1,10) 當(dāng)滿足條件收陽線時,在最高價和最低價位置之間畫柱狀線,寬度為0.5,0不為0則畫空心柱.,COLOR0000FF,LAYER3 當(dāng)滿足條件收陽線時,在收盤價和開盤價位置之間畫柱狀線,寬度為8,0不為0則畫空心柱.,COLOR0022FF,LAYER6 當(dāng)滿足條件收陽線時,在收盤價和開盤價位置之間畫柱狀線,寬度為5,0不為0則畫空心柱.,COLOR0598DD,LAYER3 當(dāng)滿足條件開盤價>=收盤價時,在最高價和最低價位置之間畫柱狀線,寬度為0.5,0不為0則畫空心柱.,COLOR00FF00,LAYER3 當(dāng)滿足條件開盤價>=收盤價時,在收盤價和開盤價位置之間畫柱狀線,寬度為8,0不為0則畫空心柱.,COLOR00FF00,LAYER6 當(dāng)滿足條件開盤價>=收盤價時,在收盤價和開盤價位置之間畫柱狀線,寬度為5,0不為0則畫空心柱.,COLORFF0000,LAYER3 BBI賦值:(2*收盤價+最高價+最低價)/4 輸出MID : BBI的N日簡單移動平均 ,COLOR00FF00,DOTLINE 輸出UPPER: MID + P*BBI的N日估算標(biāo)準(zhǔn)差 ,COLOR0000FF,DOTLINE 輸出LOWER: MID - P*BBI的N日估算標(biāo)準(zhǔn)差 ,COLOR00FFFF,DOTLINE 輸出A:(8*BBI+7*1日前的BBI+6*2日前的BBI+5*3日前的BBI+4*4日前的BBI+3*5日前的BBI+2*6日前的BBI+1*7日前的BBI)/36,COLOR00FFFF,線寬為1 B賦值:3日前的A的5日平滑移動平均 CG賦值:(A-B) X賦值:上次DISPSTATUS=1距今天數(shù)+1 E賦值:LLVALL(X日內(nèi)最低價的最低值)*0.95 當(dāng)滿足條件CG>=0時,在E+(CG)*2和E位置之間畫柱狀線,寬度為12,0不為0則畫空心柱.,COLOR0000FF,LAYER3 當(dāng)滿足條件CG<0時,在E+(CG)*2和E位置之間畫柱狀線,寬度為12,0不為0則畫空心柱.,COLORFF9900,LAYER3 填充背景,LAYER0 FILLRGN(UPPER,MID,UPPER>MID AND CG>0 AND 收盤價的2日簡單移動平均> MID,自定色),LAYER5 FILLRGN(UPPER,LOWER,UPPER>LOWER ,自定色),LAYER7 AL賦值:A日內(nèi)CG的最低值 FL賦值:CG上穿AL的5日過濾 畫圖片,ALIGN1,VALIGN0,LAYER0 PARTLINE(UPPER ,UPPER AND CG>0 AND 收盤價的2日簡單移動平均> MID,自定色),線寬為3,LAYER0 PARTLINE(MID ,MID AND CG>0 AND 收盤價的2日簡單移動平均> MID,自定色),線寬為3,LAYER0 VERTLINE(1日前的BBI的20日指數(shù)移動平均上穿BBI的20日指數(shù)移動平均 AND CG>0 ,2),LAYER0,COLOR00FFFF PK賦值:0上穿CG AND CG<0 AND 收盤價的5日簡單移動平均>MID 當(dāng)滿足條件PK時,在LOWER*0.999位置書寫文字,LAYER3,ALIGN1,COLOR0000FF,線寬為2 當(dāng)滿足條件PK時,在LOWER*0.981位置書寫文字,LAYER0,ALIGN1,COLOR00FFFF,線寬為1 當(dāng)滿足條件PK時,在LOWER*0.963位置書寫文字,LAYER0,ALIGN1,COLOR00FFCC,線寬為1 當(dāng)滿足條件PK時,在LOWER*0.946位置書寫文字,LAYER0,ALIGN1,COLOR00FFAA,線寬為1 當(dāng)滿足條件PK時,在LOWER*0.929位置書寫文字,LAYER0,ALIGN1,COLOR00FF77,線寬為1 當(dāng)滿足條件PK時,在LOWER*0.912位置書寫文字,LAYER0,ALIGN1,COLOR00FF00,線寬為1 當(dāng)滿足條件收盤價>OPENANDCG>=0時,在最高價和最低價位置之間畫柱狀線,寬度為0.5,0不為0則畫空心柱.,COLOR0000FF 當(dāng)滿足條件開盤價>=CLOSEANDCG>=0時,在最高價和最低價位置之間畫柱狀線,寬度為0.5,0不為0則畫空心柱.,COLOR00FF00 當(dāng)滿足條件開盤價>=CLOSEANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為9,0不為0則畫空心柱.,COLOR006600 當(dāng)滿足條件開盤價>=CLOSEANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為7,0不為0則畫空心柱.,COLOR009900 當(dāng)滿足條件開盤價>=CLOSEANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為5,0不為0則畫空心柱.,COLOR00BB00 當(dāng)滿足條件開盤價>=CLOSEANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為3,0不為0則畫空心柱.,COLOR00DD00 當(dāng)滿足條件開盤價>=CLOSEANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為1,0不為0則畫空心柱.,COLOR00FF00 當(dāng)滿足條件收盤價>OPENANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為9,0不為0則畫空心柱. ,COLOR000466 當(dāng)滿足條件收盤價>OPENANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為7,0不為0則畫空心柱. ,COLOR000499 當(dāng)滿足條件收盤價>OPENANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為5,0不為0則畫空心柱. ,COLOR0003BB 當(dāng)滿足條件收盤價>OPENANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為3,0不為0則畫空心柱. ,COLOR0002DD 當(dāng)滿足條件收盤價>OPENANDCG>=0時,在收盤價和開盤價位置之間畫柱狀線,寬度為1,0不為0則畫空心柱. ,COLOR0001FF 程序源碼INPUT:N(26,5,300),P(2,0.1,10); STICKLINE(OPEN<CLOSE ,H ,L,0.5,0 ),COLOR0000FF,LAYER3; STICKLINE(OPEN<CLOSE ,CLOSE ,OPEN,8,0 ),COLOR0022FF,LAYER6; STICKLINE(OPEN<CLOSE ,CLOSE ,OPEN,5,0 ),COLOR0598DD,LAYER3; STICKLINE(OPEN>=CLOSE ,H ,L,0.5,0 ),COLOR00FF00,LAYER3; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR00FF00,LAYER6; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORFF0000,LAYER3; {1.BBI} BBI:=(2*C+H+L)/4; {2.BOLL} MID : MA(BBI,N) ,COLOR00FF00,DOTLINE; UPPER: MID + P*STD(BBI,N) ,COLOR0000FF,DOTLINE; LOWER: MID - P*STD(BBI,N) ,COLOR00FFFF,DOTLINE; {3.持股} A:(8*BBI+7*REF(BBI,1)+6*REF(BBI,2)+5*REF(BBI,3)+4*REF(BBI,4)+3*REF(BBI,5)+2*REF(BBI,6) +1*REF(BBI,7))/36,COLOR00FFFF,LINETHICK1; B:=REF(MEMA(A,5),3); CG:=(A-B); X:=BARSLAST(DISPSTATUS=1)+1; E:=LLVALL(LLV(L,X))*0.95; STICKLINE(CG>=0 ,E+(CG)*2,E,12,0),COLOR0000FF,LAYER3; STICKLINE(CG<0 ,E+(CG)*2,E,12,0),COLORFF9900,LAYER3; DRAWGBK(CG>0 ,STRIP(RGB(0,0,255),RGB(140,0,100),0)),LAYER0; FILLRGN(UPPER,MID,UPPER>MID AND CG>0 AND MA(C,2)> MID,RGB(80,0,80)),LAYER5; FILLRGN(UPPER,LOWER,UPPER>LOWER ,RGB(0,80,0)),LAYER7; AL:=LLV(CG,A); FL:=FILTER(CROSS(CG,AL),5); DRAWBMP(FL AND CG<0 ,AL+E,'小牛.BMP'),ALIGN1,VALIGN0,LAYER0; {4.畫線} PARTLINE(UPPER ,UPPER AND CG>0 AND MA(C,2)> MID,RGB(255,120,0)),LINETHICK3,LAYER0; PARTLINE(MID ,MID AND CG>0 AND MA(C,2)> MID,RGB(0,255,0)),LINETHICK3,LAYER0; VERTLINE(CROSS(REF(EMA(BBI,20),1),EMA(BBI,20)) AND CG>0 ,2),LAYER0,COLOR00FFFF; {5.別坐過山車} PK:=CROSS(0,CG) AND CG<0 AND MA(C,5)>MID; DRAWTEXT(PK,LOWER*0.999,'●'),LAYER3,ALIGN1,COLOR0000FF,LINETHICK2; DRAWTEXT(PK,LOWER*0.981,'【別】'),LAYER0,ALIGN1,COLOR00FFFF,LINETHICK1; DRAWTEXT(PK,LOWER*0.963,'【坐】'),LAYER0,ALIGN1,COLOR00FFCC,LINETHICK1; DRAWTEXT(PK,LOWER*0.946,'【過】'),LAYER0,ALIGN1,COLOR00FFAA,LINETHICK1; DRAWTEXT(PK,LOWER*0.929,'【山】'),LAYER0,ALIGN1,COLOR00FF77,LINETHICK1; DRAWTEXT(PK,LOWER*0.912,'【車】'),LAYER0,ALIGN1,COLOR00FF00,LINETHICK1; {K線} STICKLINE(CLOSE>OPEN AND CG>=0,HIGH,LOW,0.5,0 ),COLOR0000FF; STICKLINE(OPEN>=CLOSE AND CG>=0,HIGH,LOW,0.5 ,0 ),COLOR00FF00; STICKLINE(OPEN>=CLOSE AND CG>=0 ,CLOSE ,OPEN,9,0 ),COLOR006600; STICKLINE(OPEN>=CLOSE AND CG>=0 ,CLOSE ,OPEN,7,0 ),COLOR009900; STICKLINE(OPEN>=CLOSE AND CG>=0 ,CLOSE ,OPEN,5,0 ),COLOR00BB00; STICKLINE(OPEN>=CLOSE AND CG>=0 ,CLOSE ,OPEN,3,0 ),COLOR00DD00; STICKLINE(OPEN>=CLOSE AND CG>=0 ,CLOSE ,OPEN,1,0 ),COLOR00FF00; STICKLINE(CLOSE>OPEN AND CG>=0,CLOSE,OPEN,9,0) ,COLOR000466; STICKLINE(CLOSE>OPEN AND CG>=0,CLOSE,OPEN,7,0) ,COLOR000499; STICKLINE(CLOSE>OPEN AND CG>=0,CLOSE,OPEN,5,0) ,COLOR0003BB; STICKLINE(CLOSE>OPEN AND CG>=0,CLOSE,OPEN,3,0) ,COLOR0002DD; STICKLINE(CLOSE>OPEN AND CG>=0,CLOSE,OPEN,1,0) ,COLOR0001FF; |
|