Anuwat Tanasittipan / Publications
Forum
Linear regression slope from MT5 to MT4
Hello, I have an indicator on MT5 which includes linear regression slope, with the slope function (to get the slope of array x[]) as follows: double LinRegrSlope( int per) { double sum= 0.0 ; double wsum= 0.0 ; for ( int i=per;i> 0 ;i--) { sum+=x[i]; wsum+=x[i]*(per+ 1 -i);
Array out of range (Only when testing but not on chart)
Hi, I'm trying to test an EA, on Metatrader5, which includes custom indicator "Highest High", coded as below, on stock data. The indicator determines the highest of high prices of N recent bars (input HighPeriod in the code). //+------------------------------------------------------------------+