Originally Posted By: AndrewAMD
Why are you calling asset() *after* you enter trades? You're supposed to call it before you even define a series.

Otherwise, you are trading the current asset in your window drop-down. Thus, you have introduced a confounding variable.


I think there are no such restrictions, you can place it anywhere, as long as it is after StartDate and EndDate.

Actually, the script is Alice1a.c from Book Scripts link, so I guess it is correctly written.