Wednesday, August 29, 2012

Smooth RSI

I was able to get RSI values from below EPL.
insert into RSI
select talib("rsi", currentValueDouble, 14) as value
from Tick(security.symbol = "GOOG");
But the series of values were not smooth. I wanna try to get smooth RSI line chart. Perhaps I can take the SMA as input for RSI, like this:
insert into SMA
select talib("sma", currentValueDouble, 5) as value
from Tick(security.symbol = "GOOG");
insert into RSI
select talib("rsi", sma.value, 14) as value
from pattern [every timer:interval(2 minutes) -> sma=SMA];
Or the other way? Making a smooth SMA line chart from RSI values.
insert into RSI
select talib("rsi", currentValueDouble, 14) as value
from Tick(security.symbol = "GOOG");
insert into SMA
select talib("sma", rsi.value, 5) as value
from pattern [every timer:interval(2 minutes) -> rsi=RSI];

No comments:

Post a Comment