通达信一根均线打天下主图公式
让大家分享我自用指标。
神秘均线75:=MA(CLOSE,75);
ZJ:=EMA(C,13),COLOR0000FF;
HY:=EMA(C,20),COLORFF00FF;
ZJ升:=IF(ZJ>REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;
ZJ降:=IF(ZJ<=REF(ZJ,1),ZJ,DRAWNULL),COLORBLUE,LINETHICK2;
HY升:=IF(HY>REF(HY,1),HY,DRAWNULL),COLORFF00FF,LINETHICK2;
HY降:=IF(HY<REF(HY,1),HY,DRAWNULL),COLORFFAA00,LINETHICK2;
STICKLINE(C>ZJ,H,L,0,0),COLORRED;
STICKLINE(C>ZJ,C,O,-1,1),COLORRED;
STICKLINE(C=ZJ,H,L,0,0),COLORFFFFFF;
STICKLINE(C<ZJ,H,L,0,0),COLOR00FFFF;
STICKLINE(C<ZJ,O,C,-1,1),COLOR00FFFF;
STICKLINE(C<HY,O,C,-1,1),COLORFFFF00;
STICKLINE(C<HY,H,L,0,0),COLORCYAN;
{DRAWTEXT(CROSS(C,ZJ),L,'B'),COLOR00FFFF;
DRAWTEXT(CROSS(C,HY),L*0.99,'B'),COLORFFFF00;
DRAWTEXT(CROSS(ZJ,C),H,'S'),COLOR00FFFF;
DRAWTEXT(CROSS(HY,C),H*1.01,'S'),COLORFFFF00;}
{自适应均线}
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
AMA1:=EMA(DMA(CLOSE,CQ1),2) ,COLORWHITE;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
AMA2:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK1;
{AMA3:IF(AMA2/REF(AMA2,1)>0.997,AMA2,DRAWNULL),COLORBLUE,LINETHICK3;}
AMA4:IF(AMA2/REF(AMA2,1)>1.001,AMA2,DRAWNULL),COLORRED,LINETHICK3;
{大阳过平台形态}
N:=5;
大阳:=(C/REF(C,1)-1)*100>=N AND V>REF(V,1);
DRAWICON(大阳,L*0.98,13);
STICKLINE(大阳,O,C,2,0),COLORYELLOW;
DRAWTEXT(大阳,L*0.97,'↖大阳过平台形态'),COLORYELLOW;
{以涨停板或者大阳来突破左侧的高点,5日线和10日线具有上升的攻击角度}
A1:=(MA(C,5)-REF(MA(C,5),1))/MA(C,5)>0.015;
A2:=CLOSE>=REF(HHV(HIGH,30),1);
A3:=C>REF(C,1)*1.07;
XG:=(A1 AND A2 AND A3);
DRAWICON(XG,L*0.96,23);
STICKLINE(XG,O,C,2,0),COLORRED;
DRAWTEXT(XG,L*0.96,'↖大阳来突破左侧的高点'),COLORRED;
TYX2:=MA(REF(HHV((C+L+O+H)/4,10),1),3);
加速K线:=REF(COUNT(C<TYX2,5)=5,1) AND C>TYX2 AND C>O;
DRAWICON(加速K线,L*0.95,1);
STICKLINE(加速K线,O,C,2,0),COLORRED;
DRAWTEXT(加速K线,L*0.938,'↖加速K线点'),COLORBLUE;
TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);
启爆K线:=REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O;
DRAWICON(启爆K线,L*0.94,7);
STICKLINE(启爆K线,O,C,2,0),COLORRED;
DRAWTEXT(启爆K线,L*0.928,'↖启爆K线'),COLORBLUE;
{大阳突破:=HHV(C,13)/REF(HHV(C,13),1)>1.018;
DRAWICON(大阳突破,L*0.93,25);
DRAWTEXT(大阳突破,L*0.92,'↖大阳突破'),COLORYELLOW;
多头排列:MA(CLOSE,8)>MA(CLOSE,13) AND MA(CLOSE,5)>MA(CLOSE,8) AND EMA(C,3)>REF(EMA(C,3),1);
DRAWICON(多头排列,L*0.97,1);};
HH0:=CONST(HHV(H,120))*1;
LL0:=CONST(LLV(L,120))*1;
MM0:=CONST((HH0+LL0)/2);
HH1:=IF(CONST(C)<MM0,LL0-(HH0-LL0)*0.4,LL0-(HH0-LL0)*0.4),COLORRED;
LL1:=LL0;HLMAX:=MAX(HH1,LL1);
HLMIN:=MIN(HH1,LL1);
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=(HLMAX-HLMIN);
HLMN3:=HHV(V,250)/2;
HLMN4:=HHV(V,250);
VZ:=(V-HLMN3)*HLMN2/HLMN4+HLMN1;
预测量:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,(0-HLMN3)*HLMN2/HLMN4+HLMN1,(预测量-HLMN3)*HLMN2/HLMN4+HLMN1,2,-1),COLORLIGRAY;
STICKLINE(C>=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1,0),COLORRED;
STICKLINE(C<O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1,0),COLORGREEN;
MA5:=(MA(V,5)-HLMN3)*HLMN2/HLMN4+HLMN1,COLORFFFFFF;
MA10:=(MA(V,10)-HLMN3)*HLMN2/HLMN4+HLMN1,COLOR00FFFF;
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
XG3:=(W4 AND COUNT(W4,5)=1);
DRAWICON(XG3,L*0.93,13);
STICKLINE(XG3,O,C,2,0),COLORYELLOW;
DRAWTEXT(XG3,L*0.90,'↖枪挑小梁王'),COLORYELLOW;
{蓄势待发}
V0:=EMA(C,5);
EMA10:=EMA(C,10);
EMA20:=EMA(C,20);
EMA30:=EMA(C,30);
EMA60:=EMA(C,60);
M1:=1000*EMA10/EMA60<=1015 AND 1000*EMA10/EMA60>=975;
M2:=1000*EMA20/EMA60<=1020 AND 1000*EMA20/EMA60>=980;
M3:=1000*EMA30/EMA60<=1015 AND 1000*EMA30/EMA60>=985;
M4:=M1 AND M2 AND M3 AND CROSS(V0,EMA10);
M5:=M1 AND M2 AND M3 AND CROSS(V0,EMA30);
T1:=1000*EMA10/EMA30<=1010 AND 1000*EMA10/EMA30>=990;
T2:=1000*EMA20/EMA30<=1010 AND 1000*EMA20/EMA30>=990;
T3:=T1 AND T2 AND CROSS(V0,EMA10);
T4:=T1 AND T2 AND CROSS(V0,EMA30);
XG1:=(M4 OR M5 OR T3 OR T4);
DRAWICON(XG1,L*0.98,1);
STICKLINE(XG1,O,C,2,0),COLORMAGENTA;
DRAWTEXT(XG1,L*0.97,'↖蓄势待发'),COLORMAGENTA;
{两阳夹阴}
XG2:=(C>O AND REF(C,1)<REF(O,1) AND REF(C,2)>REF(O,2)
AND C>REF(O,1) AND C>MA(C,5) AND MA(C,5)>MA(C,10));
DRAWICON(XG2,L*0.98,1);
STICKLINE(XG2,O,C,2,0),COLORMAGENTA;
DRAWTEXT(XG2,L*0.97,'↖两阳夹阴'),COLORMAGENTA;
A81:=REF(C,2)>REF(O,2)*1.03;{确定前天阳线实体大小}
A82:=REF(C,1)<REF(O,1)*1.005 AND REF(C,1)<REF(C,2);{确定昨天为阴线收盘价低于前天收盘价}
A83:=C>O*1.023 AND C>REF(C,1)*0.99;{确定今天阳线实体收盘价大于昨天阴线}
两阳夹一阴:=(A81 AND A82 AND A83 );
DRAWICON(两阳夹一阴,L*0.97,13);
STICKLINE(两阳夹一阴,O,C,2,0),COLORYELLOW;
DRAWTEXT(两阳夹一阴,L*0.96,'↖两阳夹一阴'),COLORYELLOW;
AA:=MA(C,5)>MA(C,30) AND MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,30);
BB:=C>O AND REF(C,1)<REF(O,1) AND REF(C,2)>REF(O,2);
CC:=AMO>REF(AMO,1)*2 OR REF(AMO,2)>REF(AMO,3)*2 AND REF(AMO,1)<REF(AMO,2) AND REF(AMO,1)<AMO;
XG6:=(AA AND BB AND CC);
DRAWICON(XG6,L*0.90,7);
DRAWTEXT(XG6,L*0.89, '↖两阳一阴擒涨停 '),COLORYELLOW;
两阳夹一阴1:=COUNT(C>O,3)=2 AND REF(C<O,1) AND C/REF(C,1)>=1.05;
DRAWTEXT(两阳夹一阴1,L*0.89, '↖两阳夹一阴1');