Download MetaTrader 5

Indicators: Regression Analysis

To add comments, please log in or register
How to choose the most appropriate signal and subscribe to it in no time
Automated-Trading
Admin
99093
Automated-Trading 2011.05.04 13:02 

Regression Analysis:

This indicator compares four types of regression (linear, quadratic, logarithmic and exponential) and chooses the one that best fits the data analyzed.

This analysis is done every time there is a new tick. In the left top corner of the chart four values are displayed. These values represent the dispersion of data regarding to its regression, so the smallest value indicates the best option. Additionally, the indicator allows recording these values into a text file for further analysis.

Author: barmenteros

Regression Analysis

Regression Analysis

24h-worker
83
24h-worker 2011.05.11 02:22  

One Question: How do I install the indicator ? (Get the values for the UpperBand and LowerBand)

double RegAna = iCustom(Symbol(), PERIOD_H1, "Regression_Analysis", 100,0,1.96,"On","OFF",PRICE_CLOSE, "UpperBand",0); ?  // This did not functioned

Miguelito Yap
640
Miguelito Yap 2011.06.23 05:06  

Very nice, thank you.  Better than Bollinger Bands.

Robert
418
Robert 2011.06.23 07:47  
24h-worker:

One Question: How do I install the indicator ? (Get the values for the UpperBand and LowerBand)

double RegAna = iCustom(Symbol(), PERIOD_H1, "Regression_Analysis", 100,0,1.96,"On","OFF",PRICE_CLOSE, "UpperBand",0); ?  // This did not functioned


Hi 24h-worker,

First of all thanks to Author: barmenteros for this regression indicator.

Here are the buffers for this indicator:

double         RegBfr[];           // Buffer 0
double         BandUpBfr[];     // Buffer 1
double         BandDwBfr[];    // Buffer 2

For your formulas -

1) Make sure the indicator name is spelled exactly the same as the indicator. You are missing the "b_" unless you renamed the indicator without it.
2) Match lower case spelling for "OFF" (use "Off")
3) Remove the PRICE_CLOSE that is not in the input settings
4) And change the word "UpperBand" to the buffer numbers you want.

Examples:

double RegUp     = iCustom(Symbol(), PERIOD_H1, "b_Regression_Analysis", 100,0,1.96,"On","Off", 1,0);   // Upper Band

double RegDown = iCustom(Symbol(), PERIOD_H1, "b_Regression_Analysis", 100,0,1.96,"On","Off", 2,0);   // Lower Band

Hopefully that should work for you.

Hope this helps,
Robert


Boris Armenteros
14638
Boris Armenteros 2011.10.20 21:50  

Thanks Robert. I could not explain it better.

cosmicbeing:


Hi 24h-worker,

First of all thanks to Author: barmenteros for this regression indicator.

Here are the buffers for this indicator:

double         RegBfr[];           // Buffer 0
double         BandUpBfr[];     // Buffer 1
double         BandDwBfr[];    // Buffer 2

For your formulas -

1) Make sure the indicator name is spelled exactly the same as the indicator. You are missing the "b_" unless you renamed the indicator without it.
2) Match lower case spelling for "OFF" (use "Off")
3) Remove the PRICE_CLOSE that is not in the input settings
4) And change the word "UpperBand" to the buffer numbers you want.

Examples:

double RegUp     = iCustom(Symbol(), PERIOD_H1, "b_Regression_Analysis", 100,0,1.96,"On","Off", 1,0);   // Upper Band

double RegDown = iCustom(Symbol(), PERIOD_H1, "b_Regression_Analysis", 100,0,1.96,"On","Off", 2,0);   // Lower Band

Hopefully that should work for you.

Hope this helps,
Robert



To add comments, please log in or register