Rsi slope combination

I want to apply scripted alert on 5 min and 1 hour candle

Conditions: For 5 min candle

  1. Close>= buy/sell price(it will change as per scrip day to day

  2. RSI(CLOSE,14 ) should be between 47 and 65

  3. SLOPE OF RSI(CLOSE,14) OVER LAST 2 CANDLES SHOULD BE GREATER THAN ZERO

An alert should be generated only if all three conditions are valid

Conditions: For 1 hour candle

  1. Last price>= buy/sell price

  2. RSI( LAST,14) should be between 47 and 55

  3. slope of RSI(LAST,14),2) should be greater than zero for buy signal and less than zero for sell signal

Currently i am getting alerts only on price or only on rsi conditions, i want to combine price,rsi and slope and only then the alert should come up (I.e. when all three conditions are met )

Would be grateful for much needed help

Regards

Rishikesh Vaidya

Pune

hElLO tRaDeR,

BUY SCRIPT 5 MIN:

CLOSE >= 0 AND
(RSI(CLOSE,14) > 47 AND RSI(CLOSE,14) < 65) AND
SLOPE(RSI(CLOSE,14),2) > 0 

BUY SCRIPT 1 HOUR:

CLOSE >= 0 AND
(RSI(CLOSE,14) > 47 AND RSI(CLOSE,14) < 55) AND
SLOPE(RSI(CLOSE,14),2) > 0 

SELL SCRIPT 1 HOUR:

CLOSE >= 0 AND
(RSI(CLOSE,14) > 47 AND RSI(CLOSE,14) < 55) AND
SLOPE(RSI(CLOSE,14),2) < 0 

Replace CLOSE VALUE >= 0 , accordingly.

Test it and let me know the results.

Hello , thanks for the script. I have question related to 1 hour buy/sell
My requirement is that the alert should be generated on based on 1 hour candle , as soon as the last traded price is same as my buy/sell price AND RSI should be between mentioned levels for buy/sell at that moment( the moment when the last traded price reaches buy/sell level) .Keeping this as the requirement for 1 hour candle alert ; shall I replace CLOSE WITH LAST IN RSI AND SLOPE FORMULA ?
OR the present code is sufficient to generate instantaneous alerts and not wait for close of 1 hour candle. I am using 1 hour candle as confirmation candle. When I receive alert based on 5 min candle I want to confirm whether conditions on 1 hour candle are favourable or not. I don’t want to wait for close of that 1 hour candle
Please guide
Regards
Rishikesh

Hi,
On the Pi scanner, the CLOSE function generates alerts only at the close of the last candle.
On the 1HR screener you can use the LAST function instead to get alerts realtime as soon as it happens.

hi thanks a lot.1 hr screener worked with LAST and 5 min alert also functioned as desired