input
A number the trader can change in the script inputs UI.
name = input 9 as "Fast EMA"
Default value is the number after input. The quoted title is what the UI shows. Use the variable in functions: ema(close, fastLen). The old word ask means the same thing and still runs; new scripts should use input (ask is easy to confuse with bid/ask price).
Return value
number
Also accepted: ask.
Example
fastLen = input 9 as "Fast EMA" slowLen = input 21 as "Slow EMA" fast = ema(close, fastLen) slow = ema(close, slowLen) when fast crosses above slow buy