while trying to save below code it throws error.
line 21: itemType is not defined
The error goes off if i remove rsievent from return value within the function. Seems like something woring with handling of string variable '[value, cond, rsievent]'
Full code as per below
//@version=4
study("Screen", shorttitle = 'Screen', overlay = false)
// RSI Params
rsi_length = input(14, title = "RSI Length")
rsi_overbought = input(70, title = "RSI Overbought Level")
rsi_oversold = input(30, title = "RSI Overbought Level")
// Symbols
// There is a limit of 40 security calls so only 40 symbols at the same time is possible
s01 = input('AAPL', type=input.symbol)
sFunc() =>
rsievent = ''
rsi = rsi(close, rsi_length)
cond = rsi > rsi_overbought or rsi < rsi_oversold
value = rsi
rsievent := crossover(rsi, 40) ? rsievent + 'RSICROSSOVER40' + '\n' : rsievent
[value, cond, rsievent]
[v01, c01, b01] = security(s01, timeframe.period, sFunc())
plot(v01, "v01", color=color.green)