What does the language operator [] do? (Hint: It’s not for regular arrays)
Series subscript. Provides access to previous values of series expr1. expr2 is the number of bars back, and must be numerical. Floats will be rounded down.
expr1[expr2]
What does the input function do? (Hint: Try it in Tradingview)
Adds an input to your script indicator. User can see and edit inputs on the Format Object dialog of the script study. Script inputs look and behave exactly the same as inputs of built-in Technical Analysis indicators.
What does the Strategy function do?
The function sets a number of strategy properties.
What information does the Volume variable contain?
Current bar volume.
TYPE
series[float]
REMARKS
Previous values may be accessed with square brackets operator [], e.g. volume[1], volume[2].