通达信ENE下轨黄底买入主图源码贴图
公式来源于论坛,回报论坛。非常感谢各位老师的辛勤指导和无私分享。
主要依据ENE轨道线的买入法则,加入虚拟涨停K线、黄金分割线等指标,
买入:股价在下轨,K线出现黄底,5分钟均线多头排序,为买入最佳时机。
卖出:股价上涨到上轨,K线出现蓝顶,5分钟均线空头排序,为卖出时机。
DRAWGBK(C>0, RGB(0,10,10),RGB(48,0,0),0,"11",0);
N:=13;
BC:=(H*0.382+L*0.618+O*0.382+C*0.618)/2;
LJ:=IF(INDEXC=C,BC,(BC+AMOUNT/(V*100))/2),COLORGRAY;
HT:=REF((HHV(LJ,N*0.691)+HHV(LJ,N)+HHV(LJ,N*1.309))/3,1),LINETHICK,COLORRED;
LT:=REF((LLV(LJ,N*0.691)+LLV(LJ,N)+LLV(LJ,N*1.309))/3,1),LINETHICK,COLORGREEN;
ZT:=(HT+LT)/2,LINETHICK,COLORYELLOW;
STICKLINE(ISLASTBAR=1 AND LJ<ZT,HT,LT,N*8,0),COLORBLUE;
STICKLINE(ISLASTBAR=1 AND LJ=ZT,HT,LT,N*8,0),COLORGRAY;
STICKLINE(ISLASTBAR=1 AND LJ>ZT,HT,LT,N*8,1),COLOR6600FF;
STICKLINE(ISLASTBAR=1,ZT,ZT,N*8,0),COLORYELLOW;
STICKLINE(OPEN>=CLOSE,HIGH,LOW,0,0),COLORFFCC00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF9F68;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.8,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.5,0),COLORFFAA11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2,0),COLORFFBB11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1,0),COLORFFCC22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.4,0),COLORFFDD22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.2,0),COLORFFEE33;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0,0),COLORFFFF33;
STICKLINE(CLOSE>OPEN,HIGH,LOW,0,0),COLORRED;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLORBROWN;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.8,0),COLOR3300CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.5,0),COLORBROWN;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),COLOR6633CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.6,0),COLOR3333FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.4,0),COLOR6633FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.2,0),COLOR3366FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.1,0),COLOR6666FF;
箱顶:HT,LINETHICK,COLORRED;
箱底:LT,LINETHICK,COLORGREEN;
箱中:ZT,LINETHICK,COLORYELLOW;
{虚拟涨停K线}
ZTKX:=IF(CURRBARSCOUNT=1,REF(CLOSE,1)*1.1,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1,ZTKX,MAX(OPEN,CLOSE),-2,-2),COLOR00C0C0;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
上轨:(1+11/100)*MA(CLOSE,10),COLORRED,LINETHICK2;
下轨:(1-9/100)*MA(CLOSE,10),COLORRED,LINETHICK2;
中轨:(上轨+下轨)/2,COLORRED,LINETHICK2;
生命线:EMA(((SLOPE(CLOSE,22) * 23) + CLOSE),50),LINETHICK2;
VACAR1:=(CLOSE+HIGH+LOW)/3;
VACAR2:=EMA(VACAR1,10);
VACAR3:=REF(VACAR2,1);
持股: IF(VACAR2>VACAR3,VACAR2,DRAWNULL),POINTDOT LINETHICK6, COLORYELLOW;
持币: IF(VACAR2<VACAR3,VACAR3,DRAWNULL),POINTDOT LINETHICK6, COLORBLUE;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORRED;
一0.809:REFDATE(H1,DATE),COLORFFFF00;
二0.618:REFDATE(H2,DATE),COLORMAGENTA;
三0.500:REFDATE(H3,DATE),COLORWHITE;
四0.382:REFDATE(H4,DATE),COLORGREEN;
五0.191:REFDATE(H5,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),COLORRED;
HJF1:=O<MA(C,5) AND C>MA(C,5) AND O<MA(C,10) AND C>MA(C,10) AND O<MA(C,20) AND C>MA(C,20) AND O<MA(C,120) AND C>MA(C,120);
HJF11:=O<MA(C,5) AND C>MA(C,5) AND O<MA(C,10) AND C>MA(C,10) AND O<MA(C,20) AND C>MA(C,20) AND O<MA(C,60)AND C>MA(C,60);
HJF2:=(O<低 AND C>低 AND 低/O<1.06) OR (O<五0.191 AND C>五0.191 AND 五0.191/O<1.06) OR (O<四0.382 AND C>四0.382 AND 四0.382/O<1.06);
HJF3:=C/REF(C,1)>1.04;
HFXG:=(HJF1 OR HJF11) AND HJF2 AND HJF3;
DRAWICON(HFXG,L*0.96,11);
DRAWTEXT(HFXG,L*0.92,"起爆"),COLORGREEN;
基准量:=(MA(VOL,5)+MA(VOL,10))/2;
危险量:=基准量*1.5;
破坏量:=基准量*1.15;
弱压量:=基准量*0.8;
超大量:=基准量*1.5;
攻击量:=基准量*1.15;
防守量:=基准量*0.8;
YL:=C>O OR (C=O AND C>=REF(C,1));
DL:=C<O OR (C=O AND C<REF(C,1));
TJ1:=DL AND VOL>=弱压量 AND VOL<破坏量;
TJ2:=DL AND VOL>=破坏量 AND VOL<危险量;
TJ3:=DL AND VOL>=危险量;
TJA:=YL AND VOL>=防守量 AND VOL<攻击量;
TJB:=YL AND VOL>=攻击量 AND VOL<超大量;
TJC:=YL AND VOL>超大量;
DRAWTEXT_FIX(ISLASTBAR AND TJ1,0.01,0.005,0,"弱压量 "),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR AND TJ2,0.01,0.005,0,"破坏量 "),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR AND TJ3,0.01,0.005,0," 危险量"),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND TJA,0.01,0.005,0," 防守量"),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR AND TJB,0.01,0.005,0,"攻击量"),COLORMAGENTA;