Need help with a coding for RSI in pi

Trying to create a strategy in Pi for RSI with two candles.

Buy: Previous candle RSI< 80 and current candle RSI> 80 with current candle close> previous candle close.

Sell: Previous candle RSI> 20 and current candle RSI< 20 with current candle close < previous candle close.

Can anyone help with this strategy?

Why don’t you check out @Streak, it will be much easier to create there.

You easily create this in Streak.

Here are the conditions for Buy