Linear Regression Channel Indicator For MT5

Linear Regression Channel Indicator For MT5

Table Of Contents:

  1. Linear Regression Channel Indicator For MT5
  2. Linear Regression Channel Indicator For MT5インストール
  3. Linear Regression Channel Indicator For MT5パラメーター
  4. Linear Regression Channel Indicator For MT5
  5. コードの主要部分

Linear Regression Channel Indicator For MT5Linear Regression Channel Indicator For MT5

FREE Linear Regression Channel Indicator

Download the FREE Linear Regression Channel 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

 

Linear Regression Channel Indicator For MT5インストール

上記のフォームからインジケーターをダウンロードした後、zipファイルを解凍する必要があります。次に、ファイルlrchannel.mq5MT5インストールのMQL5Indicatorsフォルダーにコピーする必要があります。その後、MT5を再起動してください。そうすると、インジケーターのリストにインジケーターが表示されます。

Linear Regression Channel Indicator For MT5パラメーター

Linear Regression Channel Indicator For MT5は、構成する1 パラメーターがあります。

input int InChPeriod = 150; //Channel Period 

Linear Regression Channel Indicator For MT5

Linear Regression Channel Indicator For MT5は、 5 バッファーを提供します。

SetIndexBuffer(0,rlBuffer,INDICATOR_DATA); SetIndexBuffer(1,upBuffer,INDICATOR_DATA); SetIndexBuffer(2,downBuffer,INDICATOR_DATA); SetIndexBuffer(3,highBuffer,INDICATOR_DATA); SetIndexBuffer(4,lowBuffer,INDICATOR_DATA); 

コードの主要部分

int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[])    {     double sumX,sumY,sumXY,sumX2,a,b,F,S;     int X; //--- check for bars count     if(rates_total lt ExChPeriod+1)return(0); //--- if  new bar set, calculate         if(rCount!=rates_total)       {        PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,rates_total-ExChPeriod-1);        PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,rates_total-ExChPeriod-1);        PlotIndexSetInteger(2,PLOT_DRAW_BEGIN,rates_total-ExChPeriod-1);        PlotIndexSetInteger(3,PLOT_DRAW_BEGIN,rates_total-ExChPeriod-1);        PlotIndexSetInteger(4,PLOT_DRAW_BEGIN,rates_total-ExChPeriod-1); //--- calculate coefficient a and b of equation linear regression         F=0.0;        S=0.0;        sumX=0.0;        sumY=0.0;        sumXY=0.0;        sumX2=0.0;        X=0;        for(int i=rates_total-1-ExChPeriod;i lt rates_total-1;i++)          {           sumX+=X;           sumY+=price[i];           sumXY+=X*price[i];           sumX2+=MathPow(X,2);           X++;          }        a=(sumX*sumY-ExChPeriod*sumXY)/(MathPow(sumX,2)-ExChPeriod*sumX2);        b=(sumY-a*sumX)/ExChPeriod; //--- calculate values of main line and error F        X=0;        for(int i=rates_total-1-ExChPeriod;i lt rates_total;i++)          {           rlBuffer[i]=b+a*X;           F+=MathPow(price[i]-rlBuffer[i],2);           X++;          } //--- calculate deviation S               S=NormalizeDouble(MathSqrt(F/(ExChPeriod+1))/MathCos(MathArctan(a*M_PI/180)*M_PI/180),_Digits); //--- calculate values of last buffers        for(int i=rates_total-1-ExChPeriod;i lt rates_total;i++)          {           upBuffer[i]=rlBuffer[i]+S;           downBuffer[i]=rlBuffer[i]-S;           highBuffer[i]=rlBuffer[i]+2*S;           lowBuffer[i]=rlBuffer[i]-2*S;          }           rCount=rates_total;       }            return(rates_total);    } //+------------------------------------------------------------------+ 

 

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.