1、四周期多彩MACD 四个周期分别是:30分钟MACD 60分钟MACD 日MACD 周MACD {四周期多彩MACD} {周MACD} DIF55:(EMA(CLOSE,30)-EMA(CLOSE,90))*0.55; DEA55:(EMA(DIF55,26)); MACD周:=(DIF55-DEA55)*2, COLORSTICK; DRAWBAND(DEA55,RGB(135,255,35),DIF55,RGB(240,160,0)); DRAWTEXT(CURRBARSCOUNT=1,DIF55,'--周MACD'),COLORRED; {日MACD} DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIFF,9); DRAWBAND(DIFF,RGB(255,80,120),DEA,RGB(21,138,255)); DRAWTEXT(CURRBARSCOUNT=1,DIFF,'--日MACD'),COLOR00FFFF; {60分MACD} DIF60:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2); DEA60:=EMA(DIF60,9/2); DRAWBAND(DIF60,RGB(120,20,255),DEA60,RGB(80,255,20)); DRAWTEXT(CURRBARSCOUNT=1,DIF60,'--60分钟MACD'),COLORFF00FF; {30分MACD} DIF30:=(EMA(CLOSE,12/4)-EMA(CLOSE,26/4)),COLORGREEN,LINETHICK2; DEA30:=(EMA(DIF30,9/4)),COLORMAGENTA,LINETHICK2; DRAWBAND(DIF30,RGB(220,50,50),DEA30,RGB(50,120,50)); DRAWTEXT(CURRBARSCOUNT=1,DIF30,'--30分钟MACD'),COLORGREEN; {日MACD柱} 0,COLORWHITE,DOTLINE; MACD:(DIFF-DEA)*2,COLORSTICK; STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORRED; STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1,1),COLOR4080FF; STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORYELLOW; STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORLIGREEN; 2、全息九宫格 {画全息九宫格横线,间隔为是0%} DRAWRECTREL(0,000,999,005,RGB(255,0,50)),NOFRAME; DRAWRECTREL(0,100,999,105,RGB(255,0,100)),NOFRAME; DRAWRECTREL(0,200,999,205,RGB(255,0,150)),NOFRAME; DRAWRECTREL(0,300,999,305,RGB(255,0,200)),NOFRAME; DRAWRECTREL(0,400,999,405,RGB(255,0,250)),NOFRAME; DRAWRECTREL(0,500,999,505,RGB(250,250,250)),NOFRAME; DRAWRECTREL(0,600,999,605,RGB(0,255,250)),NOFRAME; DRAWRECTREL(0,700,999,705,RGB(0,255,200)),NOFRAME; DRAWRECTREL(0,800,999,805,RGB(0,255,150)),NOFRAME; DRAWRECTREL(0,900,999,905,RGB(0,255,100)),NOFRAME; DRAWRECTREL(0,900,999,905,RGB(0,255,100)),NOFRAME; DRAWRECTREL(0,990,999,995,RGB(0,255,50)),NOFRAME; DRAWRECTREL(0,996,999,999,RGB(0,255,50)),NOFRAME; {画全息九宫格竖线,间隔为五天} QT1:=MOD(BARSLAST(BARSCOUNT(C)=5-1),5); QHH:=CONST(HHV(H,0));QLL:=CONST(LLV(L,0)); STICKLINE(QT1=0,QHH,QLL,0.01,0); T:=TOTALBARSCOUNT-CURRBARSCOUNT+1; T5:=MOD(T,5);TXT:=IF(T5=0,'5T',''); DRAWTEXT(T5=0 AND PERIOD=5,L*0.98,TXT); {画右侧空间距离色块,普通等系坐标,自下而上,颜色越深风险越大} DRAWRECTREL(990,0.1,1000,009,RGB(255,0,0)),NOFRAME; {6} DRAWRECTREL(990,1,1000,99,RGB(255,0,50)),NOFRAME; {5} DRAWRECTREL(990,100,1000,199,RGB(255,0,100)),NOFRAME; {4} DRAWRECTREL(990,200,1000,299,RGB(255,0,150)),NOFRAME; {3} DRAWRECTREL(990,300,1000,399,RGB(255,0,200)),NOFRAME; {2} DRAWRECTREL(990,400,1000,499,RGB(255,0,250)),NOFRAME; {1} DRAWRECTREL(990,500,1000,599,RGB(255,0,255)),NOFRAME; {0} DRAWRECTREL(990,600,1000,699,RGB(0,255,250)),NOFRAME; {1} DRAWRECTREL(990,700,1000,799,RGB(0,255,200)),NOFRAME; {2} DRAWRECTREL(990,800,1000,899,RGB(0,255,150)),NOFRAME; {3} DRAWRECTREL(990,900,1000,999,RGB(0,255,100)),NOFRAME; {4} DRAWRECTREL(990,999,1000,1001,RGB(0,255,50)),NOFRAME ; {5} DRAWRECTREL(990,999.9,1000,1099,RGB(0,255,0)),NOFRAME; {6}; {画左侧空间距离色块,普通等系坐标,自下而上,颜色越深风险越大} DRAWRECTREL(0,0.1,10,009,RGB(255,0,0)),NOFRAME; {6} DRAWRECTREL(0,1,10,99,RGB(255,0,50)),NOFRAME; {5} DRAWRECTREL(0,100,10,199,RGB(255,0,100)),NOFRAME; {4} DRAWRECTREL(0,200,10,299,RGB(255,0,150)),NOFRAME; {3} DRAWRECTREL(0,300,10,399,RGB(255,0,200)),NOFRAME; {2} DRAWRECTREL(0,400,10,499,RGB(255,0,250)),NOFRAME; {1} DRAWRECTREL(0,500,10,599,RGB(255,0,255)),NOFRAME; {0} DRAWRECTREL(0,600,10,699,RGB(0,255,250)),NOFRAME; {1} DRAWRECTREL(0,700,10,799,RGB(0,255,200)),NOFRAME; {2} DRAWRECTREL(0,800,10,899,RGB(0,255,150)),NOFRAME; {3} DRAWRECTREL(0,900,10,999,RGB(0,255,100)),NOFRAME; {4} DRAWRECTREL(0,999,10,1001,RGB(0,255,50)),NOFRAME ; {5} DRAWRECTREL(0,999.9,10,1099,RGB(0,255,0)),NOFRAME; {6}; {画九格等分坐标} 最高点:=REFDATE(CONST(REF(HHV(H,0),0)),DATE),LINETHICK1,COLORMAGENTA; 最低点:=REFDATE(CONST(REF(LLV(L,0),0)),DATE),LINETHICK1,COLORGREEN; 高低价差:=(最高点-最低点),DOTLINE; 区间1:=最高点-高低价差*0.90,DOTLINE; 区间2:=最高点-高低价差*0.80,DOTLINE; 区间3:=最高点-高低价差*0.70,DOTLINE; 区间4:=最高点-高低价差*0.60,DOTLINE; 区间5:=最高点-高低价差*0.50,DOTLINE; 区间6:=最高点-高低价差*0.40,DOTLINE; 区间7:=最高点-高低价差*0.30,DOTLINE; 区间8:=最高点-高低价差*0.20,DOTLINE; 区间9:=最高点-高低价差*0.10,DOTLINE; {用文字来描述空间位置,便于快速识别} DRAWTEXT(CURRBARSCOUNT=1,最低点,' 最低点位'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间1,' 低位一区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间2,' 低位二区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间3,' 低位三区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间4,' 中位四区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间5,' 中位五区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间6,' 中位六区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间7,' 高位七区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间8,' 高位八区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,区间9,' 高位九区'),COLORWHITE; DRAWTEXT(CURRBARSCOUNT=1,最高点,' 最高点位'),COLORWHITE; {重画K线} DRAWKLINE(HIGH,OPEN,LOW,CLOSE); WWW58188COM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); ZT:=C>REF(C,1)*1.090 AND C<REF(C,1)*1.105; DT:=C<REF(C,1)*0.901 AND C>REF(C,1)*0.898; STICKLINE(ZT,C,O,4,0),COLORRED; STICKLINE(DT,C,O,4,0),COLORGREEN; DRAWTEXT(ZT,L-0.1,'涨停'),COLORRED; DRAWTEXT(DT,H+0.3,'跌停'),COLORGREEN; STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW; {股民学院 www.58188.com 整理} 3、龙回头,二次尾买 {龙回头--主图指标} MA1:MA(CLOSE,5); MA2:MA(CLOSE,10); MA3:MA(CLOSE,20); MA4:MA(CLOSE,30); MA5:MA(CLOSE,60); 强势线:MA(C,25)+MA(C,25)*20/100,LINETHICK2,COLORRED; DM1:=C/REF(C,1)>1.09 AND C>=O; DM2:=REF(C,4)<REF(O,4) AND REF(C,4)/REF(C,5)<0.96 AND REF(C,2)/REF(C,3)<1.02 AND REF(C,1)/REF(C,2)<1.02; DM3:=MAX(REF(C,1),REF(O,1))/MIN(REF(C,1),REF(O,1))<1.036 AND MAX(REF(C,2),REF(O,2))/MIN(REF(C,2),REF(O,2))<1.036 AND MAX(REF(C,3),REF(O,3))/MIN(REF(C,3),REF(O,3))<1.036; DXGM:=COUNT(REF(DM1,1),10) AND DM2 AND DM3; AM1:=C/REF(C,1)>1.09 AND C>=O; AM2:=REF(C,3)<REF(O,3) AND REF(C,3)/REF(C,4)<0.96 AND REF(C,2)/REF(C,3)<1.02 AND REF(C,1)/REF(C,2)<1.02; AM3:=MAX(REF(C,1),REF(O,1))/MIN(REF(C,1),REF(O,1))<1.036 AND MAX(REF(C,2),REF(O,2))/MIN(REF(C,2),REF(O,2))<1.036; AXGM:=COUNT(REF(AM1,1),10) AND AM2 AND AM3; BM1:=C/REF(C,1)>1.09 AND C>=O; BM2:=REF(C,2)<REF(O,2) AND REF(C,2)/REF(C,3)<0.96; BM3:=MAX(REF(C,1),REF(O,1))/MIN(REF(C,1),REF(O,1))<1.05; BXGM:=COUNT(REF(BM1,1),10) AND BM2 AND BM3; CM1:=C/REF(C,1)>1.09 AND C>=O; CM2:=REF(C,1)<REF(O,1) AND REF(C,1)/REF(C,2)<0.96; CXGM:=COUNT(REF(CM1,1),10) AND CM2; SGX:=MA(C,25)+MA(C,25)*20/100; GYTJ1:=(BETWEEN(O/MA(C,10),1.02,0.99) OR BETWEEN(L/MA(C,10),1.04,0.99) OR (BETWEEN(L/SGX,1.01,0.995) AND SGX/MA(C,10)<1.08))AND C>MA(C,10) AND BETWEEN(C/REF(C,1),1.05,0.97) AND MA(C,5)>MA(C,10) AND MA(C,5)/MA(C,10)>1.01 AND H/MAX(C,O)<1.04 AND C>MA(C,120)AND MA(C,20)>MA(C,60) AND MA(C,20)>MA(C,120) AND REF(L,1)/REF(MA(C,10),1)>0.998; GYTJ2:=REF(C,1)<REF(MA(C,5),1) AND O<MA(C,5) AND MA(C,10)>MA(C,20) AND MA(C,20)>MA(C,30); ABXG:=(DXGM OR AXGM OR BXGM OR CXGM) AND GYTJ1 AND GYTJ2; DRAWICON(ABXG,L*0.98,11); DRAWTEXT(ABXG,L*0.94,'龙回头'),COLORWHITE; SCMXG:=COUNT(ABXG,5) AND CROSS(MA(C,10),MA(C,5)); DRAWICON(SCMXG,L*0.98,9); DRAWTEXT(SCMXG,L*0.94,'二次尾买'),COLORYELLOW; |