please help, in this code if first condition met then ignore other condition. Like if fvg_5_up and above_rsi[2]
condition are true then not calculate others like python if, elif and else function. Same if fvg_5_up and above_rsi[2],[3] are not condition met but fvg_5_up and above_rsi[4] and fvg_5_up and above_rsi[5] met then plotshape only first condition met ‘fvg_5_up and above_rsi[4]’. some time met all 5 condition but plotshape only first condition. please help me.
rsi = ta.rsi(close,14)
above_rsi = rsi > 50
fvg_5_up = low[2] > high
combine_5_down = fvg_5_up and above_rsi[2] or fvg_5_up and above_rsi[3] or fvg_5_up and above_rsi[4] or fvg_5_up and above_rsi[5]
fi_down_5= request.security(syminfo.tickerid, "5", combine_5_down, gaps = barmerge.gaps_on)
plotshape(fi_down_5, "Trend Up", style = shape.labelup, text = "Trend Up", textcolor = #0be3e7, location = location.abovebar, offset = -2, size = size.tiny,color =#e78b0b)
Subrata Sarkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1