src = input(close, title="Source")
expdt = input.string("240829","SELECT EXPIRY DATE")
vx = str.tostring(int(close))
vln = str.length(vx)
vlnm = vln-2
vxx = str.substring(vx,0,vlnm)
sid = syminfo.tickerid
exdt = expdt
syCE =sid+exdt+"C"+str.tostring(vxx)+"00"
syPE = sid+exdt+"P"+str.tostring(vxx)+"00"
tic1 = input.symbol("NSE:NIFTY240606C24000","SELECT SYMBOL Call")
tic2 = input.symbol("NSE:NIFTY240606C23500","SELECT SYMBOL Call")
tic1_vw = request.security(tic1, "05", ta.vwap(close))
this will work but
if i replace ‘tic1’ to syCE then it create error
Cannot call ‘request.security’ with argument ‘symbol’=’syCE’. An argument of ‘series string’ type was used but a ‘simple string’ is expected.
New contributor
Rakesh Soni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.