the script MAX(High, 20)[0] works well enough and returns a value, however:
MAX(High, 20)[1] puts the following error in my error log: "Error on calling 'OnBarUpdate' method for indicator 'test2' on bar 0. You are accessing an index with a value that is invalid since it is out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart."
Does anybody know how to resolve this?
Comment