【通达信源码分享】倍量过峰起爆源码主图贴图带MACD三叉共振
公式中有未来函数,找前高过前峰,这个不用未来函数向前赋值不行,但这个未来不存在假,数据采样是事实发生的信号是当前发生
不是向前,或向后漂移。使用上不存在未来
这个是主图,也是量学的精华部分,更与势密切相关。看案列贴图
公式源码:
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)2;
AAAB:=(DIF-DEA)260;
起爆:=CROSS(AAAB-REF(AAAB,1),15),COLORRED,LINETHICK2;
DRAWTEXT(起爆,(O+H)/2,'↖暴涨'),COLORCYAN,LINETHICK2;
CC1:=REF(HIGH,5)=HHV(HIGH,25+1);
CC2:=FILTER(CC1,5);
CC3:=BACKSET(CC2,5+1);
HDD:=FILTER(CC3,5);
前高:=REF(H,BARSLAST(HDD)),COLORMAGENTA;
突破前高:=CROSS(C,前高);
倍量2:=VOL>REF(V,1)1.9;
倍量过左峰:=倍量2 AND 突破前高;
DRAWTEXT(倍量过左峰,前高,'倍过左峰');
SXJC:=BARSLAST(CROSS("MACD.DIF","MACD.DEA"))2;
突破左峰:=FILTER(CLOSE AND REF(C,1)<REF(HHV(HIGH,100),1),5) AND EXIST(EVERY(C>EMA(C,120),30),100) AND C/EMA(C,100)<1.5 AND SXJC AND DYNAINFO(17)>0;
DRAWTEXT(突破左峰,H0.98,'突破左峰');
L1A:=LLV(L,10);
起爆点:=(DCLOSE-REF(C,1))/REF(C,1)100;
XG:=CROSS(起爆点,20) OR CROSS(起爆点,18);
L3:=IF(XG,O,L1A0.999),COLORYELLOW;
STICKLINE(XG,L3,L3,100,0),COLORCYAN;
DRAWTEXT(XG,L3,'起爆'),COLORCYAN;
SXJC11:=BARSLAST(CROSS(MA(C,5),MA(C,10)))<2 AND C>MA(C,120);
SXJC21:=BARSLAST(CROSS(MA(V,5),MA(V,10)))<2;
SXJC31:=BARSLAST(CROSS("MACD.DIF","MACD.DEA"))<2;
SXJC1:=SXJC11 AND SXJC21 AND SXJC31;
DRAWTEXT(SXJC1,L*0.97,'←-三金叉'),COLORGREEN;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!