StockFetcher Forums · Filter Exchange · OBV<< 1 ... 2 3 4 5 6 >>Post Follow-up
nikoschopen
2,824 posts
msg #63514
Ignore nikoschopen
6/9/2008 4:09:48 PM


Quote from WALLSTREETGENIUS:

Until we can get one of our coding geniuses to get OBV to "touch" that "sdd" line...this might be the next best thing.

This will give you what ure looking for. Should you need to change the condition, say, from "touching the lower channel" to "touching the upper channel", just modify the line that follows the comment that reads:

/*Channels: x = Upper; y = Median; z = Lower*/
Moreover, you can apply the channel on other indicators by simply replacing "OBV(1)" with any indicator of ure choice. See the next post as an example.

Fetcher[
/*60-day Linear Regression Channel applied to OBV*/
set{SD,cstddev(OBV(1),60)}
set{SDU,OBV(1) + SD}
set{SDD,OBV(1) - SD}

/*Linear Regression: y = mx + b*/

/*Median Channel*/
set{mSD, 60 day slope of OBV(1)}
set{mx, 60 * mSD}
set{b2, sum(OBV(1),60)}
set{bx, mSD * 1830}
set{b1, b2 - bx}
set{b, b1 / 60}
set{y, mx + b}

/*Upper Channel*/
set{mSDU, 60 day slope of SDU}
set{my, 60 * mSDU}
set{b2a, sum(SDU,60)}
set{bx1, mSDU * 1830}
set{b1a, b2a - bx1}
set{ba, b1a / 60}
set{x, my + ba}

/*Lower Channel*/
set{mSDD, 60 day slope of SDD}
set{mz, 60 * mSDD}
set{b2b, sum(SDD,60)}
set{bx2, mSDD * 1830}
set{b1b, b2b - bx2}
set{bb, b1b / 60}
set{z, mz + bb}

/*Channels: x = Upper; y = Median; z = Lower*/
/*Use a filter phrase like "touching" or "approaching from above OR below"*/
OBV(1) touching z

add column separator
add column OBV(1)
add column separator
add column x{Upper Channel}
add column y{Median Channel}
add column z{Lower Channel}
add column separator

draw 60 day slope of OBV(1)
draw 60 day slope of SDU on plot OBV(1)
draw 60 day slope of SDD on plot OBV(1)

do not draw SDU
do not draw SDD
do not draw z
]



nikoschopen
2,824 posts
msg #63515
Ignore nikoschopen
6/9/2008 4:10:30 PM

Here, the same channel is superimposed on RSI(2), which seems to offer a better visual.

Fetcher[
/*60-day Linear Regression Channel applied to RSI(2)*/
set{SD,cstddev(RSI(2),60)}
set{SDU,RSI(2) + SD}
set{SDD,RSI(2) - SD}

/*Linear Regression: y = mx + b*/

/*Median Channel*/
set{mSD, 60 day slope of RSI(2)}
set{mx, 60 * mSD}
set{b2, sum(RSI(2),60)}
set{bx, mSD * 1830}
set{b1, b2 - bx}
set{b, b1 / 60}
set{y, mx + b}

/*Upper Channel*/
set{mSDU, 60 day slope of SDU}
set{my, 60 * mSDU}
set{b2a, sum(SDU,60)}
set{bx1, mSDU * 1830}
set{b1a, b2a - bx1}
set{ba, b1a / 60}
set{x, my + ba}

/*Lower Channel*/
set{mSDD, 60 day slope of SDD}
set{mz, 60 * mSDD}
set{b2b, sum(SDD,60)}
set{bx2, mSDD * 1830}
set{b1b, b2b - bx2}
set{bb, b1b / 60}
set{z, mz + bb}

/*Channels: x = Upper; y = Median; z = Lower*/
/*Use a filter phrase like "touching" or "approaching from above OR below"*/
RSI(2) approaching z from above

add column separator
add column RSI(2)
add column separator
add column x{Upper Channel}
add column y{Median Channel}
add column z{Lower Channel}
add column separator

draw 60 day slope of RSI(2)
draw 60 day slope of SDU on plot RSI(2)
draw 60 day slope of SDD on plot RSI(2)

do not draw SDU
do not draw SDD
do not draw z
]



chetron
2,817 posts
msg #63517
Ignore chetron
6/9/2008 4:41:12 PM

SWEET, NIKO
VERY SWEET




WALLSTREETGENIUS
983 posts
msg #63518
Ignore WALLSTREETGENIUS
6/9/2008 5:24:45 PM

SHEER FREAKIN' GENIUS!...THAT'S ALL I CAN SAY....

maxreturn
745 posts
msg #63520
Ignore maxreturn
6/9/2008 5:53:14 PM

Niko...I think I speak for my fellow forumites when I say in the words of Wayne and Garth...WE'RE NOT WORTHY! Seriously friend....TOP SHELF WORK!

nikoschopen
2,824 posts
msg #63522
Ignore nikoschopen
6/9/2008 6:07:05 PM

Thanks but go easy on the compliments. lol

If you would like to eliminate stocks that have fallen below the lower channel within x-days, just add the following line to the filter, substituting xx for the number of days in the past:

count(obv(1) below z, xx) equals 0

Fetcher[
/*60-day Linear Regression Channel applied to OBV*/
set{SD,cstddev(OBV(1),60)}
set{SDU,OBV(1) + SD}
set{SDD,OBV(1) - SD}

/*Linear Regression: y = mx + b*/

/*Median Channel*/
set{mSD, 60 day slope of OBV(1)}
set{mx, 60 * mSD}
set{b2, sum(OBV(1),60)}
set{bx, mSD * 1830}
set{b1, b2 - bx}
set{b, b1 / 60}
set{y, mx + b}

/*Upper Channel*/
set{mSDU, 60 day slope of SDU}
set{my, 60 * mSDU}
set{b2a, sum(SDU,60)}
set{bx1, mSDU * 1830}
set{b1a, b2a - bx1}
set{ba, b1a / 60}
set{x, my + ba}

/*Lower Channel*/
set{mSDD, 60 day slope of SDD}
set{mz, 60 * mSDD}
set{b2b, sum(SDD,60)}
set{bx2, mSDD * 1830}
set{b1b, b2b - bx2}
set{bb, b1b / 60}
set{z, mz + bb}

/*Channels: x = Upper; y = Median; z = Lower*/
/*Use a filter phrase like touching or approaching from above OR below*/
OBV(1) touching z
count(obv(1) below z, 20) equals 0

add column separator
add column OBV(1)
add column separator
add column x{Upper Channel}
add column y{Median Channel}
add column z{Lower Channel}
add column separator

draw 60 day slope of OBV(1)
draw 60 day slope of SDU on plot OBV(1)
draw 60 day slope of SDD on plot OBV(1)

do not draw SDU
do not draw SDD
do not draw z
]



jimhbutton
104 posts
msg #63532
Ignore jimhbutton
6/10/2008 7:17:07 AM

Niko,

Sweet, sweet, sweet!

U da man!!

johnpaulca
12,036 posts
msg #63542
Ignore johnpaulca
6/10/2008 10:29:27 AM

COP... just wanted to show you guys/gals how I traded COP using OBV-LR combination. I use a LR(34) with 1.4SD on the OBV. Notice as the price continued to rise you can see the divergence on the OBV.

Image and video hosting by TinyPic

nikoschopen
2,824 posts
msg #63543
Ignore nikoschopen
modified
6/10/2008 11:47:28 AM

Hey JP.

While the above filter takes into account 1 standard deviation, you merely need to multiply "SD" by 1.4 to achieve 1.4 SD (see the first line below).

Fetcher[
/*60-day Linear Regression Channel with 1.4 standard deviation applied to OBV*/

/*Multiply "cstddev" by the desired deviation to calculate a different standard deviation (eg. "2" for two standard deviation)*/
set{SD,cstddev(OBV(1),60) * 1.4}
set{SDU,OBV(1) + SD}
set{SDD,OBV(1) - SD}

/*Linear Regression: y = mx + b*/

/*Median Channel*/
set{mSD, 60 day slope of OBV(1)}
set{mx, 60 * mSD}
set{b2, sum(OBV(1),60)}
set{bx, mSD * 1830}
set{b1, b2 - bx}
set{b, b1 / 60}
set{y, mx + b}

/*Upper Channel*/
set{mSDU, 60 day slope of SDU}
set{my, 60 * mSDU}
set{b2a, sum(SDU,60)}
set{bx1, mSDU * 1830}
set{b1a, b2a - bx1}
set{ba, b1a / 60}
set{x, my + ba}

/*Lower Channel*/
set{mSDD, 60 day slope of SDD}
set{mz, 60 * mSDD}
set{b2b, sum(SDD,60)}
set{bx2, mSDD * 1830}
set{b1b, b2b - bx2}
set{bb, b1b / 60}
set{z, mz + bb}

/*Channels: x = Upper; y = Median; z = Lower*/
/*Use a filter phrase like "touching" or "approaching from above OR below"*/
OBV(1) touching z

add column separator
add column OBV(1)
add column separator
add column x{Upper Channel}
add column y{Median Channel}
add column z{Lower Channel}
add column separator

draw 60 day slope of OBV(1)
draw 60 day slope of SDU on plot OBV(1)
draw 60 day slope of SDD on plot OBV(1)

do not draw SDU
do not draw SDD
do not draw z
]



johnpaulca
12,036 posts
msg #63546
Ignore johnpaulca
6/10/2008 1:03:07 PM

Thanks Niko...I have added an ema(100) and had some interesting selections.

StockFetcher Forums · Filter Exchange · OBV<< 1 ... 2 3 4 5 6 >>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.