StockFetcher Forums · Filter Exchange · Rahul Mohindar Oscillator (RMO)<< >>Post Follow-up
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.

Fetcher[
set{ma1,MA(2)}
set{ma2,dma(2,-1)}
set{ma3,dma(2,-2)}
set{ma4,dma(2,-3)}
set{ma5,dma(2,-4)}
set{ma6,dma(2,-5)}
set{ma7,dma(2,-6)}
set{ma8,dma(2,-7)}
set{ma9,dma(2,-8)}
set{ma10,dma(2,-9)}
set{SwingTrd1, 100*(close - (ma1+ma2+ma3+ma4+ma5+ma6+ma7+ma8+ma9+ma10)/10)/(high 10 day close - low 10 day close)}
set{SwingTrd2,cema(SwingTrd1,30)}
set{SwingTrd3,cema(SwingTrd2,30)}
set{RMO,cema(SwingTrd1,81)}
SwingTrd2 crossed above SwingTrd3
]



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.

Fetcher[
symlist(gdx,spy,eem,slv,sivr,sgdm,pplt,schh,agg,csc,fb,aapl,amzn,goog,nugt,dust)
set{ma1,MA(2)}
set{ma2,ma(2) 1 days ago}
set{ma3,ma(2) 2 days ago}
set{ma4,ma(2) 3 days ago}
set{ma5,ma(2) 4 days ago}
set{ma6,ma(2) 5 days ago}
set{ma7,ma(2) 6 days ago}
set{ma8,ma(2) 7 days ago}
set{ma9,ma(2) 8 days ago}
set{ma10,ma(2) 9 days ago}
set{sum1,ma1+ma2}
set{sum2,sum1+ma3}
set{sum3,sum2+ma4}
set{sum4,sum3+ma5}
set{sum5,sum4+ma6}
set{sum6,sum5+ma7}
set{sum7,sum6+ma8}
set{sum8,sum7+ma9}
set{sum9,sum8+ma10}
set{ma11,sum9/10}
set{hi,high 10 day high}
set{lo,low 10 day low}
set{diff2, hi-lo}
set{diff1,close - ma11}
set{SwingTrd,100*diff1}
set{SwingTrd1,SwingTrd/diff2}

add column ma11
add column hi
add column lo
add column diff2
add column diff1
add column SwingTrd
add column SwingTrd1
set{SwingTrd2,cema(SwingTrd1,30)}
add column SwingTrd2
set{SwingTrd3,cema(SwingTrd2,30)}
add column SwingTrd3
set{trend,cema(SwingTrd1,81)}
add column trend
]



StockFetcher Forums · Filter Exchange · Rahul Mohindar Oscillator (RMO)<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus