StockFetcher Forums · View by Author: nikoschopen (2,824 messages) ·  [ Display By: Date / Subject ]<< 1 ... 2 3 4 5 6 ... 283 >> 
Filter Exchange · Relative Strength
nikoschopen
msg #63631
modified
6/13/2008 4:41:19 PM

Howdy,

Yes, ure method is a viable approach. As a matter of fact, it looks quite identical to Max's filter, only that you elected to include monthly, quarterly and bi-annual in addition to the yearly data. On that note, I think it's fair to say that Relative Strength is not limited to any one formula. There could be a myriad of possibilities to identify RS depending on how you define the term. For example, here's one RSI-esque calculation that I've used in my MAX filter, which measures the relative strength of the stock for the previous three months. Here, I have slightly revised it to reflect the "beta".

Fetcher[
set{%gain1mo, Slow Stochastic(22) Fast %K}
set{%gain2mo, %gain1mo 1 month ago}
set{%gain3mo, %gain1mo 2 months ago}
set{return1,%gain2mo + %gain3mo}
set{return2,return1 / 2}
set{return3,%gain1mo - return2}
set{return4,return3 * 0.6667}
set{return,return4 + return2}

set{spx, ind(^spx,return)}
set{betamax, return / spx}

draw spx on plot return
draw return line at 25
draw return line at 75
draw betamax line at 1
add column betamax{beta}
compare to ^spx
]



General Discussion · Specific Day
nikoschopen
msg #63620
6/13/2008 2:33:53 AM

msummer,

I would need to think about this, but here's one that will at least get you up and running. Just fill in the price for the day that you had in mind on the first line of the filter..

Fetcher[
set{x, price for xx/yy/zz}
set{dayz, count(x below high,1) * count(x above low,1)}
set{days_crossed, count(dayz equals 1,50)}
set{days_below, count(price below x, 50)}
]


For example, Citigroup (C), had a low of $23.80 50-days ago. Hence, we'll declare "x" as 23.80 in the first line

Fetcher[
set{x, 23.80}
set{dayz, count(x below high,1) * count(x above low,1)}
set{days_crossed, count(dayz equals 1,50)}
set{days_below, count(price below x, 50)}
add to symlist(c)
add column separator
add column low 50 days ago{-50 lo}
add column days_crossed{crossed (-50 lo)}
add column days_below{below (-50 lo)}
add column separator
draw price line at x
]


As you'll note on the chart, the low made 50 days ago will be drawn horizontally on the chart

General Discussion · need help with this one, tried everything with no results, THANKS IN ADVANCE
nikoschopen
msg #63619
6/13/2008 1:42:31 AM

Fetcher[
date offset 9
set{ROI, sum(day change,22)}

add column ROI 88 days ago{January (%)}
add column ROI 66 days ago{February (%)}
add column ROI 44 days ago{March (%)}
add column ROI 22 days ago{April (%)}
add column ROI{May (%)}
]


Note the number used for the "date offset". I used 9 because the month of May ended nine trading days ago. You will need to manually count the days since the end of the previous month and change this number accordingly.

Filter Exchange · Musings & Misgivings: A Collection of Codes
nikoschopen
msg #63613
modified
6/12/2008 7:30:57 PM

Standard deviation for the nonstandard misfitsThis will create those unsightly Bollinger Bands around any indicator of ure choice:
Fetcher[
/*Replace "My_Indicator" with other valid indicator (eg. RSI(2))*/
Set{MA20,CMA(My_Indicator,20)}
set{SD,cstddev(My_Indicator,20)}
set{SD20,2 * SD} /*2 standard deviation*/
set{BOLU,MA20 + SD20}
set{BOLD,MA20 - SD20}

add column BOLU{Upper BB}
add column MA20{Center BB}
add column BOLD{Lower BB}

draw MA20 on plot price
draw BOLU on plot price
draw BOLD on plot price
]


Did you know that Bollinger Width is the same as the Standardard Deviation? As such, the Bollinger Width can be used as a substitute for the Standard Deviation indicator:
Fetcher[
draw Bollinger width(10,1)
draw standard deviation(10,1) on plot Bollinger width(10,1)
]


Here's an imperfect representation of Linear Regression channel that can also be applied to any indicator of ure choice (yeah, this one came up before not too long ago):
Fetcher[
/*Applying 1 Standard Deviation*/
set{SD, cstddev(My_Indicator,60)}
set{SDU, My_Indicator + SD}
set{SDD, My_Indicator - SD}

draw 60 day slope of My_Indicator
draw 60 day slope of SDU on plot My_Indicator
draw 60 day slope of SDD on plot My_Indicator

do not draw SDU
do not draw SDD
]


Here, you can screen stocks with "My_Indicator" at or near any one of the three Linear Regression channels:
Fetcher[
/*1 Standard Deviation*/
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 · Specific Day
nikoschopen
msg #63609
6/12/2008 4:15:39 PM

Speaking of AAPL, this darling looks downright dangerous. It just completed what obviously looks like a double-top pattern. One more down day and this baby is toast.

General Discussion · Specific Day
nikoschopen
msg #63608
modified
6/12/2008 4:11:59 PM

Although it's possible, it's a cumbersome process. You would first need to manually count the days that comprise the date range between today and the desired date (eg. April 15th). Suppose that adds up to 50 days. You would then use that number in the count() function.

Fetcher[
set{days_crossed, count(price crossed below low 50 days ago, 50)}
set{days_below, count(price below low 50 days ago, 50)}
add to symlist(aapl)
add column days_crossed{crossed (-50 lo)}
add column days_below{below (-50 lo)}
]


Columns "crossed (-50 lo)" and "below (-50 lo)" will tell you how many times AAPL crossed below the low of April 15th and how many days remained below the low of April 15th, respectively.

**Edit**

Scrap the above filter. Now that I'm looking at it more closely, it appears that the "low 50 days ago" expression is relative to different days within the count() function. That is, day 1 would count back 50 days, day 2 would count back yet another 50 days,etc.

Filter Exchange · Musings & Misgivings: A Collection of Codes
nikoschopen
msg #63605
6/12/2008 12:14:29 PM

Howdy,

Note that it wasn't my intention to dispute the importance of utilizing RS in ure trading. I was merely alluding to its weakness that you correctly pointed out.

General Discussion · Camarilla Equation
nikoschopen
msg #63604
6/12/2008 11:57:53 AM

Here's the StockFetcher code for Camarilla: Camarilla Pivot Points.

I ain't too sure about "great accuracy" but it does lend support to the important notion of reversion to the mean. But then again, so does every other oscillator under the sun. I would just use it as a general reference point and not put too much emphasis on it. It's far more accurate to use previous resistance or support lines to mark the reversal points than to use some arbitrary numbers derived from previous day's price range.

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

MineUres
Fetcher[
set{range, high 52 week high + low 52 week low}
set{pivot, range + close}
set{pp1yr, pivot / 3}
set{pp2yr, pp1yr 52 weeks ago}
set{ppratio, pp1yr / pp2yr}
set{spx, ind(^spx,ppratio)}
set{ratio, ppratio / spx}
compare to ^spx

add column ppratio{stock (x)}
add column spx{spx (y)}
add column ratio{ratio (x / y)}
]

Fetcher[
set{spx, ind(^spx,close)}
set{y, spx divided by spx 252 days ago}
set{z, close divided by close 252 days ago}
set{spxrs, z divided by y}
compare to ^spx

add column y{stock (x)}
add column z{spx (y)}
add column spxrs{ratio (x / y)}
]


Filter Exchange · Musings & Misgivings: A Collection of Codes
nikoschopen
msg #63592
modified
6/11/2008 10:59:27 PM

Max, thanks for contributing. May I point out, however, one of the things that I find problematic with this filter? I feel that it tells only half the story. We're only given two price points, now (x) and then (y), without any detail on what might have happened between x and y.

Suppose the yearly ROI for S&P and XYZ are -10% and -9%, respectively. Based on these numbers alone, we're led to believe that XYZ is outpacing the general market. What we don't know is that, at one point, XYZ was down more than 30% while S&P was down 15%.

I have no easy answer for this, but could you not include the "yearly high" and the "yearly low" into the equation to get around this problem? Perhaps it could be done in the same way as the Pivot Point: (H + L + C) / 3.

Fetcher[
set{range, high 52 week high + low 52 week low}
set{pivot, range + close}
set{pp1yr, pivot / 3}
set{pp2yr, pp1yr 52 weeks ago}
set{ppratio, pp1yr / pp2yr}
set{spx, ind(^spx,ppratio)}
set{ratio, ppratio / spx}
compare to ^spx

add column ppratio{stock (x)}
add column spx{spx (y)}
add column ratio{ratio (x / y)}
]


Just my 2.

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