1、周日KDJ同图 主图 {周日KDJ同图 主图 源码} M:=((3*C+L+O+H)/6),COLORGREEN,NODRAW; 周O1:=IF(WEEKDAY<REF(WEEKDAY,1),O,DRAWNULL); 周O:HHV(周O1,WEEKDAY),LINETHICK0; 周H:HHV(H,WEEKDAY),LINETHICK0; 周L:LLV(L,WEEKDAY),LINETHICK0; MC:=C#MONTH,LINETHICK0; MO1:=IF(DAY<REF(DAY,1),O,DRAWNULL); MO:=HHV(MO1,DAY),LINETHICK0; A:=DAY<REF(DAY,1); B:=BARSLAST(A)+1; MH:=HHV(H,B),LINETHICK0; ML:=LLV(L,B),LINETHICK0; 日C:C#WEEK,COLORFFFF38,NODRAW; STICKLINE(MC>=MO,MO,MC,4,0),COLOR5CA8FD; STICKLINE(MC<MO,MO,MC,4,0),COLOR008B00; STICKLINE(日C>=周O,周O,日C,4,0),COLOR003399; STICKLINE(日C<周O,周O,日C,4,0),COLOR9F3333; DRAWKLINE(H,O,L,C); 生命点:EMA(C,24),COLOR00FF00,CIRCLEDOT; 今日阻力:L+(M-L)+(C-L),LINETHICK0; 今日支撑:L+(C-M),LINETHICK0; NNN:=IF(PERIOD=5,240,IF(PERIOD=6,48,IF(PERIOD=4,240*4,IF(PERIOD=7,12,1)))); 周:MA(C,NNN/48),COLORFF58FF,LINETHICK1; 月:MA(C,NNN/12),COLOR00FFFF,LINETHICK2; 季:MA(C,NNN/4),COLOR00FF00,LINETHICK1; 半年:MA(C,NNN/2),COLORFFFF00,LINETHICK1; 年:MA(C,NNN),COLOR1683FF,LINETHICK2; 2、吸筹主力 {吸筹主力指标} DRAWRECTREL(0,5,1000,1,RGB(200,300,500)); DRAWRECTREL(0,202,1000,195,RGB(0,50,50)); DRAWRECTREL(0,498,1000,495,RGB(100,500,300)); DRAWRECTREL(0,808,1000,800,RGB(00,50,50)); DRAWRECTREL(0,1000,1000,995,RGB(200,300,500)); DRAWTEXT_FIX(ISLASTBAR=1,0.01,0,0,STKNAME),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR=1,0.09,0,0,CODE),COLORWHITE; N:=100000; 历史最高价:=HHV(H,0),COLORRED; A:=历史最高价; 建仓百分之:=(A-C)/A*100*1,COLORWHITE; 分仓后每份资金:=N,COLORMAGENTA; 本份资金应买额:=(N*(A-C)/A)*1,COLORGREEN; 本份资金应买股:=INTPART((本份资金应买额/C)/100)*100,COLORYELLOW; 仓位比例:=INTPART(EMA(建仓百分之,15)/2.5)*2.5,COLORRED,LINETHICK3; 持仓比例:=STRCAT(STRCAT('仓位比例: ',CON2STR(仓位比例,2)),'%'); DRAWTEXT_FIX(ISLASTBAR,0.2,0.001,0,持仓比例),COLORWHITE; {黄金分割 普通 等系坐标} DRAWRECTREL(990,2,998,188,RGB(0,150,180)),NOFRAME; DRAWRECTREL(990,188,998,375,RGB(200,200,0)),NOFRAME; DRAWRECTREL(990,375,998,491,RGB(100,200,0)),NOFRAME; DRAWRECTREL(990,491,998,607,RGB(200,10,80)),NOFRAME; DRAWRECTREL(990,607,998,794,RGB(150,0,0)),NOFRAME; DRAWRECTREL(990,794,998,982,RGB(150,150,150)),NOFRAME; VAR1:=REF(LOW,1); VAR2:=SMA(ABS(LOW-VAR1),3,1)/SMA(MAX(LOW-VAR1,0),3,1)*100; VAR3:=EMA(IF(CLOSE*1.2,VAR2*10,VAR2/10),3); VAR4:=LLV(LOW,38); VAR5:=HHV(VAR3,38); VAR6:=IF(LLV(LOW,90),1,0); VAR7:=EMA(IF(LOW<=VAR4,(VAR3+VAR5*2)/2,0),3)/618*VAR6; VAR8:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100; VAR9:=SMA(VAR8,13,8); 底线:0,COLOR00FFFF; 主力吸货:VAR7,COLOR0000FF; 吸筹1:STICKLINE(VAR7,0,VAR7,6,0),COLOR0000FF; 吸筹2:STICKLINE(VAR7,0,VAR7,5,0),COLOR6600FF; 吸筹3:STICKLINE(VAR7,0,VAR7,4,0),COLORBB00FF; 吸筹4:STICKLINE(VAR7,0,VAR7,3,0),COLORFF00FF; 吸筹5:STICKLINE(VAR7,0,VAR7,2,0),COLORFF33FF; 吸筹6:STICKLINE(VAR7,0,VAR7,1,0),COLORFF66FF; 吸筹7:STICKLINE(VAR7,0,VAR7,0,0),COLORFF99FF; 风险:CEILING(SMA(VAR9,13,8)),LINETHICK2,COLORGREEN; 涨跌:MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2* SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),LINETHICK2,COLORRED; {股民学院 www.58188.com 整理} 3、新筹码主图叠加 {新筹码主图叠加} DA1:=IF(130>TOTALBARSCOUNT,TOTALBARSCOUNT,130); DA:=IF(CURRBARSCOUNT>DA1,0,DA1); HI:=REFDATE(HHV(H,DA),DATE); LO:=REFDATE(LLV(L,DA),DATE); C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL); GZ:=EXP(LN(HI/LO)/10); LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA); LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA); LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA); LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA); LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA); LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA); LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA); LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA); LH9:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),V,0),DA); LH10:=SUM(IF(C1>=LO AND C1<LO*GZ,V,0),DA); L1:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0; L2:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0; L3:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0; L4:=REFDATE(HHV(LH4,DA),DATE); L5:=REFDATE(HHV(LH5,DA),DATE); L6:=REFDATE(HHV(LH6,DA),DATE); L7:=REFDATE(HHV(LH7,DA),DATE); L8:=REFDATE(HHV(LH8,DA),DATE); L9:=REFDATE(HHV(LH9,DA),DATE); L10:=REFDATE(HHV(LH10,DA),DATE); SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10); STICKLINE(CEILING(DA*L1/SS)*3>=CURRBARSCOUNT,HI*99/100,HI/GZ,9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L2/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,1)*99/100,HI/POW(GZ,2),9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L3/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*99/100,HI/POW(GZ,3),9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L4/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,3)*99/100,HI/POW(GZ,4),9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L5/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,4)*99/100,HI/POW(GZ,5),9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L6/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*99/100,HI/POW(GZ,6),9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L7/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,6)*99/100,HI/POW(GZ,7),9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L8/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*99/100,9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L9/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*99/100,9,0)COLOR3C3C3A,LINETHICK3; STICKLINE(CEILING(DA*L10/SS)*3>=CURRBARSCOUNT,LO,LO*POW(GZ,1)*99/100,9,0)COLOR3C3C3A,LINETHICK3; DRAWKLINE(H,O,L,C); N:=20; N1:=7; N2:=69; T1:=IF((DATE<=1341231),1,0); M3:=EMA(CLOSE,3); M8:EMA(CLOSE,8),COLOR008000; M13:EMA(M8,13),COLOR0000FF; M62:EMA(M8,55),COLORF0F000; VAR1:=EMA(M13,62); M81:EMA(M62,81),COLOR00FFFF; M144:EMA(VAR1,144),LINETHICK2,COLORGREEN; M250:EMA(VAR1,250),POINTDOT,LINETHICK2,COLORF00FF0; VAR2:=(CLOSE+HIGH+LOW)/(3); VAR3:=(EMA(VAR2,10))*(T1); VAR4:=(REF(VAR3,1))*(T1); STICKLINE((VAR3>VAR4),VAR3,VAR4,4,0),COLOR00FFFF; STICKLINE((VAR3<VAR4),VAR3,VAR4,4,0),COLORFF0000; VAR5:=((REF(HIGH,1)+REF(LOW,1))/(2))*(T1); VAR6:=MA(CLOSE,N)+((2)*(STD(CLOSE,N)))*(T1); DRAWTEXT(CROSS(VAR3,VAR4),(VAR3)*(0.98),'↑买'),COLORFFFFFF ; DRAWTEXT(CROSS(VAR5,VAR6),(HIGH)*(1.04),'↓卖'),COLOR008000; VAR7:=REF(CLOSE,1); VAR8:=((SMA(MAX(CLOSE-VAR7,0),N1,1))/(SMA(ABS(CLOSE-VAR7),N1,1)))*(100); VAR9:=CROSS(N2,VAR8); VARA:=(FILTER(VAR9,4))*(T1); DRAWTEXT(VARA,(HIGH)*(1.04),'↓卖'),COLORFFFFFF; VARB:=((2)*(CLOSE)+HIGH+LOW)/(4); VARC:=LLV(LOW,34); VARD:=HHV(HIGH,34); VARE:=(EMA(((VARB-VAR1)/(VAR5-VAR1))*(100),7))*(T1); VARF:=(EMA((0.667)*(REF(VARE,1))+(0.333)*(VARE),5))*(T1); DRAWTEXT(IF(((COUNT((CLOSE<REF(CLOSE,1)),8))/(8)>0.6) AND (VOL>=(1.5)*(MA(VOL,5))) AND COUNT((VARE>=VARF),3) AND (REF(LOW,1)=LLV(LOW,120)),1,0),LOW,'●买进'),COLORFF00FF; DRAWTEXT(IF(((COUNT((CLOSE<REF(CLOSE,1)),13))/(13)>0.6) AND COUNT((VARE>VARF),6) AND (REF(LOW,5)=LLV(LOW,120)) AND REF((CLOSE>=OPEN),4) AND REF((CLOSE>OPEN),3) AND REF((CLOSE>OPEN),2) AND REF((OPEN>CLOSE),1) AND (OPEN>REF(CLOSE,1)),1,0),LOW,'●买进'),COLOR00FFFF; VAR10:=(MA(CLOSE,80)-(MA(CLOSE,10))/(3))*(T1); DRAWTEXT(IF((CLOSE<VAR10) AND ((VOL)/(240)>(MA(VOL,5))/(240)) AND (CLOSE>(REF(CLOSE,1))*(1.08)) AND (CLOSE<(MA(CLOSE,13))*(1.3)),1,0),LOW,'●抄底'),COLOR0000FF; |