Color MACD Indicator For MT5
Table Of Contents:
- Color MACD Indicator For MT5
- Color MACD Indicator For MT5 स्थापित करना
- Color MACD Indicator For MT5 पैरामीटर
- Color MACD Indicator For MT5 के Color MACD Indicator For MT5
- संहिता के मुख्य भाग
Color MACD Indicator For MT5 हिस्टोग्राम सबविंडो पर रंगीन एमएसीडी खींचता है। एक विशेष सुविधा के रूप में आप एमएसीडी के लिए एक औसत / स्मूथिंग एल्गोरिदम चुन सकते हैं। हिस्टोग्राम के रंग मूल्यों पर निर्भर करते हैं। बढ़ती मूल्यों पर सिग्नल लाइन हरी है। घटते मूल्यों पर सिग्नल लाइन लाल है।
Color MACD Indicator For MT5 स्थापित करना
आपके द्वारा उपर्युक्त फ़ॉर्म के माध्यम से संकेतक डाउनलोड करने के बाद आपको ज़िप-फ़ाइल को अनज़िप करना होगा। तो फिर तुम फाइल कॉपी करने की जरूरत है colormacd.mq5 फ़ोल्डर में MQL5Indicators अपने की MT5 स्थापना। उसके बाद कृपया MT5 को पुनः आरंभ करें और फिर आप संकेतक की सूची में संकेतक देख पाएंगे।
Color MACD Indicator For MT5 पैरामीटर
Color MACD Indicator For MT5 पास कॉन्फ़िगर करने के लिए 5 पैरामीटर हैं।
input int Fast_MA = 12; //Fast moving average period input int Slow_MA = 26; //SMMA smoothing depth input ENUM_MA_METHOD MA_Method_=MODE_EMA; //Indicator averaging method input int Signal_SMA=9; //Signal line period input Applied_price_ AppliedPrice=PRICE_CLOSE_;//Price constant
Color MACD Indicator For MT5 के Color MACD Indicator For MT5
Color MACD Indicator For MT5 4 बफ़र्स प्रदान करता है।
SetIndexBuffer(0,MACDBuffer,INDICATOR_DATA); SetIndexBuffer(1,ColorMACDBuffer,INDICATOR_COLOR_INDEX); SetIndexBuffer(2,SignBuffer,INDICATOR_DATA); SetIndexBuffer(3,ColorSignBuffer,INDICATOR_COLOR_INDEX);
संहिता के मुख्य भाग
int OnCalculate( const int rates_total, // number of bars in history at the current tick const int prev_calculated,// number of bars calculated at previous call 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[] ) { //---- Checking the number of bars to be enough for the calculation if(rates_total lt start) return(0); //---- Declaration of integer variables int first1,first2,first3,bar; //---- Declaration of variables with a floating point double price_,fast_ma,slow_ma; //---- Initialization of the indicator in the OnCalculate() block if(prev_calculated gt rates_total || prev_calculated lt =0)// checking for the first start of calculation of an indicator { first1=0; // starting number for calculation of all first loop bars first2=macd_start+1; // starting number for calculation of all second loop bars first3=start+1; // starting number for calculation of all third loop bars } else // starting number for calculation of new bars { first1=prev_calculated-1; first2=first1; first3=first1; } //---- declaration of variables of the CMoving_Average class from the file MASeries_Cls.mqh static CMoving_Average MA1,MA2,MA3; //---- Main loop of the indicator calculation for(bar=first1; bar lt rates_total; bar++) { price_=PriceSeries(AppliedPrice,bar,open,low,high,close); fast_ma = MA1.MASeries(0, prev_calculated, rates_total, Fast_MA, MA_Method_, price_, bar, false); slow_ma = MA2.MASeries(0, prev_calculated, rates_total, Slow_MA, MA_Method_, price_, bar, false); MACDBuffer[bar]=fast_ma-slow_ma; SignBuffer[bar]=MA3.SMASeries(macd_start,prev_calculated,rates_total,Signal_SMA,MACDBuffer[bar],bar,false); } //---- Main loop of the MACD indicator coloring for(bar=first2; bar lt rates_total; bar++) { ColorMACDBuffer[bar]=0; if(MACDBuffer[bar] gt 0) { if(MACDBuffer[bar] gt MACDBuffer[bar-1]) ColorMACDBuffer[bar]=1; if(MACDBuffer[bar] lt MACDBuffer[bar-1]) ColorMACDBuffer[bar]=2; } if(MACDBuffer[bar] lt 0) { if(MACDBuffer[bar] lt MACDBuffer[bar-1]) ColorMACDBuffer[bar]=3; if(MACDBuffer[bar] gt MACDBuffer[bar-1]) ColorMACDBuffer[bar]=4; } } //---- Main loop of the signal line coloring for(bar=first3; bar lt rates_total; bar++) { ColorSignBuffer[bar]=0; if(MACDBuffer[bar] gt SignBuffer[bar-1]) ColorSignBuffer[bar]=1; if(MACDBuffer[bar] lt SignBuffer[bar-1]) ColorSignBuffer[bar]=2; } //---- return(rates_total); } //+------------------------------------------------------------------+