Bug in SQ_LinearRegression MultiCharts

There are insane values for the first Period - 1 periods in this indicator.
Attached the screenshot,

I think there is a bug somewhere here:

for Value1 = 0 to Period - 1
begin
If Currentbar - Value1 < 0 then break;
sumXY += Value1 * Price[Value1];
end;

Attachments
bug.png
(142.07 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

KP
#1

CooleRnax

28.09.2019 03:46

Task created

TB
#2

Tomas Brynda

22.10.2019 21:36

Status changed from New to Fixed

Modified the algorithm to output 0 until there is enough bars 
KP
#3

CooleRnax

22.10.2019 22:12
I would like to mention that this indicator behaved differently in comparison to other I tested.

Normally for such simple indicator to output correct results minimum requirement is n periods.

Previous implementation of this indicator required 2 * n  - 1.

But in the code it actually seems like it requires only n periods.

Please check that this is fixed too.


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please