StockFetcher Forums · View by Author: (2,824 messages)  [ Display By: Date / Subject ]<< 1 ... 3 4 5 6 7 ... 283 >> 
Filter Exchange · Musings & Misgivings: A Collection of Codes
nikoschopen
msg #63587
6/11/2008 7:12:12 PM

BTW feel free to add ure own "hacks".

Filter Exchange · Musings & Misgivings: A Collection of Codes
nikoschopen
msg #63586
6/11/2008 7:05:31 PM

Ever since I've been here, I took not-so-copious notes on interesting codes that I thought were worth preserving. These aren't really filters in and of themselves but are more or less "hacks" (or tricks) that will simplify the filter writing process. Well, most of them came from this addlebrain by way of helping others but there are some very creative ones written by others like Cegis. I thought I take the liberty of sharing these codes with y'all at this point. After all, what good are they elsewhere?

Although no particular importance is placed on the order of appearance, I will start off with some simple codes and then gradually work my way up to the complex over the next few days.

Percent (%) over Dollars ($)This will spit out the difference in percent (%):
Fetcher[
set{HL%, high above low}
add column HL%
]

This can be also used between any two indicators (eg. "ema(20) above ema(50)")


Close-to-open gap (or just "gap")This will spit out how large the gap is for that given day:
Fetcher[add column gap]

If you prefer the amount in $ amount:
Fetcher[
set{gap_percent, Close to open gap / 100}
set{gap_amount, gap_percent * close 1 day ago}
add column gap_amount
]


This will find a hammer (hanging man) with a tail that's at least 3/4 of the daily range:
Fetcher[
set{tail, min(open, close) - low}
set{hammer, tail / day point range}
hammer above 0.66
]

Here, two columns labeled "Upper (%)" and "Lower (%)" are added to inform you how large the tail is in relation to the body (OPCL):
Fetcher[
set{Shadow, day point range / aopcl}
Shadow above 3

set{Hi, high - max(open, close)}
set{Lo, min(open, close) - low}
set{Hiratio, Hi / aopcl}
set{Loratio, Lo / aopcl}
set{Upper, mod(Hiratio,10) * 100}
set{Lower, mod(Loratio,10) * 100}

add column Upper{Upper (%)}
add column Lower{Lower (%)}
]

The following tip allows you to find stocks that have met two conditions in the past. For example, you might be looking for a hammer (condition 1) with a volume spike (condition 2) that occured within the last 5 days:
Fetcher[
set{tail, min(open, close) - low}
set{hammer, tail / day point range}
set{both, count(hammer above 0.75,1) / count(volume more than 200% above average volume(30),1)}
set{dayz, days(both equals 1,5)}
dayz above 0
add column dayz
]
You can readily see when the two conditions occured in the "dayz" column.


Filter Exchange · OBV
nikoschopen
msg #63543
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
]



General Discussion · Watcha been humming lately? Share ure favorite tunes...
nikoschopen
msg #63530
6/10/2008 2:23:14 AM

Last time I checked, Sarah and Bono weren't on speaking terms.

Well, I think most men attend Brightman's concert for other reasons than her charming voice but this will most likely be one of them for a good measure.



General Discussion · Watcha been humming lately? Share ure favorite tunes...
nikoschopen
msg #63525
modified
6/9/2008 7:37:52 PM


Keith Jarrett

The Köln Concert
(1975)

TRACKS:
StockFetcher.com
1.Part I 25:59
2.Part II a 14:54
3.Part II b 18:13
4.Part II c 6:55
5.Bonus Track: Country (from My Country) 3:43


Filter Exchange · OBV
nikoschopen
msg #63522
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
]



Filter Exchange · OBV
nikoschopen
msg #63515
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
]



Filter Exchange · OBV
nikoschopen
msg #63514
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
]



General Discussion · Intraday Trend Watch: S&P 500
nikoschopen
msg #63461
6/6/2008 11:18:45 PM

Yes, it was. I hope ures was as profitable as mine.

Note that this thread will no longer be updated. I feel I've laid out pretty much all the bare essentials necessary for a successful trend trading. If you have a question or two, just send me an email at [my username]@gmail(dot)com.

General Discussion · Watcha been humming lately? Share ure favorite tunes...
nikoschopen
msg #63459
6/6/2008 10:56:16 PM

Click to buy



StockFetcher Forums ·  · << 1 ... 3 4 5 6 7 ... 283 >>

*** 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 2018 - 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.