关于外汇macd双线指标设置,双线macd指标下载网址这个问题很多朋友还不知道,今天小六来为大家解答以上的问题,现在让我们一起来看看吧!
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、自己设一下颜色属性啥的 其实指标没多大用。
本文分享完毕,希望对大家有所帮助。
标签:
免责声明:本文由用户上传,如有侵权请联系删除!