交易师macd实战指标源码(macd水上二次金叉选股公式?)
1. macd水上二次金叉选股公式?
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
金叉:=CROSS(DIF,DEA);
轴上金叉:=金叉 AND DEA>0;
轴上周期:=BARSLAST(CROSS(0,DEA));
轴上金叉数:=COUNT(轴上金叉,轴上周期);
二次金叉: 轴上金叉 AND 轴上金叉数=2;
2. macd水上二次金叉选股公式?
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
金叉:=CROSS(DIF,DEA);
轴上金叉:=金叉 AND DEA>0;
轴上周期:=BARSLAST(CROSS(0,DEA));
轴上金叉数:=COUNT(轴上金叉,轴上周期);
二次金叉: 轴上金叉 AND 轴上金叉数=2;
3. 筹码集中度指标公式源码?
MJ:=8;T:=100;
A1:=COST(85);
A2:=COST(15);
A3:=A1-A2;
A4:=(A1+A2)/2;
A5:=A3/A4*100<MJ;
B1:=HHV(HIGH,T);
B2:=LLV(LOW,T);
B3:=B1-B2;
B4:=(A4-B2)<B3/2;
低位单峰密集:A5 AND B4;这是单峰密集筹码集中度源代码,朋友们可以在通达信股票软件中,复制粘贴这个源代码,就可以选到筹码集中度高的股票了。
4. 筹码集中度指标公式源码?
MJ:=8;T:=100;
A1:=COST(85);
A2:=COST(15);
A3:=A1-A2;
A4:=(A1+A2)/2;
A5:=A3/A4*100<MJ;
B1:=HHV(HIGH,T);
B2:=LLV(LOW,T);
B3:=B1-B2;
B4:=(A4-B2)<B3/2;
低位单峰密集:A5 AND B4;这是单峰密集筹码集中度源代码,朋友们可以在通达信股票软件中,复制粘贴这个源代码,就可以选到筹码集中度高的股票了。
5. 筹码集中度指标公式源码?
MJ:=8;T:=100;
A1:=COST(85);
A2:=COST(15);
A3:=A1-A2;
A4:=(A1+A2)/2;
A5:=A3/A4*100<MJ;
B1:=HHV(HIGH,T);
B2:=LLV(LOW,T);
B3:=B1-B2;
B4:=(A4-B2)<B3/2;
低位单峰密集:A5 AND B4;这是单峰密集筹码集中度源代码,朋友们可以在通达信股票软件中,复制粘贴这个源代码,就可以选到筹码集中度高的股票了。
6. 求股票高手:MACD第一根绿柱缩短的选股公式(通达信)?
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
把原公式发来,帮你检查一下。缩短也有0轴上下的区分。
根据思路编写公式,修改公式。盘中预警,条件选股。公式解密,去除时间限制。鼠标点击下方 我 的 名 字 上,进入 可 订 公式。
7. 筹码集中度指标公式源码?
MJ:=8;T:=100;
A1:=COST(85);
A2:=COST(15);
A3:=A1-A2;
A4:=(A1+A2)/2;
A5:=A3/A4*100<MJ;
B1:=HHV(HIGH,T);
B2:=LLV(LOW,T);
B3:=B1-B2;
B4:=(A4-B2)<B3/2;
低位单峰密集:A5 AND B4;这是单峰密集筹码集中度源代码,朋友们可以在通达信股票软件中,复制粘贴这个源代码,就可以选到筹码集中度高的股票了。
8. macd变色指标公式?
MACD变色公式
源码
//MACD变色V4 +金叉买入指标公式
//20150328 DIFF上穿0轴后在0轴上第一次死叉后又金叉
//20150329 MACD多头二次翻红
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),colorwhite,LINETHICK1;
DEA: EMA(DIFF,9),coloryellow,LINETHICK1;
MACD: 2*(DIFF-DEA),colorred,NODRAW;
Zero: 0,colorff7f00,LINETHICK1;
N:=IF(BARSCOUNT(C)<=5,MA(C,2),MA(C,5));
角度:((ATAN((N - REF(N,1))) * 3.1416) * 10),NODRAW,colorcyan;
//角度:((ATAN((MA(C,5) - REF(MA(C,5) ,1))) * 3.1416) * 10),NODRAW;
流通股:SHGZG/10000/10000,NODRAW,colorff7f00;
资本公积:GJJ/ZGB,NODRAW;
//CCI抄底
N:=14;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CCI: (TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),colorffff00,NODRAW;
//红色
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
//墨绿
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
//洋红
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
//绿色
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.2;
贴近零轴金叉:=CROSS(DIFF,DEA) AND MACD>0 AND BETWEEN(DIFF,-0.03,0.03);
//VERLINE(水上低位金叉,1),colorwhite;
//DRAWTEXT(低位金叉,DIFF*1.1,'低位'),color00aaff;
AA:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
一次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=1,21)=1;
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=2,21)=1;
三次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=3,21)=1;
四次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=4,21)=1;
五次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=5,21)=1;
//VERLINE(二次金叉,1),colorwhite;
DRAWTEXT(一次金叉,DIFF*1.1,'①'),color00aaff;
DRAWTEXT(一次金叉 AND 低位金叉,DIFF*1.1,'①低位'),color00aaff;
DRAWTEXT(二次金叉,DIFF*1.1,'②'),color00aaff;
DRAWTEXT(二次金叉 AND 低位金叉,DIFF*1.1,'②低位'),color00aaff;
DRAWTEXT(三次金叉,DIFF*1.1,'③'),color00aaff;
DRAWTEXT(三次金叉 AND 低位金叉,DIFF*1.1,'③低位'),color00aaff;
DRAWTEXT(四次金叉,DIFF*1.1,'④'),color00aaff;
DRAWTEXT(四次金叉 AND 低位金叉,DIFF*1.1,'④低位'),color00aaff;
DRAWTEXT(五次金叉,DIFF*1.1,'⑤'),color00aaff;
DRAWTEXT(五次金叉 AND 低位金叉,DIFF*1.1,'⑤低位'),color00aaff;
//DIFF上穿0轴后在0轴上第一次死叉后又金叉 www.gszb.com
AA:= CROSS(DIFF,DEA) AND DEA>0 ;
BB:=BARSLAST(CROSS(DEA,DIFF)) AND DEA>0;
CC:=REF(BARSLAST(CROSS(DIFF,0))<20,BARSLAST(CROSS(DEA,DIFF))+1);
MACD死叉后金叉:= AA AND BB AND CC;
DRAWTEXT(MACD死叉后金叉,DIFF*1.1+0.1,'①'),colorred;
//MACD多头二次翻红
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=EMA(C,30)>=REF(EMA(C,30),1) AND COUNT(EMA(C,5)>EMA(C,10) AND EMA(C,10)>EMA(C,30),1)=1;
FH4:=CROSS(C,EMA(C,30)) OR C>EMA(C,30);
FH5:=FH1 AND FH2 AND FH3 AND FH4;
FH6:=FH1 AND FH2 AND FH3 AND FH4 AND ABS((DIFF-DEA)/C)<0.018;
FH7:=FH1 AND FH2 AND FH3 AND FH4 AND MACD<0.10;
MACD多头二次翻红:=FH5 OR FH6 OR FH7;
DRAWTEXT(MACD多头二次翻红 AND REF(CCI,1)<50,DIFF*1.1+0.05,'②'),colorred;
//这个"二次翻红"指标除了满足原有的四个条件外,即:
//一是MACD在零轴以上并且第二次收红柱;
//二是MACD红柱大于等于零轴并且红柱缩短小于0.10以下;(实战0.111也行)
//三是DIFF与DEA两线的粘合度小于0.018;
//四是红柱连续缩短三天以上。
//还基本满足了所描述的四个条件(即:
//1、30日移动平均线由下跌变为走平或翘头向上,5日、10、30日移动平均线刚刚形成多头排列;
//2、日K线刚刚上穿30日移动平均线或在30日移动平均线上方运行;
//3、DIF在零轴下方与MACD金叉后可靠意义将会更大,在第一次翻红后,红柱开始缩短,越短越好,最好不要超过0轴的第一横线;
//4、成交量由萎缩逐渐放大,特别是在二次翻红后,若能得到成交量的配合,该股后市向上冲击的力量会更大。)
//该指标没有设计成交量这个条件。只要符合所涉及到的条件,就能在"二次翻红"起涨点选出股票。
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.28,'+底背离'),COLORFF00FF;
DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,'-顶背离'),colorgreen,LINETHICK2;
//5日均线上穿24日均线
MA5:=MA(C,5);
MA24:=MA(C,24);
LL:=IF(MACD<=0,MACD,-MACD);
A1:=CROSS(MA5,MA24) OR (MA5>MA24 AND REF(MA5,1)<REF(MA24,1));
A2:=MA(V,10)<V;
A3:=IF(MACD<0,MACD>=REF(MACD,1),MACD<
3);
//五日内最大涨幅小于8%
A4:=C>=O AND 角度<8 AND COUNT(C/O>1.08,5)<1;
//日线买点:= MA5>MA24 AND REF(MA5,1)<REF(MA24,1) AND CCI<100;
日线买点:= A1 AND A2 AND A3 AND A4;
DRAWICON(日线买点,LL,"BUY");
9. macd水上二次金叉选股公式?
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
金叉:=CROSS(DIF,DEA);
轴上金叉:=金叉 AND DEA>0;
轴上周期:=BARSLAST(CROSS(0,DEA));
轴上金叉数:=COUNT(轴上金叉,轴上周期);
二次金叉: 轴上金叉 AND 轴上金叉数=2;
10. 筹码分布公式源码?
筹码分布的公式源码如下
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF;
指数趋势:EMA(1250*(INDEXC-LLV(INDEXL,34))/HHV(INDEXH,34)-LLV(INDEXL,34),3),COLORYELLOW,NODRAW;
主力筹码集中度:WINNER(C)*100,COLORRED;
散筹筹码集中度: (WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN;
启主力持仓+主力筹码集中度+散筹筹码集中度)/2,COLORFF6699;
强弱分界:80,COLOR00FFFF;
0,;
11. 求股票高手:MACD第一根绿柱缩短的选股公式(通达信)?
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
把原公式发来,帮你检查一下。缩短也有0轴上下的区分。
根据思路编写公式,修改公式。盘中预警,条件选股。公式解密,去除时间限制。鼠标点击下方 我 的 名 字 上,进入 可 订 公式。
12. 筹码分布公式源码?
筹码分布的公式源码如下
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF;
指数趋势:EMA(1250*(INDEXC-LLV(INDEXL,34))/HHV(INDEXH,34)-LLV(INDEXL,34),3),COLORYELLOW,NODRAW;
主力筹码集中度:WINNER(C)*100,COLORRED;
散筹筹码集中度: (WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN;
启主力持仓+主力筹码集中度+散筹筹码集中度)/2,COLORFF6699;
强弱分界:80,COLOR00FFFF;
0,;
13. macd水上二次金叉选股公式?
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
金叉:=CROSS(DIF,DEA);
轴上金叉:=金叉 AND DEA>0;
轴上周期:=BARSLAST(CROSS(0,DEA));
轴上金叉数:=COUNT(轴上金叉,轴上周期);
二次金叉: 轴上金叉 AND 轴上金叉数=2;
14. macd变色指标公式?
MACD变色公式
源码
//MACD变色V4 +金叉买入指标公式
//20150328 DIFF上穿0轴后在0轴上第一次死叉后又金叉
//20150329 MACD多头二次翻红
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),colorwhite,LINETHICK1;
DEA: EMA(DIFF,9),coloryellow,LINETHICK1;
MACD: 2*(DIFF-DEA),colorred,NODRAW;
Zero: 0,colorff7f00,LINETHICK1;
N:=IF(BARSCOUNT(C)<=5,MA(C,2),MA(C,5));
角度:((ATAN((N - REF(N,1))) * 3.1416) * 10),NODRAW,colorcyan;
//角度:((ATAN((MA(C,5) - REF(MA(C,5) ,1))) * 3.1416) * 10),NODRAW;
流通股:SHGZG/10000/10000,NODRAW,colorff7f00;
资本公积:GJJ/ZGB,NODRAW;
//CCI抄底
N:=14;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CCI: (TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),colorffff00,NODRAW;
//红色
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
//墨绿
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
//洋红
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
//绿色
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.2;
贴近零轴金叉:=CROSS(DIFF,DEA) AND MACD>0 AND BETWEEN(DIFF,-0.03,0.03);
//VERLINE(水上低位金叉,1),colorwhite;
//DRAWTEXT(低位金叉,DIFF*1.1,'低位'),color00aaff;
AA:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
一次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=1,21)=1;
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=2,21)=1;
三次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=3,21)=1;
四次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=4,21)=1;
五次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=5,21)=1;
//VERLINE(二次金叉,1),colorwhite;
DRAWTEXT(一次金叉,DIFF*1.1,'①'),color00aaff;
DRAWTEXT(一次金叉 AND 低位金叉,DIFF*1.1,'①低位'),color00aaff;
DRAWTEXT(二次金叉,DIFF*1.1,'②'),color00aaff;
DRAWTEXT(二次金叉 AND 低位金叉,DIFF*1.1,'②低位'),color00aaff;
DRAWTEXT(三次金叉,DIFF*1.1,'③'),color00aaff;
DRAWTEXT(三次金叉 AND 低位金叉,DIFF*1.1,'③低位'),color00aaff;
DRAWTEXT(四次金叉,DIFF*1.1,'④'),color00aaff;
DRAWTEXT(四次金叉 AND 低位金叉,DIFF*1.1,'④低位'),color00aaff;
DRAWTEXT(五次金叉,DIFF*1.1,'⑤'),color00aaff;
DRAWTEXT(五次金叉 AND 低位金叉,DIFF*1.1,'⑤低位'),color00aaff;
//DIFF上穿0轴后在0轴上第一次死叉后又金叉 www.gszb.com
AA:= CROSS(DIFF,DEA) AND DEA>0 ;
BB:=BARSLAST(CROSS(DEA,DIFF)) AND DEA>0;
CC:=REF(BARSLAST(CROSS(DIFF,0))<20,BARSLAST(CROSS(DEA,DIFF))+1);
MACD死叉后金叉:= AA AND BB AND CC;
DRAWTEXT(MACD死叉后金叉,DIFF*1.1+0.1,'①'),colorred;
//MACD多头二次翻红
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=EMA(C,30)>=REF(EMA(C,30),1) AND COUNT(EMA(C,5)>EMA(C,10) AND EMA(C,10)>EMA(C,30),1)=1;
FH4:=CROSS(C,EMA(C,30)) OR C>EMA(C,30);
FH5:=FH1 AND FH2 AND FH3 AND FH4;
FH6:=FH1 AND FH2 AND FH3 AND FH4 AND ABS((DIFF-DEA)/C)<0.018;
FH7:=FH1 AND FH2 AND FH3 AND FH4 AND MACD<0.10;
MACD多头二次翻红:=FH5 OR FH6 OR FH7;
DRAWTEXT(MACD多头二次翻红 AND REF(CCI,1)<50,DIFF*1.1+0.05,'②'),colorred;
//这个"二次翻红"指标除了满足原有的四个条件外,即:
//一是MACD在零轴以上并且第二次收红柱;
//二是MACD红柱大于等于零轴并且红柱缩短小于0.10以下;(实战0.111也行)
//三是DIFF与DEA两线的粘合度小于0.018;
//四是红柱连续缩短三天以上。
//还基本满足了所描述的四个条件(即:
//1、30日移动平均线由下跌变为走平或翘头向上,5日、10、30日移动平均线刚刚形成多头排列;
//2、日K线刚刚上穿30日移动平均线或在30日移动平均线上方运行;
//3、DIF在零轴下方与MACD金叉后可靠意义将会更大,在第一次翻红后,红柱开始缩短,越短越好,最好不要超过0轴的第一横线;
//4、成交量由萎缩逐渐放大,特别是在二次翻红后,若能得到成交量的配合,该股后市向上冲击的力量会更大。)
//该指标没有设计成交量这个条件。只要符合所涉及到的条件,就能在"二次翻红"起涨点选出股票。
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.28,'+底背离'),COLORFF00FF;
DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,'-顶背离'),colorgreen,LINETHICK2;
//5日均线上穿24日均线
MA5:=MA(C,5);
MA24:=MA(C,24);
LL:=IF(MACD<=0,MACD,-MACD);
A1:=CROSS(MA5,MA24) OR (MA5>MA24 AND REF(MA5,1)<REF(MA24,1));
A2:=MA(V,10)<V;
A3:=IF(MACD<0,MACD>=REF(MACD,1),MACD<
3);
//五日内最大涨幅小于8%
A4:=C>=O AND 角度<8 AND COUNT(C/O>1.08,5)<1;
//日线买点:= MA5>MA24 AND REF(MA5,1)<REF(MA24,1) AND CCI<100;
日线买点:= A1 AND A2 AND A3 AND A4;
DRAWICON(日线买点,LL,"BUY");
15. 筹码分布公式源码?
筹码分布的公式源码如下
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF;
指数趋势:EMA(1250*(INDEXC-LLV(INDEXL,34))/HHV(INDEXH,34)-LLV(INDEXL,34),3),COLORYELLOW,NODRAW;
主力筹码集中度:WINNER(C)*100,COLORRED;
散筹筹码集中度: (WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN;
启主力持仓+主力筹码集中度+散筹筹码集中度)/2,COLORFF6699;
强弱分界:80,COLOR00FFFF;
0,;
16. macd变色指标公式?
MACD变色公式
源码
//MACD变色V4 +金叉买入指标公式
//20150328 DIFF上穿0轴后在0轴上第一次死叉后又金叉
//20150329 MACD多头二次翻红
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),colorwhite,LINETHICK1;
DEA: EMA(DIFF,9),coloryellow,LINETHICK1;
MACD: 2*(DIFF-DEA),colorred,NODRAW;
Zero: 0,colorff7f00,LINETHICK1;
N:=IF(BARSCOUNT(C)<=5,MA(C,2),MA(C,5));
角度:((ATAN((N - REF(N,1))) * 3.1416) * 10),NODRAW,colorcyan;
//角度:((ATAN((MA(C,5) - REF(MA(C,5) ,1))) * 3.1416) * 10),NODRAW;
流通股:SHGZG/10000/10000,NODRAW,colorff7f00;
资本公积:GJJ/ZGB,NODRAW;
//CCI抄底
N:=14;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CCI: (TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),colorffff00,NODRAW;
//红色
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
//墨绿
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
//洋红
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
//绿色
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.2;
贴近零轴金叉:=CROSS(DIFF,DEA) AND MACD>0 AND BETWEEN(DIFF,-0.03,0.03);
//VERLINE(水上低位金叉,1),colorwhite;
//DRAWTEXT(低位金叉,DIFF*1.1,'低位'),color00aaff;
AA:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
一次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=1,21)=1;
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=2,21)=1;
三次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=3,21)=1;
四次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=4,21)=1;
五次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=5,21)=1;
//VERLINE(二次金叉,1),colorwhite;
DRAWTEXT(一次金叉,DIFF*1.1,'①'),color00aaff;
DRAWTEXT(一次金叉 AND 低位金叉,DIFF*1.1,'①低位'),color00aaff;
DRAWTEXT(二次金叉,DIFF*1.1,'②'),color00aaff;
DRAWTEXT(二次金叉 AND 低位金叉,DIFF*1.1,'②低位'),color00aaff;
DRAWTEXT(三次金叉,DIFF*1.1,'③'),color00aaff;
DRAWTEXT(三次金叉 AND 低位金叉,DIFF*1.1,'③低位'),color00aaff;
DRAWTEXT(四次金叉,DIFF*1.1,'④'),color00aaff;
DRAWTEXT(四次金叉 AND 低位金叉,DIFF*1.1,'④低位'),color00aaff;
DRAWTEXT(五次金叉,DIFF*1.1,'⑤'),color00aaff;
DRAWTEXT(五次金叉 AND 低位金叉,DIFF*1.1,'⑤低位'),color00aaff;
//DIFF上穿0轴后在0轴上第一次死叉后又金叉 www.gszb.com
AA:= CROSS(DIFF,DEA) AND DEA>0 ;
BB:=BARSLAST(CROSS(DEA,DIFF)) AND DEA>0;
CC:=REF(BARSLAST(CROSS(DIFF,0))<20,BARSLAST(CROSS(DEA,DIFF))+1);
MACD死叉后金叉:= AA AND BB AND CC;
DRAWTEXT(MACD死叉后金叉,DIFF*1.1+0.1,'①'),colorred;
//MACD多头二次翻红
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=EMA(C,30)>=REF(EMA(C,30),1) AND COUNT(EMA(C,5)>EMA(C,10) AND EMA(C,10)>EMA(C,30),1)=1;
FH4:=CROSS(C,EMA(C,30)) OR C>EMA(C,30);
FH5:=FH1 AND FH2 AND FH3 AND FH4;
FH6:=FH1 AND FH2 AND FH3 AND FH4 AND ABS((DIFF-DEA)/C)<0.018;
FH7:=FH1 AND FH2 AND FH3 AND FH4 AND MACD<0.10;
MACD多头二次翻红:=FH5 OR FH6 OR FH7;
DRAWTEXT(MACD多头二次翻红 AND REF(CCI,1)<50,DIFF*1.1+0.05,'②'),colorred;
//这个"二次翻红"指标除了满足原有的四个条件外,即:
//一是MACD在零轴以上并且第二次收红柱;
//二是MACD红柱大于等于零轴并且红柱缩短小于0.10以下;(实战0.111也行)
//三是DIFF与DEA两线的粘合度小于0.018;
//四是红柱连续缩短三天以上。
//还基本满足了所描述的四个条件(即:
//1、30日移动平均线由下跌变为走平或翘头向上,5日、10、30日移动平均线刚刚形成多头排列;
//2、日K线刚刚上穿30日移动平均线或在30日移动平均线上方运行;
//3、DIF在零轴下方与MACD金叉后可靠意义将会更大,在第一次翻红后,红柱开始缩短,越短越好,最好不要超过0轴的第一横线;
//4、成交量由萎缩逐渐放大,特别是在二次翻红后,若能得到成交量的配合,该股后市向上冲击的力量会更大。)
//该指标没有设计成交量这个条件。只要符合所涉及到的条件,就能在"二次翻红"起涨点选出股票。
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.28,'+底背离'),COLORFF00FF;
DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,'-顶背离'),colorgreen,LINETHICK2;
//5日均线上穿24日均线
MA5:=MA(C,5);
MA24:=MA(C,24);
LL:=IF(MACD<=0,MACD,-MACD);
A1:=CROSS(MA5,MA24) OR (MA5>MA24 AND REF(MA5,1)<REF(MA24,1));
A2:=MA(V,10)<V;
A3:=IF(MACD<0,MACD>=REF(MACD,1),MACD<
3);
//五日内最大涨幅小于8%
A4:=C>=O AND 角度<8 AND COUNT(C/O>1.08,5)<1;
//日线买点:= MA5>MA24 AND REF(MA5,1)<REF(MA24,1) AND CCI<100;
日线买点:= A1 AND A2 AND A3 AND A4;
DRAWICON(日线买点,LL,"BUY");
17. 求股票高手:MACD第一根绿柱缩短的选股公式(通达信)?
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
把原公式发来,帮你检查一下。缩短也有0轴上下的区分。
根据思路编写公式,修改公式。盘中预警,条件选股。公式解密,去除时间限制。鼠标点击下方 我 的 名 字 上,进入 可 订 公式。
18. 求股票高手:MACD第一根绿柱缩短的选股公式(通达信)?
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
把原公式发来,帮你检查一下。缩短也有0轴上下的区分。
根据思路编写公式,修改公式。盘中预警,条件选股。公式解密,去除时间限制。鼠标点击下方 我 的 名 字 上,进入 可 订 公式。
19. macd变色指标公式?
MACD变色公式
源码
//MACD变色V4 +金叉买入指标公式
//20150328 DIFF上穿0轴后在0轴上第一次死叉后又金叉
//20150329 MACD多头二次翻红
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),colorwhite,LINETHICK1;
DEA: EMA(DIFF,9),coloryellow,LINETHICK1;
MACD: 2*(DIFF-DEA),colorred,NODRAW;
Zero: 0,colorff7f00,LINETHICK1;
N:=IF(BARSCOUNT(C)<=5,MA(C,2),MA(C,5));
角度:((ATAN((N - REF(N,1))) * 3.1416) * 10),NODRAW,colorcyan;
//角度:((ATAN((MA(C,5) - REF(MA(C,5) ,1))) * 3.1416) * 10),NODRAW;
流通股:SHGZG/10000/10000,NODRAW,colorff7f00;
资本公积:GJJ/ZGB,NODRAW;
//CCI抄底
N:=14;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CCI: (TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),colorffff00,NODRAW;
//红色
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
//墨绿
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
//洋红
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
//绿色
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.2;
贴近零轴金叉:=CROSS(DIFF,DEA) AND MACD>0 AND BETWEEN(DIFF,-0.03,0.03);
//VERLINE(水上低位金叉,1),colorwhite;
//DRAWTEXT(低位金叉,DIFF*1.1,'低位'),color00aaff;
AA:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
一次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=1,21)=1;
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=2,21)=1;
三次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=3,21)=1;
四次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=4,21)=1;
五次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(AA=5,21)=1;
//VERLINE(二次金叉,1),colorwhite;
DRAWTEXT(一次金叉,DIFF*1.1,'①'),color00aaff;
DRAWTEXT(一次金叉 AND 低位金叉,DIFF*1.1,'①低位'),color00aaff;
DRAWTEXT(二次金叉,DIFF*1.1,'②'),color00aaff;
DRAWTEXT(二次金叉 AND 低位金叉,DIFF*1.1,'②低位'),color00aaff;
DRAWTEXT(三次金叉,DIFF*1.1,'③'),color00aaff;
DRAWTEXT(三次金叉 AND 低位金叉,DIFF*1.1,'③低位'),color00aaff;
DRAWTEXT(四次金叉,DIFF*1.1,'④'),color00aaff;
DRAWTEXT(四次金叉 AND 低位金叉,DIFF*1.1,'④低位'),color00aaff;
DRAWTEXT(五次金叉,DIFF*1.1,'⑤'),color00aaff;
DRAWTEXT(五次金叉 AND 低位金叉,DIFF*1.1,'⑤低位'),color00aaff;
//DIFF上穿0轴后在0轴上第一次死叉后又金叉 www.gszb.com
AA:= CROSS(DIFF,DEA) AND DEA>0 ;
BB:=BARSLAST(CROSS(DEA,DIFF)) AND DEA>0;
CC:=REF(BARSLAST(CROSS(DIFF,0))<20,BARSLAST(CROSS(DEA,DIFF))+1);
MACD死叉后金叉:= AA AND BB AND CC;
DRAWTEXT(MACD死叉后金叉,DIFF*1.1+0.1,'①'),colorred;
//MACD多头二次翻红
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=EMA(C,30)>=REF(EMA(C,30),1) AND COUNT(EMA(C,5)>EMA(C,10) AND EMA(C,10)>EMA(C,30),1)=1;
FH4:=CROSS(C,EMA(C,30)) OR C>EMA(C,30);
FH5:=FH1 AND FH2 AND FH3 AND FH4;
FH6:=FH1 AND FH2 AND FH3 AND FH4 AND ABS((DIFF-DEA)/C)<0.018;
FH7:=FH1 AND FH2 AND FH3 AND FH4 AND MACD<0.10;
MACD多头二次翻红:=FH5 OR FH6 OR FH7;
DRAWTEXT(MACD多头二次翻红 AND REF(CCI,1)<50,DIFF*1.1+0.05,'②'),colorred;
//这个"二次翻红"指标除了满足原有的四个条件外,即:
//一是MACD在零轴以上并且第二次收红柱;
//二是MACD红柱大于等于零轴并且红柱缩短小于0.10以下;(实战0.111也行)
//三是DIFF与DEA两线的粘合度小于0.018;
//四是红柱连续缩短三天以上。
//还基本满足了所描述的四个条件(即:
//1、30日移动平均线由下跌变为走平或翘头向上,5日、10、30日移动平均线刚刚形成多头排列;
//2、日K线刚刚上穿30日移动平均线或在30日移动平均线上方运行;
//3、DIF在零轴下方与MACD金叉后可靠意义将会更大,在第一次翻红后,红柱开始缩短,越短越好,最好不要超过0轴的第一横线;
//4、成交量由萎缩逐渐放大,特别是在二次翻红后,若能得到成交量的配合,该股后市向上冲击的力量会更大。)
//该指标没有设计成交量这个条件。只要符合所涉及到的条件,就能在"二次翻红"起涨点选出股票。
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.28,'+底背离'),COLORFF00FF;
DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,'-顶背离'),colorgreen,LINETHICK2;
//5日均线上穿24日均线
MA5:=MA(C,5);
MA24:=MA(C,24);
LL:=IF(MACD<=0,MACD,-MACD);
A1:=CROSS(MA5,MA24) OR (MA5>MA24 AND REF(MA5,1)<REF(MA24,1));
A2:=MA(V,10)<V;
A3:=IF(MACD<0,MACD>=REF(MACD,1),MACD<
3);
//五日内最大涨幅小于8%
A4:=C>=O AND 角度<8 AND COUNT(C/O>1.08,5)<1;
//日线买点:= MA5>MA24 AND REF(MA5,1)<REF(MA24,1) AND CCI<100;
日线买点:= A1 AND A2 AND A3 AND A4;
DRAWICON(日线买点,LL,"BUY");
20. 筹码分布公式源码?
筹码分布的公式源码如下
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF;
指数趋势:EMA(1250*(INDEXC-LLV(INDEXL,34))/HHV(INDEXH,34)-LLV(INDEXL,34),3),COLORYELLOW,NODRAW;
主力筹码集中度:WINNER(C)*100,COLORRED;
散筹筹码集中度: (WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN;
启主力持仓+主力筹码集中度+散筹筹码集中度)/2,COLORFF6699;
强弱分界:80,COLOR00FFFF;
0,;