Posted By: Brax
Linear Regression in objective function - 11/16/17 16:33
Hi,
I am currently doing some research on optimization criteria and iīve got stuck trying to apply LinearRegSlope*R2 to optimize parameters.
This code gives me an error regarding i need more lookback period:
Iīve also tried with Day instead of Bar-StarBar, and even putting directly a number lower than lookback for the period gets a crush.
ŋHow could i achieve this?
The alternative is using (WinTotal-LossTotal)*R2, but this is not what i really want.
I am currently doing some research on optimization criteria and iīve got stuck trying to apply LinearRegSlope*R2 to optimize parameters.
This code gives me an error regarding i need more lookback period:
Code:
var objective() { return LinearRegSlope(ResultsDaily,Bar-StartBar)*R2; }
Iīve also tried with Day instead of Bar-StarBar, and even putting directly a number lower than lookback for the period gets a crush.
ŋHow could i achieve this?
The alternative is using (WinTotal-LossTotal)*R2, but this is not what i really want.