人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

您現在的位置:程序化交易>> 期貨公式>> 博易大師>> 博易大師知識>>正文內容

請問怎么把MT4的MACD單線指標修改成博易的指標;謝謝 [博易POBO]

咨詢內容:

請問怎么把MT4的MACD單線指標修改成博易的指標;謝謝

//+------------------------------------------------------------------+
//|????????????????????????????????????????????????? Custom MACD.mq4 |
//|?????????????????? Copyright 2005-2014, MetaQuotes Software Corp. |
//|????????????????????????????????????????????? http://www.mql4.com |
//+------------------------------------------------------------------+
#property copyright?? "2005-2014, MetaQuotes Software Corp."
#property link??????? "http://www.mql4.com"
#property description "Moving Averages Convergence/Divergence"
#property strict

#include <MovingAverages.mqh>

//--- indicator settings
#property? indicator_separate_window
#property? indicator_buffers 2
#property? indicator_color1? Silver
#property? indicator_color2? Red
#property? indicator_width1? 2
//--- indicator parameters
input int InpFastEMA=12;?? // Fast EMA Period
input int InpSlowEMA=26;?? // Slow EMA Period
input int InpSignalSMA=9;? // Signal SMA Period
//--- indicator buffers
double??? ExtMacdBuffer[];
double??? ExtSignalBuffer[];
//--- right input parameters flag
bool????? ExtParameters=false;

//+------------------------------------------------------------------+
//| Custom indicator initialization function???????????????????????? |
//+------------------------------------------------------------------+
int OnInit(void)
? {
?? IndicatorDigits(Digits+1);
//--- drawing settings
?? SetIndexStyle(0,DRAW_HISTOGRAM);
?? SetIndexStyle(1,DRAW_LINE);
?? SetIndexDrawBegin(1,InpSignalSMA);
//--- indicator buffers mapping
?? SetIndexBuffer(0,ExtMacdBuffer);
?? SetIndexBuffer(1,ExtSignalBuffer);
//--- name for DataWindow and indicator subwindow label
?? IndicatorShortName("MACD("+IntegerToString(InpFastEMA)+","+IntegerToString(InpSlowEMA)+","+IntegerToString(InpSignalSMA)+")");
?? SetIndexLabel(0,"MACD");
?? SetIndexLabel(1,"Signal");
//--- check for input parameters
?? if(InpFastEMA<=1 || InpSlowEMA<=1 || InpSignalSMA<=1 || InpFastEMA>=InpSlowEMA)
???? {
????? Print("Wrong input parameters");
????? ExtParameters=false;
????? return(INIT_FAILED);
???? }
?? else
????? ExtParameters=true;
//--- initialization done
?? return(INIT_SUCCEEDED);
? }
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence?????????????????????????? |
//+------------------------------------------------------------------+
int OnCalculate (const int rates_total,
???????????????? const int prev_calculated,
???????????????? const datetime& time[],
???????????????? const double& open[],
???????????????? const double& high[],
???????????????? const double& low[],
???????????????? const double& close[],
???????????????? const long& tick_volume[],
???????????????? const long& volume[],
???????????????? const int& spread[])
? {
?? int i,limit;
//---
?? if(rates_total<=InpSignalSMA || !ExtParameters)
????? return(0);
//--- last counted bar will be recounted
?? limit=rates_total-prev_calculated;
?? if(prev_calculated>0)
????? limit++;
//--- macd counted in the 1-st buffer
?? for(i=0; i<limit; i++)
????? ExtMacdBuffer[i]=iMA(NULL,0,InpFastEMA,0,MODE_EMA,PRICE_CLOSE,i)-
??????????????????? iMA(NULL,0,InpSlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
//--- signal line counted in the 2-nd buffer
?? SimpleMAOnBuffer(rates_total,prev_calculated,0,InpSignalSMA,ExtMacdBuffer,ExtSignalBuffer);
//--- done
?? return(rates_total);
? }
//+------------------------------------------------------------------+

?

?來源:程序化99網( www.kzuj.com.cn )

博易技術人員: DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA ?:= EMA(DIFF,9);?
MACD : DIFF-DEA, COLORSTICK; 謝謝回復,但是效果還不一樣,我想dea線在零軸下方,紅綠柱也在零柱下方,dea線在零軸上方,紅綠柱也在零柱上方,圖片中的效果 來源 程序化久久網

 

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

可聯系技術人員 QQ: 262069696  點擊在線交流或微信號:cxh99cxh99  進行 有償收費 編寫!

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

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 最近的2019中文字幕免费一页 | 亚洲国产综合精品 | 国产福利免费视频 | 婷婷开心激情网 | 欧美日韩一区二区在线视频播放 | 动漫无遮羞视频免费网站 | 草的爽免费视频 | 小明台湾www永久视频 | v视界影院视频一区二区三区 | 狠日日 | 日本一道高清 | 国产网曝手机视频在线观看 | 高跟丝袜hdvideossex| 高清国语自产拍免费视频国产 | 日本黄色链接 | 热久久国产欧美一区二区精品 | 欧美成人精品不卡视频在线观看 | 91桃色国产线观看免费 | 91短视频版高清在线观看免费 | 高清午夜线观看免费 | 日韩精品视频免费观看 | 国产一级一片免费播放刺激 | 日本 欧美 国产 | 中文字幕成人免费高清在线视频 | 亚洲欧美日韩国产vr在线观 | aaaa黄色片 | 国产三级国产精品国产普男人 | 一级做a爰片欧美一区 | 免费一级 一片一毛片 | 日本hdxxxxx护士a | 又色又爽又黄的视频女女高清 | 麻豆精品成人免费国产片 | 国产成人亚洲精品 | 欧美日韩大片在线观看 | 国产精品久久久久久久专区 | 一级人做人a爰免费视频 | 美国一级大黄香蕉片 | 成人欧美在线视频 | 久久亚洲国产高清 | 人成午夜视频 | 亚洲国产精品二区久久 |