Bollinger bands breakout Indicator For MT5

Bollinger bands breakout Indicator For MT5

Bollinger bands breakout Indicator For MT5 ทำงานบนแนวคิดที่ง่ายมาก ก่อนอื่นแถบถูกสร้างขึ้นด้วยความช่วยเหลือของการคำนวณค่าเฉลี่ยเคลื่อนที่อย่างง่ายพร้อมกับส่วนเบี่ยงเบนมาตรฐาน โดยการสังเกตแผนภูมิราคาอย่างใกล้ชิดคุณจะสังเกตเห็นเครื่องหมายเล็ก ๆ ที่แถบบนและล่างเมื่อราคาลดลง

ตลาดจะเสร็จสิ้นเมื่อราคาปิดเหนือระดับ Bollinger แต่ผู้ค้าควรเลือกกรอบเวลาอย่างรอบคอบโดยพิจารณาจากความผันผวนของตลาดเนื่องจากมีหลายอย่างขึ้นอยู่กับมัน ตัวอย่างเช่นหากความผันผวนสูงกว่าจำเป็นต้องพึ่งพากรอบเวลาที่ใหญ่กว่าเช่น D1 หรือรายสัปดาห์

ในทางตรงกันข้ามเมื่อความผันผวนสิ้นสุดลงผู้ค้าจะต้องดูข้อมูลกรอบเวลาที่มีขนาดเล็กลง แต่ผู้ใช้กรอบเวลาที่น้อยลงควรใช้สัญญาณการเคลื่อนไหวของราคา หากพวกเขาทำเช่นนั้นพวกเขาจะจัดการกับสัญญาณเท็จมากเกินไป และระวังข้อมูลข่าวสำคัญเสมอเนื่องจากการฝ่าวงล้อมครั้งใหญ่เกิดขึ้นในเหตุการณ์ทางการเงินที่สำคัญ

FREE Bollinger bands breakout Indicator

Download the FREE Bollinger bands breakout Indicator for MT5.

To receive my email 100% sure: 
Put my email on your whitelist!

 

Partially Automated Trading Besides Your Day Job

Alerts In Real-Time When Divergences Occur

 

การติดตั้ง Bollinger bands breakout Indicator For MT5

หลังจากคุณดาวน์โหลดตัวบ่งชี้ผ่านแบบฟอร์มด้านบนคุณจะต้องทำการแตกไฟล์ zip จากนั้นคุณต้องคัดลอกไฟล์ Bollinger bands breakout.mq5 ลงในโฟลเดอร์ MQL5Indicators ของการติดตั้ง MT5 ของคุณ หลังจากนั้นโปรดรีสตาร์ท MT5 จากนั้นคุณจะเห็นตัวบ่งชี้ในรายการตัวบ่งชี้

พารามิเตอร์ของ Bollinger bands breakout Indicator For MT5

กระบวนการ Bollinger bands breakout Indicator For MT5 มีพารามิเตอร์ 5 เพื่อกำหนดค่า

input int                 inpPeriod       = 20;          // Bollinger bands period
input ENUM_APPLIED_PRICE  inpPrice        = PRICE_CLOSE; // Price
input double              inpDeviations   = 2.5;         // Bollinger bands deviations
input double              inpZonesPercent = 20;          // Zones percent
input enDevType           inpDevType      = dev_regular; // Standard deviations type

บัฟเฟอร์ของ Bollinger bands breakout Indicator For MT5

Bollinger bands breakout Indicator For MT5 ให้บัฟเฟอร์ 9

SetIndexBuffer(0,fupu    ,INDICATOR_DATA);
SetIndexBuffer(1,fupd    ,INDICATOR_DATA);
SetIndexBuffer(2,fdnu    ,INDICATOR_DATA);
SetIndexBuffer(3,fdnd    ,INDICATOR_DATA);
SetIndexBuffer(4,bufferUp,INDICATOR_DATA);
SetIndexBuffer(5,bufferDn,INDICATOR_DATA);
SetIndexBuffer(6,bufferMe,INDICATOR_DATA);
SetIndexBuffer(7,breakup ,INDICATOR_DATA); PlotIndexSetInteger(5,PLOT_ARROW,217); PlotIndexSetInteger(5,PLOT_ARROW_SHIFT,-10);
SetIndexBuffer(8,breakdn ,INDICATOR_DATA); PlotIndexSetInteger(6,PLOT_ARROW,218); PlotIndexSetInteger(6,PLOT_ARROW_SHIFT, 10);

ส่วนหลักของรหัส

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 _copyCount = rates_total-prev_calculated+1; if (_copyCount gt rates_total) _copyCount=rates_total;
         if (CopyBuffer(_maHandle,0,0,_copyCount,bufferMe)!=_copyCount) return(prev_calculated);

   //
   //---
   //

   int i= prev_calculated-1; if (i lt 0) i=0; for (; i lt rates_total && !_StopFlag; i++)
   {
      double price; _setPrice(inpPrice,price,i);
      double deviation = iStdDeviation.calculate(price,i,rates_total);
      
      //
      //---
      //

      bufferUp[i] = bufferMe[i]+deviation*inpDeviations;
      bufferDn[i] = bufferMe[i]-deviation*inpDeviations;
      fupd[i]     = bufferMe[i]+deviation*inpDeviations*_bandsFillZone; fupu[i] = bufferUp[i]; 
      fdnu[i]     = bufferMe[i]-deviation*inpDeviations*_bandsFillZone; fdnd[i] = bufferDn[i]; 
      breakup[i]  = (close[i] gt bufferUp[i]) ? high[i] : EMPTY_VALUE;
      breakdn[i]  = (close[i] lt bufferDn[i]) ? low[i]  : EMPTY_VALUE;
   }         
   return(i);         
}

//------------------------------------------------------------------
// Custom function(s)
//------------------------------------------------------------------
//
//---
//

class cStdDeviation
{
   private :
      int    m_period;
      double m_periodDiv;
      int    m_arraySize;
      bool   m_isSample;
         struct sStdStruct
         {
            double price;
            double price2;
            double sum;
            double sum2;
         };
      sStdStruct m_array[];
   public:
      cStdDeviation() : m_arraySize(-1) {  }
     ~cStdDeviation()                   { ArrayFree(m_array); }

      ///
      ///
      ///

      void init(int period, bool isSample)
      {
         m_period    = (period gt 1) ? period : 1;
         m_isSample  = isSample;
         m_periodDiv = MathMax(m_period-m_isSample,1);
      }
      
      double calculate(double price, int i, int bars)
      {
         if (m_arraySize lt bars) {m_arraySize=ArrayResize(m_array,bars+500); if (m_arraySize lt bars) return(0); }

            //
            //
            //
            
            m_array[i].price =price;
            m_array[i].price2=price*price;
            
            //
            //---
            //
            
            if (i gt m_period)
            {
               m_array[i].sum  = m_array[i-1].sum +m_array[i].price -m_array[i-m_period].price;
               m_array[i].sum2 = m_array[i-1].sum2+m_array[i].price2-m_array[i-m_period].price2;
            }
            else  
            {
               m_array[i].sum  = m_array[i].price;
               m_array[i].sum2 = m_array[i].price2; 
               for(int k=1; k lt m_period && i gt =k; k++) 
               {
                  m_array[i].sum  += m_array[i-k].price; 
                  m_array[i].sum2 += m_array[i-k].price2; 
               }                  
            }         
            return (MathSqrt((m_array[i].sum2-m_array[i].sum*m_array[i].sum/(double)m_period)/m_periodDiv));
      }
};
cStdDeviation iStdDeviation;

//
//---
//

bool _checkHandle(int _handle, string _description)
{
   static int  _chandles[];
          int  _size   = ArraySize(_chandles);
          bool _answer = (_handle!=INVALID_HANDLE);
          if  (_answer)
               { ArrayResize(_chandles,_size+1); _chandles[_size]=_handle; }
          else { for (int i=_size-1; i gt =0; i--) IndicatorRelease(_chandles[i]); ArrayResize(_chandles,0); Alert(_description+" initialization failed"); }
   return(_answer);
}  
//------------------------------------------------------------------

 

About Me

I'm Mike Semlitsch the owner of PerfectTrendSystem.com. My trading career started in 2007. Since 2013 I have helped thousands of traders to take their trading to the next level. Many of them are now constantly profitable traders. 

The following performance was achieved by me while trading live in front of hundreds of my clients:

Connect With Me:  

Results From 5 Months!
This service starts soon! Be the first who get's notified when it begins!

This FREE Indicator Can Transform
Your Trading!

FREE Indicator + Telegram Group


Request the Ultimate Double Top/Bottom Indicator which is used by 10,000+ traders.