Using higher timeframes indicators to calculate a condition for my alert in pinescript5

Viewed 5

Im trying to use a 10min indicator to calculate a condition for a 2 min Chart

Currently im using:

//Get 10min RSI and RSIMA
RSI = request.security(syminfo.tickerid, "10", ta.rsi(close,14))
RSIMA = request.security(syminfo.tickerid, "10", ta.rma(close,50))

//RSI 10 min Conditions
RSIUP = RSIMA > RSI
RSIDOWN = RSI < RSIMA

and the indicator timeframe is 2min.

when the full condition is calculated it doesn't take the 10min timeframe into consideration.

Is there a way to make it work?

0 Answers
Related