RSI divergence – help coding
Forums › ProRealTime English forum › ProScreener support › RSI divergence – help coding
- This topic has 6 replies, 2 voices, and was last updated 4 years ago by
robertogozzi.
-
-
10/15/2020 at 11:37 AM #147462
Can you please help me code below screener algo ?
Bullish reversal signal:
- Find the last 2 RSI oversold signals
- if (Oversold signal[1] > Oversold signal[0])
- screen for Bullish reversal
Bearish reversal signal:
Opposite to Bullish signal
10/15/2020 at 12:26 PM #147471Ignore the aove, there is more to this –
Can you please help me code below screener algo ?
Bullish reversal signal:
- Find the last 2 RSI oversold signals (RSI > 70)
- if (RSIOversoldSignal[1] < RSIOversoldSignal[0]) and (priceAtOversoldSignal[1] > priceAtOversoldSignal[0])
- then screen for Bullish reversal
Bearish reversal signal:
Opposite to Bullish signal
10/15/2020 at 12:34 PM #147474There you go:
12345678910111213141516171819Ob = 70Os = 100 - ObMyRsi = Rsi[14](close)//Cross = MyRsi CROSSES UNDER OsIF Cross THENBear2 = Bear1Bear1 = MyRsiENDIFB = Bear2 > Bear1//Cross = MyRsi CROSSES OVER ObIF Cross THENBull2 = Bull1Bull1 = MyRsiENDIFS = Bull2 < Bull1//SCREENER[B or S](MyRsi AS "Rsi")since you did not specify how far from each other those two signals should be, I used a crossover.
10/15/2020 at 12:36 PM #147475In your pic you haven’t two oversold or overbought signals, just one.
10/15/2020 at 12:58 PM #147478Thanks @robertogozzi.
I think crossover works fine too. Yeah the quality of the signal is better when it is oversold, but it works for near overbought signals too.
I will try manually with a screener and then import it to proorder later. Thanks again 🙂
10/15/2020 at 1:09 PM #147481Hi @robertogozzi.
Couple of things from the above code –
- Not sure if you have seen my latest requirement criteria above. We need to check the price too when we have a RSI signal. Can you please add that too?
- The expectation is that the second RSI signal is caused by the current price, but not historic data. Because we will be taking entry based on the second RSI signal.
Please see this video for better clairty on what I am trying to do
Thanks
10/15/2020 at 3:02 PM #147490I cannot wath a 44-minute video.
You should recap conditions.
This is my code modified to add diverging price. Signals are rarely returned:
123456789101112131415161718192021222324252627Ob = 70Os = 100 - ObMyRsi = Rsi[14](close)//Cross = MyRsi CROSSES UNDER OsIF Cross THENBear2 = Bear1Bear1 = MyRsiBull2 = 0Bull1 = 0Price2= Price1Price1= closeENDIFB = (Bear2 > Bear1) AND Price2 < Price1//Cross = MyRsi CROSSES OVER ObIF Cross THENBull2 = Bull1Bull1 = MyRsiBear2 = 0Bear1 = 0Price2= Price1Price1= closeENDIFS = (Bull2 < Bull1) AND Price2 > Price1//SCREENER[B or S](MyRsi AS "Rsi") -
AuthorPosts
Find exclusive trading pro-tools on