{黄金大底副图源码如下}
X_50:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
X_51:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
X_52:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
X_53:=(X_50+2*X_51+3*X_52)/6;
X_54:=MA(X_53,3);
X_55:=LLV(LOW,36);
X_56:=HHV(HIGH,30);
X_57:=EMA((CLOSE-X_55)/(X_56-X_55)*4,4)*25;
底背离:IF(X_54<-4 ,-11,0),COLORA67D3D,LINETHICK3;
顶背离:IF((X_57>90),110,100), COLORGREEN,LINETHICK3;
趋势:5*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)
-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),2,1),COLOR7F52AF;
趋势1:EMA(MA(趋势,5),3),COLORA6B8C1;
STICKLINE(趋势>=趋势1,趋势,趋势1,2,0),COLOR7F52AF;
STICKLINE(趋势<趋势1,趋势,趋势1,2,0),COLORA6B8C1;
STICKLINE(趋势>108 AND 趋势>=趋势1,趋势,108,2,0),COLORBLUE ;
STICKLINE(趋势1>108 AND 趋势<趋势1,趋势1,108,2,0),COLORWHITE;
STICKLINE(趋势<0 AND 趋势<趋势1,趋势,0,2,0),COLORF00FF0 ;
STICKLINE(趋势1<0 AND 趋势>趋势1,趋势1,0,2,0),COLORF0F000;
V1:=MA(C,5)=HHV(MA(C,5),20);
V2:=MA(C,5)>MA(C,20);
V3:=COUNT(MA(C,1)>REF(C,1),3)=3;
风险:IF(V1 AND V2 AND V3,30,0),STICK,COLOR00FF00;
V11:=MA(C,5)=HHV(MA(C,5),120);
V21:=MA(C,5)>MA(C,120);
V31:=COUNT(MA(C,1)>REF(C,1),3)=3;
风险1:IF(V11 AND V21 AND V31,60,0),STICK,COLORF0F000;
底部:5;
抄底:IF(CROSS(趋势,底部),60,0),STICK,COLORYELLOW,LINETHICK4;
DRAWTEXT(抄底,50,'抄底'),COLORRED;
天线:108,COLORFF9D00;
逃顶:IF(CROSS(天线,趋势),1,0),STICK,COLORFF9D00;
STICKLINE(CROSS(天线,趋势),90,108,6,0),COLORFF9D00;
A1:=((MA(C,60)-L)/MA(C,20)),COLOR00FFFF;
B1:=((MA(C,60)-L)/MA(C,60)),COLOR00FF00;
C1:=((MA(C,30)-L)/MA(C,30)),COLORFF00FF;
主力:(A1+B1+C1)/3,COLOR0000FF;
散户:-1*(A1+B1+C1)/3,COLOR00FF00;
TJ1:=CROSS(散户,主力);
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA54:=MA(CLOSE,54);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
热度:1/((MA5+MA10+MA20+MA30+MA60+MA120)/6/C)/10,COLORWHITE,DOTLINE;
BBT:热度-主力,NODRAW;
XS:=BBT<=0.02;
STICKLINE(BBT>=REF(BBT,1),主力,热度,0.01,0),COLORFF80FF;
STICKLINE(BBT<REF(BBT,1),主力,热度,0.01,0),COLORC08000;
DRAWICON(XS,主力,11);
{顺势擒牛主图源码如下 }
RA:=MAX(O,C);{RA}
RB:=MIN(O,C);{RB}
RC:=REF(L,1);
RD:=IF(RA>REF(H,1),IF(RB<=RC,0,1),IF(RB<=RC,-1,0));
RE:=BARSLAST(RD=-1);
RF:=REF(H,RE);
RG:=BARSLAST(RD=1);
RH:=REF(L,RG);
T1:=IF(RD=1,IF(L>RF,1,0),IF(RD=-1,IF(H<RH,-1,0),0));
T2:=BARSLAST(T1=0);
TH:=REF(REF(H,BARSLAST(T1=1)),T2);
TL:=REF(REF(L,BARSLAST(T1=-1)),T2);
TA:=IF(T1=1,IF(RA>TH,1,0),IF(T1=-1,IF(RB<TL,-1,0),0));
{只在特定走势内显示}
X:=CURRBARSCOUNT;
P1:=BARSLAST(TA=-1);
P2:=BARSSINCEN(CROSS(0.5,TA),P1)+1;
{临界水平线}
P3:=BARSLAST(CROSS(COUNT(CROSS(-0.5,RD),P1),0.5));
PAH:=REF(HHV(RA,P1),P3);
NOTEXT1:IF(X<CONST(P3)+1,PAH,DRAWNULL),DOTLINE,COLOR197800,LINETHICK2;{虚线}
NOTEXT2:IF(X<CONST(P2)+1,PAH,DRAWNULL),COLOR197800,LINETHICK2;{虚线};
DRAWICON(CROSS(C,NOTEXT1) OR CROSS(C,NOTEXT2),L*0.99,34);
VA1:=C / REF(C,1)>1.05 AND HIGH = CLOSE AND LOW < CLOSE ;
变色:STICKLINE(VA1,OPEN,CLOSE,3,0),COLORYELLOW;
六连缩:=BARSLAST(C/REF(C,1)>=1.0996)=6 AND NDAY(REF(V,4),V,5) AND C>MA(C,30) AND C>MA(C,60) AND C<25
AND C>MA(C,120) AND MA(C,30)>MA(C,60) AND (C-REF(C,4))/REF(C,4)*100<21
AND (C-REF(C,3))/REF(C,3)*100>-24 AND (HHV(O,3)/LLV(O,3)-1)*100<30 AND SUM(VOL/CAPITAL*100,3)<80 ;
DRAWICON(六连缩 AND C>MA(C,120) ,LOW*1.01,38);
DRAWTEXT(六连缩,L-0.35,'★六连缩'),COLORLIMAGENTA;
五连缩:=BARSLAST(C/REF(C,1)>=1.0996)=5 AND NDAY(REF(V,3),V,4) AND C>MA(C,30) AND C>MA(C,60) AND C<25
AND C>MA(C,120) AND MA(C,30)>MA(C,60) AND (C-REF(C,4))/REF(C,4)*100<21
AND (C-REF(C,3))/REF(C,3)*100>-24 AND (HHV(O,3)/LLV(O,3)-1)*100<30 AND SUM(VOL/CAPITAL*100,3)<80 ;
DRAWICON(五连缩 AND C>MA(C,120) ,LOW*1.01,38);
DRAWTEXT(五连缩,L-0.35,'★五连缩'),COLORLIMAGENTA;
四连缩:=BARSLAST(C/REF(C,1)>=1.0996)=4 AND NDAY(REF(V,2),V,3) AND C>MA(C,30) AND C>MA(C,60) AND C<25
AND C>MA(C,120) AND MA(C,30)>MA(C,60) AND (C-REF(C,4))/REF(C,4)*100<21
AND (C-REF(C,3))/REF(C,3)*100>-24 AND (HHV(O,3)/LLV(O,3)-1)*100<30 AND SUM(VOL/CAPITAL*100,3)<80 ;
DRAWICON(四连缩 AND C>MA(C,120) ,LOW*1.01,38);
DRAWTEXT(四连缩,L-0.35,'★四连缩'),COLORLIMAGENTA;
三连缩:=BARSLAST(C/REF(C,1)>=1.0996)=3 AND NDAY(REF(V,1),V,2) AND C<25 ;
DRAWICON(三连缩 AND MA(C,5)>MA(C,6) ,LOW*1.01,38);
DRAWTEXT(三连缩,L-0.05,'★三连缩'),COLORLIMAGENTA;
HHH:=CONST(HHV(H,100));
LLL:=CONST(LLV(L,100));
HH:=HHH-LLL;
TJ2:= CURRBARSCOUNT=58;
{需要显示下面6行文字,可以去掉前后的大括号}
{
DRAWTEXT(TJ2,LLL+HH*0.90,'百日低量处,倍量要涨停;凹口平量柱,确实猛如虎;');
DRAWTEXT(TJ2,LLL+HH*0.85,'倍量过左峰,涨停急先锋;凹口去淘金,报四三涨停;');
DRAWTEXT(TJ2,LLL+HH*0.80,'确定黄金柱,实盘擒牛股;回踩黄金线,腾飞不眨眼;');
DRAWTEXT(TJ2,LLL+HH*0.75,'接力黄金线,一步一重天;银谷黄金仓,涨停没商量;');
DRAWTEXT(TJ2,LLL+HH*0.70,'二次红波起,必有好戏看;长阴压短柱,攻势猛如虎;');
DRAWTEXT(TJ2,LLL+HH*0.65,'咬住峰顶线,伏击赚大钱;顶底若互换,牛股要逛奔。');
}
STICKLINE(CLOSE/REF(CLOSE,1)>=1.04 OR CLOSE/REF(CLOSE,1)<=0.96,(CLOSE+OPEN)/2,(CLOSE+OPEN)/2,2,1),COLORLIBLUE;
STICKLINE(CLOSE/REF(CLOSE,1)>=1.04 OR CLOSE/REF(CLOSE,1)<=0.96,(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))*2/3+MIN(OPEN,CLOSE),(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))*2/3+MIN(OPEN,CLOSE),2,1),COLORLIBLUE;
STICKLINE(CLOSE/REF(CLOSE,1)>=1.04 OR CLOSE/REF(CLOSE,1)<=0.96,(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))/3+MIN(OPEN,CLOSE),(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))/3+MIN(OPEN,CLOSE),2,1),COLORLIBLUE;
中分线:(OPEN+CLOSE)/2,NODRAW,COLORRED;
{21位画线}
FLAG:=ABS(C-O)/IF((H-L) = 0,100,H-L);
ZHANGF:=ABS(C-O)/O;
WEI21:IF(CODELIKE('9999'),(H-L)*0.5+L,IF(C>O,(C-O)*0.5+O,(O-C)*0.5+C)),NODRAW;
STICKLINE(ZHANGF>=0.03 && FLAG >= 0.03,WEI21,WEI21,-1,0),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0,1,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.05,1,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.1,1,0,GNBLOCK),COLORYELLOW;
AAA:=(3*C+H+L+O)/6;
VAR1:=WMA(AAA,8);
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
龙线:VAR1,COLORRED;
渊线:VAR6,COLORYELLOW;
龙跃于渊:IFF(龙线>渊线,龙线,DRAWNULL),NODRAW,COLORRED;
潜龙勿用:IFF(VAR1==VAR6,VAR6,DRAWNULL),COLORGREEN;
MA20:=EMA(CLOSE,20);
MA40:=EMA(CLOSE,40);
MA60:=EMA(C,60);
AA:=BARSLAST(MA40>MA60 AND (MA20==MA40 OR MA20>MA40));
BB:=REF(COUNT(C<MA60,AA)==AA,1);
CC:=CROSS(C,MA60) AND VOL>MA(VOL,5) AND (C-REF(C,1))/REF(C,1)*100>3;
顺势擒龙:IFF((BB AND CC),龙线,0),NODRAW,COLORYELLOW;
上线:=MAX(CLOSE,OPEN);
下线:=MIN(CLOSE,OPEN);
STICKLINE(顺势擒龙,H,L,0,0),COLORYELLOW;
STICKLINE(顺势擒龙,上线,下线,8,0),COLOR00FFFF;
STICKLINE(顺势擒龙,上线-0.10*ABS(上线-下线),下线+0.10*ABS(上线-下线),8,0),COLOR00DDFF;
STICKLINE(顺势擒龙,上线-0.15*ABS(上线-下线),下线+0.15*ABS(上线-下线),8,0),COLOR00BBFF;
STICKLINE(顺势擒龙,上线-0.20*ABS(上线-下线),下线+0.20*ABS(上线-下线),8,0),COLOR0099FF;
STICKLINE(顺势擒龙,上线-0.25*ABS(上线-下线),下线+0.25*ABS(上线-下线),8,0),COLOR0077FF;
STICKLINE(顺势擒龙,上线-0.30*ABS(上线-下线),下线+0.30*ABS(上线-下线),8,0),COLOR0055FF;
STICKLINE(顺势擒龙,上线-0.35*ABS(上线-下线),下线+0.35*ABS(上线-下线),8,0),COLOR0033FF;
STICKLINE(顺势擒龙,上线-0.40*ABS(上线-下线),下线+0.40*ABS(上线-下线),8,0),COLOR0022FF;
STICKLINE(顺势擒龙,上线-0.45*ABS(上线-下线),下线+0.45*ABS(上线-下线),8,0),COLOR0000FF;
{快慢线}
VARR1:=LLV(LOW,5);
VARR2:=HHV(HIGH,5);
K:= EMA((CLOSE-VARR1)/(VARR2-VARR1)*100,4),COLORGREEN,LINETHICK1;
D:= EMA(0.667*REF(K,1)+0.333*K,2),COLORRED,LINETHICK1;
{洗盘再买}
RSVV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;
VARB2:=(RSVV/2+22)*1;
量:=EMA(VOL,13);
资金:=EMA(AMOUNT,13);
过滤:=((资金 /量) / 100);
提纯:=(((CLOSE -过滤) / 过滤) * 100);
黄金:=((提纯 < (0)) AND ZXNH);
准备:=IF(黄金 AND RSVV<VARB2-2,10,0),COLORGREEN,NODRAW;
准备1:=REF(准备,1) OR REF(准备,2) OR REF(准备,3) OR 准备;
买:=CROSS(K,D) AND 准备1,COLORRED,NODRAW;
{建仓买点}
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
PDI:=((DMP * 100) / TR1);
MDI:=((DMM * 100) / TR1);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
最佳买入:=(AV + NEWVOL);
最佳买入选股:=IF(CROSS(最佳买入,0),1,0),STICK,COLORRED;
VARM1:=SMA(最佳买入选股,3,1);
VARM2:=SMA(VARM1,3,1),COLOR0000FF;
VARM3:=SMA(VARM2,3,1),COLOR00FFFF;
共振:=IF(CROSS(VARM2,VARM3) AND (VARM2<40),5,0*10000),COLORCYAN,NODRAW;
QTP:=DYNAINFO(17)>0;
T:=1;
XG:=CROSS(K,D) AND 准备1 AND QTP AND REF(龙线=渊线,1) AND 龙线>渊线 AND 龙线>REF(龙线,1);
DRAWTEXT_FIX(1,0.00,0.0,0,'【阴破两线变单线】是非常强烈的下跌信号,往往做空空间大开!注意:必须是一根阴线,同时跌破两线!跌破单线无效!【牢记:上行趋势线跌破必须卖出】'),COLOR00FFFF;
{K线解盘}
{资金突破}
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
Z1:=REF(HIGH,4)=HHV(HIGH,2*4+1);
Y1:=FILTER(Z1,3);
C1:=BACKSET(Y1,3+1);
D1:=FILTER(C1,3);
A2:=REF(LOW,3)=LLV(LOW,2*3+1);
V2:=FILTER(A2,3);
C2:=BACKSET(V2,3+1);
D2:=FILTER(C2,3);
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR=1 OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BARSLAST(H1),1)+1;
DRAWTEXT_FIX(CURRBARSCOUNT=60,0.4,0.01,0,''),COLORGREEN;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LDD:=I1>REF(I1,1);
L2:=LDD OR ISLASTBAR=1 OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HDD:=I2>REF(I2,1);
UU2:=BACKSET(ISLASTBAR=1,BARSLAST(HDD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HDD),1)+2);
XX2:=WW2>REF(WW2,1);
突破线:REF(H,BARSLAST(VV2));
持仓线:REF(H,BARSLAST(XX2));
TP1:=CROSS(C,突破线);
TP2:=CROSS(C,持仓线);
DRAWTEXT(TP1,LOW*0.98,'突破'),LINETHICK1,COLORYELLOW;
DRAWTEXT(TP2,LOW*0.98,'突破'),LINETHICK1,COLORYELLOW;
{炸板}
C22:=REF(C,1);
炸板1:=IF((H-C22)*100/C22>=(10-0.01*100/C22),1,0);
涨停10:=IF((C-C22)*100/C22>=(10-0.01*100/C22),1,0);
炸板2:=IF(炸板1 AND NOT(涨停10),H*1,DRAWNULL){,CIRCLEDOT,COLORFF00FF,LINETHICK1};
炸板:DRAWLINE(炸板2,H,REF(炸板2,1),REF(H,1),1),COLORFF00FF,LINETHICK1{,CIRCLEDOT};
DRAWTEXT(ISLASTBAR,炸板,'炸板'),COLORFF00FF;