Lsthun 3 posts msg #130280 - Ignore Lsthun |
8/4/2016 1:56:57 PM
Anyone have an idea about how to construct the RMO in SF?
Found a formula/script for it on tradingview.com
https://www.tradingview.com/script/efHJsedw-Indicator-Rahul-Mohindar-Oscillator-RMO
//
// @author LazyBear
//
study(title = "Rahul Mohinder Oscillator [LazyBear]", shorttitle="RMO_LB")
C=close
cm2(x) => sma(x,2)
ma1=cm2(C)
ma2=cm2(ma1)
ma3=cm2(ma2)
ma4=cm2(ma3)
ma5=cm2(ma4)
ma6=cm2(ma5)
ma7=cm2(ma6)
ma8=cm2(ma7)
ma9=cm2(ma8)
ma10=cm2(ma9)
SwingTrd1 = 100 * (close - (ma1+ma2+ma3+ma4+ma5+ma6+ma7+ma8+ma9+ma10)/10)/(highest(C,10)-lowest(C,10))
SwingTrd2=ema(SwingTrd1,30)
SwingTrd3=ema(SwingTrd2,30)
RMO= ema(SwingTrd1,81)
Buy=cross(SwingTrd2,SwingTrd3)
Sell=cross(SwingTrd3,SwingTrd2)
Bull_Trend=ema(SwingTrd1,81)>0
Bear_Trend=ema(SwingTrd1,81)<0
Ribbon_kol=Bull_Trend ? green : (Bear_Trend ? red : blue)
Impulse_UP= SwingTrd2 > 0
Impulse_Down= RMO < 0
bar_kol=Impulse_UP ? green : (Impulse_Down ? red : (Bull_Trend ? green : blue))
bgcolor(Ribbon_kol)
plot(RMO,color=bar_kol, style=histogram)
hline(0)
|
Lsthun 3 posts msg #130285 - Ignore Lsthun modified |
8/4/2016 5:05:02 PM
This is my first try at trying to program a screen to pull any stock that shows a buy signal based on the source code from tradingview, but it's not working out. Any help from long time pros appreciated, I'm new to stockfetcher.
|
Lsthun 3 posts msg #130286 - Ignore Lsthun modified |
8/4/2016 11:37:31 PM
ok, so I've made progress, but when I try to screen stocks for a buy signal, where SwingTrd2 crossed above SwingTrd3, then I get an error that the filter exceeds the limitations, and that's even when I put in a sym list. This is what the code looks like now; it may be clumsy, but it's the only way I could get it to work and do what I think it's supposed to be doing so far. Any help is appreciated.
|