Closed Tucsky closed 9 months ago
Assuming in the doc's last section is an executable example, I don't see where type
is passed to either source
or line
:
type = option(type=list, options=[null, "spot", "perp"])
src = source(quote=quote)
candlestick(avg_ohlc(src))
Assuming in the doc's last section is an executable example, I don't see where
type
is passed to eithersource
orline
:type = option(type=list, options=[null, "spot", "perp"]) src = source(quote=quote) candlestick(avg_ohlc(src))
You are absolutely right. Thank you. Fixed now.
Current implementation might suggest this is a possible usage, while it currently doesn't work like that
option1 = option()
option2 = option() * option1
Current implementation might suggest this is a possible usage, while it currently doesn't work like that
option1 = option() option2 = option() * option1
Where it does suggest it ? I am not sure I understand what it means.
Until now the script options were detected from the script itself, if you write options.anything, an option
anything
will magicaly appear in the indicator's settings, and will show differently depending on it's value and nameDefining options with the new
option()
function will allow choose the appropriate input type, set default value, help text and more.Basic example
Range input
List input
Color input
Usage with
source()
function