❶ 求老师帮忙编写一个MACD0日线上出现第一根红柱时的选股指标源码(谢谢)
可以编写macd日线上出现第一根红柱时的选股指标公式源码,效果如下图。
❷ 三天内macd.kdj金叉并且5日均线上串10日均线,通达信源码公式
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26),COLORYELLOW;
DEA:=EMA(DIF,9)COLORMAGENTA;
MACD:=(DIF-DEA)*2,COLORLIGRAY;
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;
选:EXIST(CROSS(DIF,DEA),3) AND EXIST(CROSS(J,K),3) AND CROSS(MA(C,5),MA(C,10));
❸ 编写一个通达信选股公式,MACD周线金叉
DIF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIF,9);
周DIF:="MACD.DIF#WEEK"(12,26,9),COLORGRAY;
周DEA:="MACD.DEA#WEEK"(12,26,9),COLORRED;
AA:=CROSS(周DIF,周DEA);
XG:=CROSS(AA,0.5);
拓展资料:
一、通达信MACD金叉副图指标源码公式
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
二、以下公式适合通达信股票软件。选出股票后能否买入依然还要综合参考大趋势和其它指标。
金叉并非万能,有时刚刚进入金叉或准金叉状态,也可能是上一波反弹的结束,下一波下跌的开始。
只有当金叉周期的前后周期均为上涨趋势,金叉的威力才最大。
业绩的持续增长才是技术指标的前提和保证。
1、0轴上方第一次金叉选股公式:
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA := EMA(DIFF,9);
MACD:= 2*(DIFF-DEA);
xg:cross(diff,dea) and dea>-1.0 and dea<0.5 and CLOSE>ref(CLOSE,1) and CLOSE>=ma(c,60);
2、0轴上方二次金叉的选股公式:
JC:IF(SUM(IF(MACD>0 AND CROSS(MACD.DIF,MACD.DEA),1,0),0)-HHV(IF(IF(CROSS(MACD.DEA,0),1,0),
SUM(IF(MACD>0 AND CROSS(MACD.DIF,MACD.DEA),1,0),0),0),0)=2 AND SUM(IF(MACD>0 AND CROSS(MACD.DIF,MACD.DEA),1,0),
0)>REF(SUM(IF(MACD>0 AND CROSS(MACD.DIF,MACD.DEA),1,0),0),1),10,0);
{选股设JC=10即可}
3.0轴下方一次金叉的选股公式:
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=(DIFF-DEA)*2;
低位金叉:CROSS(DIFF,DEA) AND DIFF<-0.1;
4、0轴下方二次金叉且第二次金叉高于第一次金叉:
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
AA:=BARSLAST(REF(CROSS(DIF,DEA),1));
二次金叉:CROSS(DIF,DEA) AND DIF>REF(DIF,AA+1) AND AA<20 AND DIF<0;
5、0轴下方二次金叉选股公式:
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); {选股设JC=10即可}
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A:=IF(CROSS(0,DEA),1,0);
A1:=IF(DIFF<0 AND CROSS(DIFF,DEA),1,0);
SS:=IF(A,SUM(A1,0),0);
SSB:=HHV(SS,0);
SSS:=SUM(A1,0);
JC:IF(SSS-SSB=2 AND SSS>REF(SSS,1),10,0);
6、缩量横盘突破选股:
WH01:=(HHV(C,10)-LLV(C,10))/LLV(C,10)*100<=10;
WH02:=SUM(VOL,10)/CAPITAL*100<45;
WH03:=REF(WH01,1);
WH04:=HHVBARS(HIGH,55)>20 OR C=HHV(H,55);
WH05:=WH02 AND WH03 AND WH04 AND C>REF(HHV(H,10),1);
WH05 AND REF(NOT(WH05),1);
7、均线、KDJ、MACD金叉的预警选股公式
完全符合以下条件:
(1) 5日线上穿10日线
(2) MACD金叉
(3) KDJ金叉
❹ 求一个头肩底或者V型底或者双重底的公式源码...
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=MA(2*(DIFF-DEA),2);
PW:=CROSS(0,MACD);
ZQ:=BARSLAST(PW);
ZQ2:=BARSLAST(CROSS(MACD,0));
QQ:=ZQ>ZQ2;
VARA:=MACD<0 AND (MACD<REF(MACD,1) AND MACD<REFX(MACD,1));
CA:=COUNT(VARA,BARSLAST(QQ)+1);
TJ:=REF(MACD,2)>REF(MACD,1) AND REF(MACD,1)>MACD AND MACD<REFX(MACD,1) AND REFX(MACD,1)<REFX(MACD,2);//修正昍镚不足
TJD:=CA>=3 AND REF(MACD,BARSLAST(TJ AND CA=1 AND REF(CA,1)=0))>REF(MACD,BARSLAST(TJ AND CA=2 AND REF(CA,1)=1))
AND REF(MACD,BARSLAST(TJ AND CA=2 AND REF(CA,1)=1))<REF(TJ AND MACD,BARSLAST(CA=3 AND REF(CA,1)=2));
TJD AND REF(TJD,1)=0;//头肩底型态完成
//TJD AND CROSS(MACD,0);//加上金叉