關(guān)于外匯macd雙線指標(biāo)設(shè)置,雙線macd指標(biāo)下載網(wǎng)址這個問題很多朋友還不知道,今天小六來為大家解答以上的問題,現(xiàn)在讓我們一起來看看吧!
1、#property link "" #property indicator_buffers 3 #property indicator_separate_window #property indicator_color1 LightGray //#property indicator_color2 Red //#property indicator_color3 Blue //---- buffers double Buffer1[]; double Buffer2[]; double Buffer3[]; extern int Fast = 12; extern int Slow = 26; extern int Signal = 9; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //IndicatorBuffers(4); SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2); //SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1); //SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1); SetIndexBuffer(0,Buffer3); SetIndexBuffer(1,Buffer2); SetIndexBuffer(2,Buffer1); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- TODO: add your code here //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- TODO: add your code here for(int i=Bars;i>=0;i--){ Buffer1[i]=iMACD(NULL,0,Fast,Slow,Signal,PRICE_CLOSE,MODE_MAIN,i); Buffer2[i]=iMACD(NULL,0,Fast,Slow,Signal,PRICE_CLOSE,MODE_SIGNAL,i); Buffer3[i]=Buffer1[i] - Buffer2[i]; } //---- return(0); } //+------------------------------------------------------------------+ 粘貼到MT4里面。
2、自己設(shè)一下顏色屬性啥的 其實(shí)指標(biāo)沒多大用。
本文分享完畢,希望對大家有所幫助。
標(biāo)簽:
免責(zé)聲明:本文由用戶上傳,如有侵權(quán)請聯(lián)系刪除!