您現在的位置:程序化交易>> 股票公式>> 其他>> 其他軟件公式>>正文內容

長短macd (公式、源碼)[其他軟件公式]

相關標簽:

?

?

原理解析:


?

?來源:程序化99( www.946547.tw )

源碼:

?

?

?

上市日期年:REF(YEAR,BARSCOUNT(C)-1),linethick0,COLORRED;
月:REF(MONTH,BARSCOUNT(C)-1),linethick0,COLORYELLOW;
日:REF(DAY,BARSCOUNT(C)-1),linethick0,COLORCYAN;


DIFF :=( EMA(CLOSE,12) - EMA(CLOSE,26))*2;
DEA:= EMA(DIFF,9);
MACD := 2*(DIFF-DEA), COLORSTICK;


DIFFA := EMA(CLOSE,60) - EMA(CLOSE,130);
DEAA := EMA(DIFFA,45);
FILLRGN(DIFFA>DEAA,DIFFA,DEAA),COLOR3232F0;FILLRGN(DIFFA<DEAA,DIFFA,DEAA),COLORF06232;



PARTLINE(DIFF>REF(DIFF,1),DIFF),linethick2,colorred;
PARTLINE(DIFF<REF(DIFF,1),DIFF),linethick2,colorgreen;
PARTLINE(DIFF>REF(DIFF,1)AND REF(DIFF,1)>0,DIFF),linethick2,colorred;

PARTLINE(DEA>REF(DEA,1),DEA),coloryellow;
PARTLINE(DEA<REF(DEA,1),DEA),coloryellow;

STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR00AAFF;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,6.6,0 ),COLOR00BBFF;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,4.4,0 ),COLOR00CCFF;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,3.3,0 ),COLOR00DDFF;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,2.2,0 ),COLOR00EEFF;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,1.1,0 ),COLOR00FFFF;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR0000AA;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,6.6 ,0 ),COLOR0011BB;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,4.4,0 ),COLOr0022CC;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,3.3 ,0 ),COLOR0033DD;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,2.2 ,0 ),COLOR0044EE;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,1.1 ,0 ),COLOR0055FF;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLOR00AAFF;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,6.6 ,0 ),COLOR00BBFF;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,4.4,0 ),COLOR00CCFF;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,3.3,0 ),COLOR00DDFF;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,2.2 ,0 ),COLOR00EEFF;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,1.1 ,0 ),COLOR00FFFF;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLORFF7700;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,6.6 ,0 ),COLORFF8811;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,4.4,0 ),COLORFFAA22;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,3.3 ,0 ),COLORFFBB33;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,2.2 ,0 ),COLORFFDD44;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,1.1 ,0 ),COLORFFFF55;

PARTLINE(DIFFA>REF(DIFFA,1),DIFFA),linethick1,colorRED;
PARTLINE(DIFFA<REF(DIFFA,1),DIFFA),linethick1,colorGREEN;
PARTLINE(DIFFA>REF(DIFFA,1)AND REF(DIFFA,1)>0,DIFFA),linethick1,colorred;

PARTLINE(DEAA>REF(DEAA,1),DEAA),color00DDDD;
PARTLINE(DEAA<REF(DEAA,1),DEAA),color00DDDD;



DRAWICON(cross(DIFFA,DEAA),DIFFA*1,10);
DRAWICON(cross(DEAA,DIFFA),DEAA*1,11);<!--++ plugin_code qcomic begin--><!--++ plugin_code qcomic end-->

?

公式導入教程: 【通達信公式源碼導入方法教程】 【同花順公式源碼導入方法教程】 【大智慧新一代公式源碼導入方法教程

?

 

有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友

可聯系技術人員 QQ: 262069696  點擊在線交流或微信:cxhjy888 進行 有償收費 編寫!(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)

怎么收費,代編流程等詳情請點擊查閱!

(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)

 


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
  排列五千神机器人软件