主图
DRAWGBK(O>C,RGB(50,25,0),RGB(0,25,50),0,0,0);
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
Z4:DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.001,0.050,0,GNBLOCK),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,0.002,0.1,0,ZDBLOCK);
LHB:SIGNALS_USER(4,1);
DRAWTEXT(LHB,H,'龙虎'),COLORWHITE;
AHC1:=CLOSE*VOL;
AHC2:=EMA((EXPMA(AHC1,3)/EXPMA(VOL,3)+EXPMA(AHC1,6)/EXPMA(VOL,6)+EXPMA(AHC1,12)/EXPMA(VOL,12)+EXPMA(AHC1,24)/EXPMA(VOL,24))/4,13),COLORYELLOW;
ZT:=REF(C,1)*1.1-C<0.01 AND H=C;
顶:=1.3*AHC2;
内上:=1.06*AHC2;
内下:=AHC2*0.94;
底:=AHC2*0.87,DOTLINE,COLORGREEN;
IF((内上 <= REF(内上,1)),内上,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK2;
IF((内上 >= REF(内上,1)),内上,DRAWNULL),COLORMAGENTA,DOTLINE,LINETHICK2;
IF((内下 <= REF(内下,1)),内下,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK2;
IF((内下 >= REF(内下,1)),内下,DRAWNULL),COLORMAGENTA,DOTLINE,LINETHICK2;
爆:=REF(O<内上,1) AND C>内上 AND O>内上;
牛股:=C>内上 AND O>内上;
AR:=BARSLAST(牛股);
DRAWKLINE(H,O,L,C);
STICKLINE( 牛股 AND C>O,C,O,3.2,0),COLOR000066;
STICKLINE(牛股 AND C>O,C,O,2.0,0),COLOR000077;
STICKLINE(牛股 AND C>O,C,O,1.5,0),COLOR000099;
STICKLINE(牛股 AND C>O,C,O,0.9,0),COLOR0000CC;
STICKLINE(牛股 AND C>O,C,O,0.5,0),COLOR0000FF;
STICKLINE(牛股 AND C>O,O,C,0,0),COLORFFFFFF;
STICKLINE( 牛股 AND C<O,L,H,0,0),COLOR009900;
STICKLINE( 牛股 AND C<O,C,O,3.2,0),COLOR009900;
STICKLINE( 牛股 AND C<O,C,O,2.5,0),COLOR00BB00;
STICKLINE(牛股 AND C<O,C,O,1.5,0),COLOR00DD00;
STICKLINE(牛股 AND C<O,C,O,0.5,0),COLOR00FF00;
STICKLINE(牛股 AND C<O,C,O,0,0),COLORFFFFFF;
LC:=REF(CLOSE,1);
操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;
操作线1:=SMA(MAX(CLOSE-LC,0),20,1)/SMA(ABS(CLOSE-LC),20,1)*100;
潜伏:=操作线<10 AND 内上>=REF(内上,1);
DRAWICON(潜伏,L*0.98,34);
副图1
DRAWGBK(OPEN>0,RGB(0,0,250),RGB(0,0,0),0,'02',0);
DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
MACD:=(DIFF-DEA)*2;
A1:BARSLAST(DIFF<REF(DIFF,1)),COLORYELLOW,LINETHICK1;
A11:A1*-1,COLOR00FFFF,LINETHICK1;
A2:BARSLAST(DEA<REF(DEA,1)),COLORRED,LINETHICK1;
A22:A2*-1,COLORRED,LINETHICK1;
DRAWBAND(A2,RGB(150,50,20),A1,RGB(150,100,150));
DRAWBAND(A22,RGB(150,100,150),A11, RGB(150,50,20));
STICKLINE(CROSS(DIFF,DEA) AND DIFF<0,A11,0,2,0),COLORRED;
STICKLINE(CROSS(DIFF,DEA) AND DIFF> 0,0,A1,2,0),COLORRED;
STICKLINE(CROSS(DEA,DIFF) AND DIFF<0,A11,0,2,0),COLORWHITE;
STICKLINE(CROSS(DEA,DIFF) AND DIFF> 0,0,A1,2,0),COLORWHITE;
MACD底背离:STICKLINE(REF(CLOSE, A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA),-25,25,0.00001,0),COLORYELLOW;
{STICKLINE(A1>0 AND A2>0,A2,A1,0.00001,0),COLORFFFFFF;
STICKLINE(A1>0 AND A2>0,A22,A11,0.00001,0),COLORFFFFFF:}
STICKLINE(A1>0 AND A2>0,0,A1,0.000001,0),COLORFF00FF;
STICKLINE(A1>0 AND A2>0,0,A1,0.00001,0),COLORGREEN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF<0,-5,'0'),COLORCYAN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF<0,-12,'0'),COLORCYAN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF>0,5,'0'),COLORGREEN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF>0,12,'0'),COLORGREEN;
DRAWTEXT(A2>A1 AND A22<A11 AND A1=0 AND A11=0,A2,'∈'),COLORGREEN;
DRAWTEXT(A2>A1 AND A22<A11 AND A1=0 AND A11=0,0,'∈'),COLORGREEN;
DRAWTEXT(A2>A1 AND A22<A11 AND A1=0 AND A11=0,A22,'∈'),COLORGREEN;
STICKLINE(CROSS(DIFF,DEA) AND DIFF<0,A11,0,2,0),COLORRED;
STICKLINE(CROSS(DIFF,DEA) AND DIFF> 0,0,A1,2,0),COLORRED;
STICKLINE(CROSS(DEA,DIFF) AND DIFF<0,A11,0,2,0),COLORYELLOW;
STICKLINE(CROSS(DEA,DIFF) AND DIFF> 0,0,A1,2,0),COLORYELLOW;
N:= 5;M1:=5;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,5,1);
D:=SMA(K,M1,5);
J:=3*K-2*D;
VARB2:=(RSV/2+22)*1;
量:=EMA(VOL,13);
资金:= EMA(AMOUNT,13);
过滤:=((资金/量) / 100);
提纯:(((CLOSE -过滤) /过滤) * 100);
黄金:=(提纯<0 AND ZXNH);
低买:=IF(黄金 AND RSV<VARB2-2,50,0);
卖:=IF(黄金 AND RSV>VARB2,80,120);
上涨分界:=25;
KDJ提前金叉: (CROSS(上涨分界,低买)),COLORFF00FF,NODRAW;
DRAWTEXT(KDJ提前金叉,0,'O'),COLORYELLOW;
DRAWTEXT(KDJ提前金叉,-2,'买'),COLORRED;
DRAWTEXT_FIX(C>O,0.01,0.9,0,'*'),COLORYELLOW;
AAA1:=STRCAT('----------------------当之前的"不带鱼身的单独鱼头"出现了鱼眼表示买入信号,后面的鱼头出现买的提示就介入;直到蓝色线柱消失时卖出;鱼尾中再次出现买的信号,可以再次加仓买入;反之不买,角度的边框越细越好--- 沪深总上涨家数: ',CON2STR(DYNAINFO(60),0));
AAA2:=STRCAT('沪深总下跌家数:',CON2STR(DYNAINFO(61),0));
DRAWTEXT_FIX(ISLASTBAR,0,0,0,AAA1),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0,0.06,0,AAA2),COLORGREEN;
25,COLORWHITE;
副图2
RSVA1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
RSVA2:=100*(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9));
VAR21:=SMA(RSVA2,9,1)+100;
VAR11:=SMA(RSVA1,3,1);
VAR51:=SMA(VAR11,3,1)+100;
顶底线:=VAR51-VAR21+50;
VAR2:=LLV(LOW,33);
VAR3:=HHV(HIGH,21);
VAR4:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*100,10)*-1+100;
趋势:=100-EMA(0.191*REF(VAR4,1)+0.809*VAR4,1);
STICKLINE(C,100,90,4,0),COLORFFCC33;
STICKLINE(C,90,80,4,0),COLORFF9933;
STICKLINE(顶底线>REF(顶底线,1),20,80,4,0),COLOR9999FF;
STICKLINE(顶底线<REF(顶底线,1),20,80,4,0),COLOR009966;
STICKLINE((趋势>REF(趋势,1) AND 顶底线<REF(顶底线,1)),20,80,4,0),COLOR9999FF;
STICKLINE((趋势<REF(趋势,1) AND 顶底线>REF(顶底线,1)),20,80,4,0),COLOR009966;
STICKLINE(C,20,10,4,0),COLORFF6633;
STICKLINE(C,10,0,4,0),COLORFF3333;
底线:10,COLORWHITE;
顶线:90,COLORWHITE;
趋势线:100-EMA(0.191*REF(VAR4,1)+0.809*VAR4,1),LINETHICK2,COLORBLUE;
当前安全度:100-EMA(0.191*REF(VAR4,1)+0.809*VAR4,1),CIRCLEDOT,LINETHICK2,COLORRED;
DRAWTEXT(CURRBARSCOUNT=6,5,'高安全区'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=6,15,'安全区'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=6,45,'绿区持币'),COLORFFC000;
DRAWTEXT(CURRBARSCOUNT=6,50,'(投资区)'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=6,55,'粉区持股'),COLORFFC000;
DRAWTEXT(CURRBARSCOUNT=6,85,'风险区'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=6,95,'高风险区'),COLORWHITE;
{强拉升}
Y1:=LLV(L,17);
Y2:=SMA(ABS(L-REF(L,1)),17,1);
Y3:=SMA(MAX(L-REF(L,1),0),17,2);
Q:=-(EMA(IF(L<=Y1,Y2/Y3,-3),1));
STICKLINE(CROSS(Q,0),15,0,4,0), , COLORYELLOW;
强拉升: IF(CROSS(Q,0),1,0),COLORYELLOW;
Q1:= (CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100, , COLOR00FF00,LINETHICK2;
STICKLINE(CROSS(Q1,-24),20,0,4,0), , COLORMAGENTA;
加强拉升: IF(CROSS(Q1,-24),1,0),COLORMAGENTA;
VAR22:=EXPMA(EXPMA(EXPMA((2*CLOSE+HIGH+LOW)/4,4),4),4);
天:=( MA((VAR22-REF(VAR22,1))/REF(VAR22,1)*100,2));
地:=( MA((VAR22-REF(VAR22,1))/REF(VAR22,1)*100,1));
STICKLINE(地>天 AND 地<0,10,0,1,0),COLORRED;
开始拉升:STICKLINE(地>天 AND 地<0,10,0,1,0)=1,COLORRED;
副图3 开源有未来TROUGHBARS
必买: REF(TROUGHBARS(3,15,1),1)=0 AND HIGH>LOW,COLORRED ,LINETHICK4;