Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

rsi Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
pmatus1
Posted : Wednesday, September 21, 2011 12:40:18 PM
Registered User
Joined: 9/11/2007
Posts: 28
Hi, can you help with a pcf that looks for a 10 day low in price but yet the 5 period non wilder rsi is higher than that 10 day low.

and

can you help with a pcf that looks for a 10 day high in the price but yet the 5 period non wilder rsi is lower than that 10 day high.
StockGuy
Posted : Wednesday, September 21, 2011 12:58:45 PM

Administration

Joined: 9/30/2004
Posts: 9,187
Price and RSI are not plotted on the same scale so you can't really compare their values.
pmatus1
Posted : Wednesday, September 21, 2011 1:05:24 PM
Registered User
Joined: 9/11/2007
Posts: 28
ok, can you translate these into a pcf.

Positive RSI Divergence:
'# Period = userinput.integer = 50
If price.Close = price.MinClose(period) And price.Close < price.MinClose(period, period) * 1.01 AndAlso _
 rsi.value = rsi.minlow(period) and rsi.value<30 and rsi.minlow(period) > rsi.MinLow(period, period) Then pass


Positive MACD Histogram Divergence:
'# Period = userinput.integer = 50
If price.Close = price.MinClose(period) And price.Close < price.MinClose(period, period) AndAlso _
 mh.value = mh.minlow(period) And mh.minlow(period) > mh.MinLow(period, period) + .5 Then pass


Positive MACD Divergence:
'# Period = userinput.integer = 50
If price.Close = price.MinClose(period) And price.Close < price.MinClose(period, period) * 1.01 AndAlso _
 macd.value = macd.minlow(period) and macd.minlow(period) > macd.MinLow(period, period) + .5 Then pass

Negative MACD Divergence:
'# Period = userinput.integer = 50
If price.Close = price.maxClose(period) And price.Close > price.maxClose(period, period) * .99 AndAlso _
 macd.value = macd.maxhigh(period) And macd.maxhigh(period) < macd.maxhigh(period, period) Then pass
StockGuy
Posted : Wednesday, September 21, 2011 2:27:32 PM

Administration

Joined: 9/30/2004
Posts: 9,187

What period are you using on your RSI?

pmatus1
Posted : Wednesday, September 21, 2011 2:28:56 PM
Registered User
Joined: 9/11/2007
Posts: 28
5
StockGuy
Posted : Wednesday, September 21, 2011 2:56:58 PM

Administration

Joined: 9/30/2004
Posts: 9,187

Try this one and if it works for you for Positive RSI Divergence:

C = MinC50 and C < MInC50.50 * 1.01 and RSI5.1 = MIN(RSI5.1,50) and RSI5.1 < 30 and MIN(RSI5.1,50) > MIN(RSI5.1.50,50)

I don't find any stocks passing right now but I tested each Boolean independently and they returned the correct results.

What are the short and long period for the MACD indicator?

pmatus1
Posted : Wednesday, September 21, 2011 3:17:22 PM
Registered User
Joined: 9/11/2007
Posts: 28
12, 26, 9
StockGuy
Posted : Wednesday, September 21, 2011 3:37:18 PM

Administration

Joined: 9/30/2004
Posts: 9,187

Didn't notice you were using the MACD histogram before.  The formula for a MACD histogram is

(XAVGC12 - XAVGC26) - (XAVG(XAVGC12,9) - XAVG(XAVGC26,9)

Unfortunately, you cannot group operators inside the MIN function.

MIN(RSI5.1,50) is valid.

MIN((XAVGC12 - XAVGC26) - (XAVG(XAVGC12,9) - XAVG(XAVGC26,9),50) is NOT valid.

Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.