徐文明短线点金 等公式源码和使用方法
DRAWTEXT(CROSS(PDI,MDI)AND PDI>ADX,PDI,"火箭");
DRAWTEXT(CROSS(MDI,PDI)AND MDI>ADX,MDI,"炸弹");
DRAWTEXT(CROSS(PDI,ADX),PDI,"持股");
DRAWTEXT(CROSS(ADX,PDI),ADX,"风险");
DRAWTEXT(CROSS(ADX,MDI) AND ADX>PDI,ADX,"即将见底");
徐文明牛熊三色
EXPMA1:=EXPMA(CLOSE,7);
EXPMA2:=EXPMA(CLOSE,21);
N:=4;
S:=2;
M:=20;
高1:=REF(HHV(H,150),3);
低1:=REF(LLV(L,150),3);
H3:=高1-(高1-低1)*0.5;
中轴:=REFDATE(H3,DATE),LINETHICK1;
B1:=EMA(C,12);
B2:=EMA(C,26);
B3:=(B1-B2)*2;
WDIF:=中轴+B3;
WDEA:=EMA(WDIF,9);
MACD:=2*(WDIF-WDEA);
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
STICKLINE(MACD>0,0,1,0,1),COLORRED;
STICKLINE(MACD<0,0,1,0,1),COLORGREEN;
STICKLINE(EXPMA1>EXPMA2,1,2,0,1),COLORRED;
STICKLINE(EXPMA1
STICKLINE(CLOSE>SAR(N,S,M),2,3,0,1),COLORRED;
STICKLINE(CLOSE
STICKLINE("KDJ.J" >100,3,4,0,1),COLORGREEN;
STICKLINE("KDJ.J" <0,3,4,0,1),COLORRED;
STICKLINE(CCI>200,4,5,0,1),COLORGREEN;
STICKLINE(CCI<-200,4,5,0,1),COLORRED;
DRAWTEXT(ISLASTBAR,0.5,"MACD"),COLOR0089FF;
DRAWTEXT(ISLASTBAR,1.5,"EXPMA"),COLOR0089FF;
DRAWTEXT(ISLASTBAR,2.5,"SAR"),COLOR0089FF;
DRAWTEXT(ISLASTBAR,3.5,"KDJ"),COLOR0089FF;
DRAWTEXT(ISLASTBAR,4.5,"CCI"),COLOR0089FF;
用法注释:判断股票运行趋势强弱的方法,被称为“牛熊三色”,牛熊三色每翻红一色,就可以增加1/3的仓位,三色全翻红的时候基本可以满仓。这三色分别是:
SAR指标红色的时候第1行翻红 反之翻绿
EXPMA指标 EXPMA(7)大于EXPMA(21)的时候第2行翻红 反之翻绿
MACD指标 红柱的时候第3行翻红反之翻绿
追加优化部分
1)KDJ>100翻绿(表示超买了可以高抛了)KDJ<0翻红 (表示超卖了可以抄底了)在(0-100)之间默认颜色,表示正常
1)CCI>200翻绿(表示超买了可以高抛了) CCI<-200 翻红(表示超卖了可以抄底了)在 (负200 -正200)之间默认颜色,表示正常
徐文明操盘线大全
MA30工作:MA(CLOSE,30),LINETHICK2;
操盘7操盘:EXPMA(CLOSE,7),LINETHICK2;
操盘2支撑:EXPMA(CLOSE,21),LINETHICK2;
操盘1:EXPMA(CLOSE,17);
操盘5:EXPMA(CLOSE,50);
操盘4:=EXPMA(CLOSE,453);
操盘9:EXPMA(CLOSE,99);
操盘14:EXPMA(CLOSE,144);
保护:(REF(C,2)+REF(C,1)+O)/3;
{涨跌停}
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA ;
STICKLINE(涨停,H,L,0,0),COLORMAGENTA ;
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
{波峰波谷}
TY:=C;
Q1:=REF(TY,10)=HHV(TY,2*10+1); W1:=FILTER(Q1,10);P1:=BACKSET(W1,10+1); HD:=FILTER(P1,10);
Q2:=REF(TY,10)=LLV(TY,2*10+1); W2:=FILTER(Q2,10);P2:=BACKSET(W2,10+1); LD:=FILTER(P2,10);
M:=REF(C,BARSLAST(HD));
N:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD)
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
波峰:IF(T1,M,M),COLORRED,POINTDOT;
STICKLINE(T1,M,M,9,0),COLORRED;
波谷:IF(T2,N,N),COLORGREEN,POINTDOT;
STICKLINE(T2,N,N,9,0),COLOR80FF00;
{老鼠仓}
AA1:=AMOUNT/V;
BB1:=L
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L
EE1:=V
FF1:=BB1 AND CC1 AND DD1 AND EE1;
GG1:=FILTER((AA1 AND BB1 AND CC1 AND DD1),20);
DRAWTEXT(FF1,L-0.30,"鼠"),COLOR4080FF;
DRAWTEXT(GG1,L-0.8,"入"),COLORWHITE;
{龙}
龙:=OMA(C,5) AND C>MA(C,10) ANDC>MA(C,20);
DRAWTEXT(FILTER(龙,5),L-0.40,"龙"),COLORYELLOW;
注:源码中波峰波谷(加粗的部分)含有backset函数,如果十分在意的话可以把这部分单独去掉即可。
盘中预警
TR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),7);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),7);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),7);
PDI:=DMP*100/TR;
MDI:=DMM*100/TR;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACDX:=(DIF-DEA)*2;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
AAA:=PDI>MDI;{该周期+DI>-DI}
BBB:=SAR.SAR
CCC:=MACDX>-0.04;{该周期MACD红,为增加信号出现,改成了-0.04}
DDD:=J<100;{该周期KDJ<100,回避股价已经高位的股票}
EEE:=REF(SAR.SAR,1)>REF(C,1);{该周期的前一交易日SAR绿}
FFF:=REF(SAR.SAR,1)
GGG:=DYNAINFO(3)<均价的1.006%}
AAA AND BBB AND CCC AND DDD AND EEE AND FFF AND GGG;
这是【弱势抢反弹技术】的盘中预警,前提是保证你的本地数据的正确!
根据徐文明老师的理论编写的,原理:当DMI处于火箭升空时股价自5日线启动且MACD红柱KDJ小于100,盘中实时预警出现后可追涨,注意不可满仓!
- 上一篇公式:通达信凯恩斯红包副图指标
- 下一篇公式:通达信选股五部曲四源码选股贴图