股票投资

发布资金信息 发布项目融资 申请上市辅导 发布金融峰会 发布文章资讯

MACD实战量化交易指标,新手入市一用就会,轻松盈利!(附公式)

   时间:2018-05-20 08:26:23     浏览:63760    评论:0    
核心提示:小使者想了想,大家都学炒股技术去了,是不是也得学习人生的大道理呢,以后小使者尽量给大家分享一些有大道理的小故事,简单易懂,让大家的炒股技术以及人生感悟同步提高!嗯,就这么决定了~~【小故事】小马走进餐馆,点了一份汤。不多久,服务员将一碗热气腾腾的汤送上。服务员才转身,小马就大声嚷嚷:“对不起,这汤我没

小使者想了想,大家都学炒股技术去了,是不是也得学习人生的大道理呢,以后小使者尽量给大家分享一些有大道理的小故事,简单易懂,让大家的炒股技术以及人生感悟同步提高!嗯,就这么决定了~~

【小故事】

小马走进餐馆,点了一份汤。不多久,服务员将一碗热气腾腾的汤送上。服务员才转身,小马就大声嚷嚷:“对不起,这汤我没法喝。”服务员重新换上一碗,小马还是那句话:“对不起,这汤我没法喝。”经理过来了,他毕恭毕敬地向小马道歉:“这汤是我们店最拿手的。不过,我们欢迎您提宝贵意见……”“我是说,调羹在哪里?”

启示:不说拐弯抹角的话。遇到了不想说、不好说、不能说的话,可以委婉地说,含蓄地说,但前提是能让对方领会弦外之音,从而心知肚明。否则,爱怎么拐弯就怎么拐弯,拐得不好,弯得不顺,最美妙的话语也是白费唇舌,还容易让人迷了方向,一误再误。说话毕竟不是猜谜,有的话不直说,能明说偏暗说,果真出了乱子,酿成大祸,就不是“没法喝汤”这么狼狈了。

没有资金管理的交易就像没有刹车的汽车,交易没有百分百成功的信号,所以要用资金管理控制损失 ,最大损失固定的情况下 ,每次交易你就不会忐忑患得患失。坚决执行信号,尽量尾盘买,这样一天的收盘价格基本固定了。MACD金叉买入死叉卖出 ,未来什么价位,MACD就是金叉死叉,图表已经清晰标注,这个就是交易买卖的基石,优化分类MACD的金叉增加可靠信号,尽量只做红烛 ,一笔交易从金叉到死叉,计算最大亏损5000元的情况下可以买的股数 ,结合MACD变色副图指标,效果翻倍,废话不多说,直接看图解!

0轴下的金叉死叉都视为反弹

MACD实战量化交易指标,新手入市一用就会,轻松盈利!(附公式)

没有百分之百成功的交易信号

通达信量化MACD实战交易主图源码

参数设置图

参数设置图

DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);

DEA:=EMA(DIF,M);

MACD:=2*(DIF-DEA),STICK;

多空分界:MA(C,50),LINETHICK1,COLORCYAN,POINTDOT;

{IF(多空分界>REF(多空分界,1),多空分界,DRAWNULL), COLORRED,LINETHICK1;}

TOZ:=MA(C,50),COLORYELLOW,DOTLINE;

TMACD:=MA(C,50)+(MACD.MACD)*3;

HD0:=CROSS(DIF,DEA);

金收:=REF(L,BARSLAST(HD0)),COLORYELLOW,DOTLINE;

DRAWNUMBER(ISLASTBAR,金收,金收),COLORCYAN;

LD0:=CROSS(DEA,DIF);

死收:REF(H,BARSLAST(LD0)),COLOR00FF00,DOTLINE;

JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));{计算出金叉死叉时的DIFF值}

DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF值}

DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORYELLOW,LINETHICK1;

柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORWHITE,LINETHICK1;

DRAWBAND(DIF拐头价,RGB(250,250,0),DIF拐头价,RGB(0,0,0));

DRAWBAND(IF(柱变向价>DIF拐头价,柱变向价,DRAWNULL),RGB(250,0,0),柱变向价,RGB(0,0,0));

黄铢消失见顶:=IF(柱变向价>=DIF拐头价,DIF拐头价,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;

金叉:=IF(柱变向价>=DIF拐头价,多空分界,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;

金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORCYAN,NODRAW;

MACD走平时股价:=(((M+1)*(2*REF(DEA,1)*(M-1)+REF(MACD,1)*(M+1)))/(2*(M+1)*(M-1))+(REF(EMA(C,26),1)*(26-1)/(26+1))-(REF(EMA(C,12),1)*(12-1)/(12+1)))*(12+1)*(26+1)/(2*(26-12));

{DRAWNUMBER(DIF>DEA,TOZ,BARSLAST(CROSS(DIF,DEA))+1),COLORRED;

DRAWNUMBER(DIF

ES:=REF(EMA(C,26),1);

EP:=REF(EMA(C,12),1);

DI:=REF(DIF,1);

DIF穿零价:((12+1)*(26-1)*ES-(26+1)*(12-1)*EP)/(2*(26+1)-2*(12+1)),NODRAW,COLORWHITE;

{DRAWTEXT_FIX(1,0.6,0.94,0,STRCAT('DIF拐头价: ',CON2STR(DIF拐头价,2))),COLORYELLOW;

DRAWTEXT_FIX(1,0.7,0.94,0,STRCAT('柱变向价: ',CON2STR(柱变向价,2))),COLORRED;

DRAWTEXT_FIX(1,0.5,0.94,0,STRCAT('DIF穿零价: ',CON2STR(DIF穿零价,2))),COLORRED;}

DRAWTEXT_FIX(1,0.7,0.01,0,STRCAT('金死叉价: ',CON2STR(金死叉价,2))),COLORCYAN;

ZJ:=DIF>DEA;

HY:=DIF

XG1:=ZJ AND C>死收 AND C>多空分界;

STICKLINE(XG1,L,H,0,0),COLOR0000AA;

STICKLINE(XG1,CLOSE,OPEN,3,0),COLOR000055;

STICKLINE(XG1,CLOSE,OPEN,2.8,0),COLOR000066;

STICKLINE(XG1,CLOSE,OPEN,2.5,0),COLOR000077;

STICKLINE(XG1,CLOSE,OPEN,2.2,0),COLOR000088;

STICKLINE(XG1,CLOSE,OPEN,1.7,0),COLOR000099;

STICKLINE(XG1,CLOSE,OPEN,1.2,0),COLOR0000AA;

STICKLINE(XG1,CLOSE,OPEN,0.7,0),COLOR0000CC;

STICKLINE(XG1,CLOSE,OPEN,0.2,0),COLOR0000FF;

W1:= C<死收 AND ZJ;

STICKLINE(W1,H,L,0,1),COLORFF55FF;

STICKLINE(W1,C,O,3.2,0),COLOR880088;

STICKLINE(W1,C,O,2.6,0),COLORAA00AA;

STICKLINE(W1,C,O,1.9,0),COLORCC00CC;

STICKLINE(W1,C,O,1.1,0),COLOREE00EE;

STICKLINE(W1,C,O,0.3,0),COLORFF44FF;

W2:= C<多空分界 AND ZJ;

STICKLINE(W2,H,L,0,1),COLORFF55FF;

STICKLINE(W2,C,O,3.2,0),COLOR880088;

STICKLINE(W2,C,O,2.6,0),COLORAA00AA;

STICKLINE(W2,C,O,1.9,0),COLORCC00CC;

STICKLINE(W2,C,O,1.1,0),COLOREE00EE;

STICKLINE(W2,C,O,0.3,0),COLORFF44FF;

XG2:=C

STICKLINE(XG2,H,L,0,0),COLOR00FF00;

STICKLINE(XG2,C,O,3,0),COLOR009900;

STICKLINE(XG2,C,O,2,0),COLOR00BB00;

STICKLINE(XG2,C,O,1,0),COLOR00DD00;

STICKLINE(XG2,C,O,0.3,0),COLOR00FF00;

XG3:=C>DIF拐头价 AND HY;

STICKLINE(XG3,H,L,0,0),COLOR00FF00;

STICKLINE(XG3,C,O,3,0),COLOR009900;

STICKLINE(XG3,C,O,2,0),COLOR00BB00;

STICKLINE(XG3,C,O,1,0),COLOR00DD00;

STICKLINE(XG3,C,O,0.3,0),COLOR00FF00;

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;

K:SMA(RSV,3,1),COLORWHITE,LINETHICK1,NODRAW;

D:SMA(K,3,1),COLORYELLOW,LINETHICK1,NODRAW;

LC:=REF(CLOSE,1);

RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;

IF(COUNT(RSI1>80,3)=3,H,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK8;

IF(COUNT(RSI1<20,3)=3,L,DRAWNULL),POINTDOT,COLORYELLOW,LINETHICK8;

IF(COUNT(K>80,3)=3,H,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK5;

IF(COUNT(K<20,3)=3,L,DRAWNULL),POINTDOT,COLORFF33FF,LINETHICK5;

今日空间:=C-REF(金死叉价,1)COLORGREEN,NODRAW;

尾盘空间:C-金死叉价,NODRAW;

{DRAWTEXT_FIX(1,0.4,0.09,0,STRCAT('今日浮动空间: ',CON2STR(今日空间,2))),COLORCYAN;}

DRAWTEXT_FIX(1,0.6,0.09,0,STRCAT('尾盘5分钟差值: ',CON2STR(尾盘空间,2))),COLORCYAN;

A0:=最大亏损;

今日开仓:=A0/今日空间,NODRAW;

尾盘开仓:A0/尾盘空间,NODRAW;

DRAWTEXT_FIX(ISLASTBAR,0.0,0.09,0.0,'资金管理:单笔最大损失确定的情况下交易更从容')COLORRED;

DRAWTEXT_FIX(1,0.7,0.09,0,STRCAT('尾盘最大开仓股数: ',CON2STR(尾盘开仓,2))),COLORMAGENTA;

 
打赏
 
更多>同类股票投资
0相关评论

推荐图文
推荐股票投资
点击排行
网站地图 | 广告服务 | RSS订阅 | 友情链接 | 联系我们
Copyright © 2006-2018 股票投资 Inc. All rights reserved.
粤ICP备16012416号
联系我们
QQ咨询
电话咨询
email
在线留言
微信联系
返回顶部