Yes, I confirm that. Explicitly setting the LookBack to a hard coded value seems to fix the issue. Thanks.
But I still can't understand why I have to call *asset()* before setting the StartDate and EndDate variables?
Because this:
function run() {
LookBack = 500;
asset("EUR/USD");
StartDate = 2010;
EndDate = 2015;
...
}
gives a totally different (worse) result comparing to this:
function run() {
LookBack = 500;
StartDate = 2010;
EndDate = 2015;
asset("EUR/USD");
...
}