交易之道2024 建立自己的交易体系和风格 主副图 源码分享 附图


{引用MACD源码如下:}
DIF:=(EMA(CLOSE,4)-EMA(CLOSE,12));
DEA:=EMA(DIF,7);
MACD:=(DIF-DEA)*2;
TS:BARSLASTCOUNT(EXIST(CROSS(DIF,DEA),12) AND (DIF>0 OR CROSS(DIF,0)));


{主升MACD源码如下:}


DRAWGBK(O>C,RGB(40,40,40),RGB(0,0,10),0,'01',0);
周DB:="MACD.DIF#WEEK",COLORRED;
周AB:="MACD.DEA#WEEK",COLORRED;

月DB:="MACD.DIF#MONTH",COLOR0080FF;
月AB:="MACD.DEA#MONTH",COLOR0080FF;

NOTEXTDIF5:=EMA(CLOSE,12)-EMA(CLOSE,26);
NOTEXTDEA5:=EMA(NOTEXTDIF5,9);
NOTEXTMACD:=2*(NOTEXTDIF5-NOTEXTDEA5),COLORSTICK;

月金叉3红箭:CROSS(月DB,月AB),NODRAW,COLORMAGENTA;

DRAWGBK_DIV(月金叉3红箭,RGB(0,0,0),RGB(140,10,30),0,0);


SBL:= STRCAT(STRCAT(STRCAT(HYBLOCK,DYBLOCK),GNBLOCK),ZDBLOCK);
DRAWTEXT_FIX(1,0,0,0,SBL),COLOR0090FF;


DIF:EMA(CLOSE,12)-EMA(CLOSE,26) COLORRED;
DEA:EMA(DIF,9) COLORGREEN;
MACD:(DIF-DEA)*2,COLORSTICK;


买线1:=LLV(MA(((C+L+O+H)/4),10),5);
卖线:=HHV(MA(((C+L+O+H)/4),5),5);
倍:=(卖线+买线1)/2;
涨停价:=ZTPRICE(REF(C,1),0.1) NODRAW;
跌停价:=DTPRICE(REF(C,1),0.1) NODRAW;
注:=CROSS(C,倍) NODRAW;


试:=H>=倍 AND C<倍 AND (C>=O OR C>=REF(CLOSE,1)) NODRAW;
价:(卖线+买线1)/2 NODRAW;
涨停:=CLOSE/REF(CLOSE,1)>=1.095;



DIF4:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA4:=EMA(DIF4,9);
ZTB:=C>INTPART(REF(C,1)*(1+10/100)/0.01+0.5)*0.01-0.006 AND C=H;
启动版:=DIF4>-0.2 AND DIF4<0.35 AND
ZTB AND REF(ZTB,1)<1
AND COUNT(DIF>=-0.01,5)=5;

启动版1:=DIF4>-0.25 AND DIF4<0.25 AND ZTB AND REF(ZTB,1)<1 AND COUNT(DIF>=-0.01 OR DIF<=0.01,5)=5;

DRAWICON(启动版1,0,1);




{MACD量王线}
总量:=AMOUNT,VOLSTICK;
量比:=V/REF(MA(V,5),1),COLORBROWN,NODRAW;
几倍:=1.9;
倍量:=总量 >=REF(总量,1)*几倍 AND (IF(C<O,C>REF(C,1),1)),COLORYELLOW,NODRAW;
天量:=总量=HHV(总量,120), COLORRED;
量王:=天量&&倍量&&量比>2&&(BARSCOUNT(C)+1)>120,COLORGREEN, NODRAW;
量王线:DRAWLINE(量王,MACD,REF(量王,1),REF(MACD,1),1),COLORGREEN,DOTLINE;





A111:=C>REF(C,4);
NT:=BARSLASTCOUNT(A111);
TJ11:=NT=9;
TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);
AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;
DRAWTEXT(AY>0,MACD*1.02,VAR2STR(AY,0)),COLORA67D3D;
DRAWTEXT(NT=9,MACD*1.02,'9'),COLORGREEN;
B1:=C<REF(C,4);
NT0:=BARSLASTCOUNT(B1);
TJ21:=NT0=9 ;
TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);
AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;
DRAWTEXT(AY1>0,MACD*0.98,VAR2STR(AY1,0)),COLORA67D3D ;
DRAWTEXT(NT0=9,MACD*0.98,'9'),COLORRED;



MACD120:REF(MACD/2,BARSLAST(MACD=HHV(MACD,120))),COLORA67D3D ,LINETHICK1;
MACD250:=REF(MACD/2,BARSLAST(MACD=HHV(MACD,250))),COLOR545454 ,NODRAW;
XG:=NOT(REF(MACD120,1)=MACD120);
STICKLINE(XG,0,MACD,0,0),COLORYELLOW;
STICKLINE(MACD>=MACD250,MACD250,MACD,0,0),COLORMAGENTA;


大行情:=NOT(REF(MACD120,1)=REF(MACD250,1)) AND MACD120=MACD250;


DRAWICON(大行情,0,11);

分界:=EMA(COST(85),10){,PRECISION2,LINEDOT},COLORRED;


ZTB2:=C>INTPART(REF(C,1)*(1+10/100)/0.01+0.5)*0.01-0.006 AND C=H;
启动:=DIF>-0.2 AND DIF<0.35 AND
ZTB2 AND REF(ZTB2,1)<1
AND COUNT(DIF>=-0.01,5)=5;VAB0:=13;


{梯量3}
涨幅:=(C-REF(C,1))/REF(C,1)*100;
梯量9:=EVERY(C>O,3) AND EVERY(C>REF(C,1),2) AND EVERY(V>REF(V,1),2) AND SUM(涨幅,3)<15;
梯量4:=REF(梯量9,1) AND C>=REF(C,1);
BK:=BARSLAST(CURRBARSCOUNT=CONST(BARSLAST(FILTER(梯量9,2)))+1),LINETHICK1,COLORD355BA;
BK1:=REF(BK,1);
T3:REF(H,BK),LINETHICK1,COLORD355BA,NODRAW;
FK:=BARSLAST(CURRBARSCOUNT=CONST(BARSLAST(REF(FILTER(梯量4,3),3)))+1),NODRAW;
T7:=REF(L,FK),COLORC0C0C0 ;
AA:=FILTER(梯量9,2),NODRAW;
ZT:=(C-REF(C,1))/REF(C,1)>0.092;
AB:=COUNT(梯量9=1,50 )>=1 AND (REF(C,1)<T3 OR REF(C,2)<T3 OR REF(C,3)<T3 ) AND ZT AND( CROSS(C,T3) OR C>T3) AND DIF>0 AND DEA>0 AND C>分界;
XG15:AB*0.1,COLORGREEN,LINETHICK2;

T33:=REF(H,BARSLAST(FILTER(梯量9,2)));
墨轩首板:=T33 AND 启动;
XG16:墨轩首板*0.05,COLORRED,LINETHICK2;

DIFF:=( EMA(CLOSE,12) - EMA(CLOSE,26));
日金叉:=IF(CROSS(DIF,DEA),1,0);
日零轴上:=IF(DEA>0,1,0);
日MACD买点:=(日金叉*日零轴上)>0;


A:="MACD.DIF#WEEK";
B:="MACD.DEA#WEEK";
周金叉:=IF(CROSS(A,B),1,0);
周零轴上:=IF(B>0,1,0);
周MACD买点:=(周金叉*周零轴上)>0,COLORYELLOW,LINETHICK2;

DRAWTEXT(周MACD买点,0,'金'),COLORGREEN;



股东占流通比:=FINVALUE(244)/FINVALUE(239),NODRAW;{十大流通股东/流通}
历史衰退系数:1/(1-股东占流通比),NODRAW;


NE:=IF(FINANCE(3)=3 OR FINANCE(3)=4,0.2,0.1);
ZT5:=C+0.01>=ZTPRICE(REF(C,1),NE) AND C=H;
BS:=BARSLASTCOUNT(ZT5);
MTS:=引用MACD.TS#MONTH;
WTS:=引用MACD.TS#WEEK;
ZF:=(C/REF(C,1)-1)*100;
周金叉达标:=FILTER(WTS>=1 AND BS<=3 AND ZF>9,5);
月金叉达标:=FILTER(MTS>=1 AND BS<=3 AND ZF>9,5);
DRAWICON(月金叉达标,0,23);
DRAWICON(周金叉达标,0.1,41);


未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:COST
该公式包含未来函数:FINANCE
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图