StockFetcher Forums · Filter Exchange · Tradingview CCI coded OBV filter by Lazybear<< >>Post Follow-up
selfhigh05
23 posts
msg #134580
Ignore selfhigh05
2/25/2017 3:55:38 PM

Does anyone have a clue on how to calculate this in SF? I am not necessarily interested in getting the CCI coded on the OBV line I am only really interested in the OBV line and when it crosses above the EMA line.

I want to be able to search for stocks that have its OBV above the EMA line. I don't see or fully understand how he gets the EMA number relative to the OBV number. Any help would be appreciated, thanks.

//
// @author LazyBear
//
study("CCI coded OBV", shorttitle="CCIOBV_LB")
src = close
length = input(20, minval=1, title="CCI Length")
threshold=input(0, title="CCI threshold for OBV coding")
lengthema=input(13, title="EMA length")
obv(src) =>
cum(change(src) > 0 ? volume : change(src) < 0 ? -volume : 0*volume)

o=obv(src)
c=cci(src, length)
plot(o, color=c>=threshold?green:red, title="OBV_CCI coded", linewidth=2)
plot(ema(o,lengthema), color=orange, linewidth=2)

four
5,087 posts
msg #134592
Ignore four
2/26/2017 1:16:16 PM


??

Fetcher[
set{x, obv}
set{zz, average obv(20)}

x crossed above zz


and close is above 2.00
and average volume(30) is above 250000
]



selfhigh05
23 posts
msg #134596
Ignore selfhigh05
2/26/2017 3:51:23 PM

too bad I cant post a pic of what it looks like but the goal of what I am trying to accomplish is capturing when the OBV crosses EMA. Thanks for the try.

selfhigh05
23 posts
msg #134688
Ignore selfhigh05
3/1/2017 6:01:22 PM

I might have figured out what I need to do just don't know how to do it. Can someone help me with getting a formula for the EMA of OBV for a six bar period?

EMA(OBV,6)

Any help will be greatly appreciated.

selfhigh05
23 posts
msg #134689
Ignore selfhigh05
3/1/2017 6:02:57 PM

Here is the manual EMA formula:

EMA [today] = (Price [today] x K) + (EMA [yesterday] x (1 – K))

Where:

K = 2 ÷(N + 1)
N = the length of the EMA
Price [today] = the current closing price
EMA [yesterday] = the previous EMA value
EMA [today] = the current EMA value

mahkoh
1,065 posts
msg #134703
Ignore mahkoh
3/2/2017 12:37:11 PM

Maybe custom EMA formula?

set{emaobv, cema(obv(6),6)}

StockFetcher Forums · Filter Exchange · Tradingview CCI coded OBV filter by Lazybear<< >>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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.