StockFetcher Forums · View by Author: guru_trader (485 messages) ·  [ Display By: Date / Subject ]<< 1 2 3 4 5 ... 49 >> 
General Discussion · Newbie needs some help....please!
guru_trader
msg #110366
1/19/2013 11:51:00 PM

How you define divergence is also important ... divergence over what period of time (how many weeks)? What % of divergence is considered significant enough for you?

Filter Exchange · Year to Date Return
guru_trader
msg #110339
1/18/2013 3:47:53 PM

SF staff (in response to a recent post of mine): the "date()" function is an example of (it seems) a reasonable feature request ... in addition to a formal "if..then..else" statement and "set" statements that accept more than 2 values.

Filter Exchange · ETF Quant Report by Level 3 Data
guru_trader
msg #110338
modified
1/18/2013 3:38:02 PM

ETF Quant Report for Swing Traders by Level3Data.com @ http://www.level3data.com/l3d-quant-report.html

Demo video here ... http://www.youtube.com/watch?v=Oa6iiO04Gx8

Someone create a "Buying & Selling Pressure" SF screen for this.

Filter Exchange · Need help to combine oversold scan with MACD - PRICE Divergence filter
guru_trader
msg #110310
1/18/2013 3:20:46 AM

How many days lookback of MACD-Price divergence did you need? Does it matter if the divergence is positive or negative?

Fetcher[
close between 1 and 10
volume > 1000000
rsi(14) between 10 and 30
market cap between 100 and 2000

add column rsi(14)
add column market cap

draw MACD histogram(12,26)
]



Filter Exchange · trading the right stocks by stocksforextradingeducation@gmail.com
guru_trader
msg #110309
modified
1/18/2013 2:47:11 AM

"Looks like Mary is back" is right ... LOL ... that was awesom SAFeTRADE

re "this is not Mary!" ... how does Gloria (or Robert), with 6 posts, know who "Mary" is?!

Filter Exchange · Year to Date Return
guru_trader
msg #110308
1/18/2013 2:41:03 AM

Could you describe a little more what you are trying to do? Give some example scenarios, etc.?

Filter Exchange · Statistic for up/down comparison with SPY
guru_trader
msg #110307
modified
1/18/2013 2:25:47 AM

While working on this filter, I discovered a few issues -- some related to your request and some related to Stockfetcher.

LEGEND: "up" = ( close > open )"; "down" = ( close < open ); "flat" = ( close = open ); SYM is the abbreviation for any symbol

First, there are several combinations of scenarios that need clarification. How should the following be treated?
SPY.....SYM
up........up = both up
up........down = both not up
up........flat = both up? both not up? both not up or down?

down........up = both not up
down........down = both down
down........flat = both down? both not down? both not down or up?

flat..........up = both up? both not up? both not up or down?
flat..........down = both down? both not down? both not down or up?
flat..........flat = both up? both down? both not up or down? both equal to 0?

You see, we could, at least, add another category equal to both being flat, but that seems like a rare event (only 2 days in the last 100 for SPY). It's more likely that either SPY or SYM will, independently, be flat while the other closes up or down. Alternatively, the flat days could be lumped into the "up" (or "down") category. So, how should those be handled?

Another, potentially bigger, problem is Stockfetcher not returning the expected value for sym_up (close>open), sym_dn (close
In theory, there should be no such day in which all of these conditions added together is greater than 1 ... (close > open) and/or (close < open) and/or (close = open). (I had to add paragraphs because, for some reason, the Stockfetcher forum is chopping up my post and omitting parts).

However, Stockfetcher is reporting about 20-30 symbols equal to 2 -- sort column "sum_sym" descending and see for yourself. That "bug" (or "quirk", or "feature") will negate some of our efforts to properly categorize up, down, and flat days.

Anyway, here is the uncluttered version ...
Fetcher[
/* today's stats on SPY */
set{spy_clop, ind(SPY,close) - ind(SPY,open)} /* close - open on SPY */
set{spy_up, count(spy_clop > 0, 1)} /* was today an "up" day for SPY, 1 = yes, 0 = no */
set{spy_dn, count(spy_clop < 0, 1)} /* was today a "down" day for SPY, 1 = yes, 0 = no */
set{spy_flat, count(spy_clop equals 0, 1)} /* was today a "flat" day for SPY, 1 = yes, 0 = no */
set{tmp_sum_spy, spy_up + spy_dn}
set{sum_spy, tmp_sum_spy + spy_flat} /* verify that there is no such thing as a sum of 2 or 3 */

/* 100 day stats on SPY */
set{spy_up_100d, count(spy_clop > 0, 100)} /* count number of "up" days for SPY over last 100 days */
set{spy_dn_100d, count(spy_clop < 0, 100)} /* count number of "down" days for SPY over last 100 days */
set{spy_flat_100d, count(spy_clop equals 0, 100)} /* count number of "flat" days for SPY over last 100 days */

/* today's stats on symbol */
set{sym_clop, close - open} /* close - open on SYM */
set{sym_up, count(sym_clop > 0, 1)} /* was today an "up" day for SYM, 1 = yes, 0 = no */
set{sym_dn, count(sym_clop < 0, 1)} /* was today a "down" day for SYM, 1 = yes, 0 = no */
set{sym_flat, count(sym_clop equals 0, 1)} /* was today a "flat" day for SYM, 1 = yes, 0 = no */
set{tmp_sum_sym, sym_up + sym_dn}
set{sum_sym, tmp_sum_sym + sym_flat} /* verify that there is no such thing as a sum of 2 or 3 */

/* 100 day stats on SYM */
set{sym_up_100d, count(sym_clop > 0, 100)} /* count number of "up" days for SYM over last 100 days */
set{sym_dn_100d, count(sym_clop < 0, 100)} /* count number of "down" days for SYM over last 100 days */
set{sym_flat_100d, count(sym_clop equals 0, 100)} /* count number of "flat" days for SYM over last 100 days */

add column separator

set{both_up_1d, spy_up + sym_up} /* count number of times "SPY" and "SYM" were "up" in the same day over the last 1 day */
set{both_up_100d, count(both_up_1d equals 2, 100)} /* count number of times "SPY" and "SYM" were "up" in the same day over the last 100 days */
add column both_up_100d

set{both_dn_1d, spy_dn + sym_dn} /* count number of times "SPY" and "SYM" were "down" in the same day over the last 1 day */
set{both_dn_100d, count(both_dn_1d equals 2, 100)} /* count number of times "SPY" and "SYM" were "down" in the same day over the last 100 days */
add column both_dn_100d

set{both_flat_1d, spy_flat + sym_flat} /* count number of times "SPY" and "SYM" were "flat" in the same day over the last 1 day */
set{both_flat_100d, count(both_flat_1d equals 2, 100)} /* count number of times "SPY" and "SYM" were "flat" in the same day over the last 100 days */
add column both_flat_100d

add column separator

set{sum_updn_100d, both_up_100d + both_dn_100d} /* count the number of times "SPY" and "SYM" were "up" and "down" over the last 100 days */
add column sum_updn_100d

set{sum_updnflat_100d, sum_updn_100d + both_flat_100d} /* count the number of times "SPY" and "SYM" were "up" and "down" and "flat" over the last 100 days */
add column sum_updnflat_100d

add column separator

sort column 11 descending
]



Here is the full ("cluttered") version, for viewing the "bug" (or "quirk", or "feature") in Stockfetcher ... see the column labeled, "sum_sym" ... I don't think it should include any values greater than 1, but it does.

Fetcher[
add column separator

/* today's stats on SPY */
set{spy_clop, ind(SPY,close) - ind(SPY,open)} /* close - open on SPY */
add column spy_clop
set{spy_up, count(spy_clop > 0, 1)} /* was today an "up" day for SPY, 1 = yes, 0 = no */
add column spy_up
set{spy_dn, count(spy_clop < 0, 1)} /* was today a "down" day for SPY, 1 = yes, 0 = no */
add column spy_dn
set{spy_flat, count(spy_clop equals 0, 1)} /* was today a "flat" day for SPY, 1 = yes, 0 = no */
add column spy_flat
set{tmp_sum_spy, spy_up + spy_dn}
set{sum_spy, tmp_sum_spy + spy_flat} /* verify that there is no such thing as a sum of 2 or 3 */
add column sum_spy

add column separator

/* 100 day stats on SPY */
add column sum_spy
set{spy_up_100d, count(spy_clop > 0, 100)} /* count number of "up" days for SPY over last 100 days */
add column spy_up_100d
set{spy_dn_100d, count(spy_clop < 0, 100)} /* count number of "down" days for SPY over last 100 days */
add column spy_dn_100d
set{spy_flat_100d, count(spy_clop equals 0, 100)} /* count number of "flat" days for SPY over last 100 days */
add column spy_flat_100d

add column separator

/* today's stats on symbol */
set{sym_clop, close - open} /* close - open on SYM */
add column sym_clop
set{sym_up, count(sym_clop > 0, 1)} /* was today an "up" day for SYM, 1 = yes, 0 = no */
add column sym_up
set{sym_dn, count(sym_clop < 0, 1)} /* was today a "down" day for SYM, 1 = yes, 0 = no */
add column sym_dn
set{sym_flat, count(sym_clop equals 0, 1)} /* was today a "flat" day for SYM, 1 = yes, 0 = no */
add column sym_flat
set{tmp_sum_sym, sym_up + sym_dn}
set{sum_sym, tmp_sum_sym + sym_flat} /* verify that there is no such thing as a sum of 2 or 3 */
add column sum_sym

add column separator

/* open and close values added to confirm problem with sum_sym = 2 */
add column open
add column close

add column separator

/* 100 day stats on SYM */
add column sum_sym
set{sym_up_100d, count(sym_clop > 0, 100)} /* count number of "up" days for SYM over last 100 days */
add column sym_up_100d
set{sym_dn_100d, count(sym_clop < 0, 100)} /* count number of "down" days for SYM over last 100 days */
add column sym_dn_100d
set{sym_flat_100d, count(sym_clop equals 0, 100)} /* count number of "flat" days for SYM over last 100 days */
add column sym_flat_100d

add column separator

set{both_up_1d, spy_up + sym_up} /* count number of times "SPY" and "SYM" were "up" in the same day over the last 1 day */
set{both_up_100d, count(both_up_1d equals 2, 100)} /* count number of times "SPY" and "SYM" were "up" in the same day over the last 100 days */
add column both_up_100d

set{both_dn_1d, spy_dn + sym_dn} /* count number of times "SPY" and "SYM" were "down" in the same day over the last 1 day */
set{both_dn_100d, count(both_dn_1d equals 2, 100)} /* count number of times "SPY" and "SYM" were "down" in the same day over the last 100 days */
add column both_dn_100d

set{both_flat_1d, spy_flat + sym_flat} /* count number of times "SPY" and "SYM" were "flat" in the same day over the last 1 day */
set{both_flat_100d, count(both_flat_1d equals 2, 100)} /* count number of times "SPY" and "SYM" were "flat" in the same day over the last 100 days */
add column both_flat_100d

add column separator

set{sum_updn_100d, both_up_100d + both_dn_100d} /* count the number of times "SPY" and "SYM" were "up" and "down" over the last 100 days */
add column sum_updn_100d

set{sum_updnflat_100d, sum_updn_100d + both_flat_100d} /* count the number of times "SPY" and "SYM" were "up" and "down" and "flat" over the last 100 days */
add column sum_updnflat_100d

add column separator
]



This got me thinking -- this sounds a lot like correlation studies. Here are some correlation studies (using a lot less code) to investigate:
Fetcher[
set{clop, close - open}
draw clop

add column corr(SPY,100,clop)
draw IND(SPY,clop) on plot clop
draw corr(SPY,100,clop)
compare with SPY
sort column 5 descending

add column corr(^SPX,60,Close)
compare with ^SPX
]



You'll notice that the order of symbols is about the same on both filters ... as expected.

General Discussion · Cutler's RSI indicator
guru_trader
msg #110298
modified
1/17/2013 2:16:26 PM

Then it's time to upgrade your subscription! :)

Actually, I just caught an error in the script. I didn't consider when the denominator is 0 ... I'll fix that soon. [*fixed, and posted above]

General Discussion · Cutler's RSI indicator
guru_trader
msg #110292
modified
1/17/2013 12:27:57 PM

Here is my attempt at Cutler's RSI. I noticed there are several definitions of how to calculate it, so let me know if it should be calculated differently. To change the lookback days, simply change the "14" to whatever days you want.

Fetcher[
chart-length is 90
not otcbb

set{clcl, close - close 1 day ago}

/* get SMA of Up Days */
set{is_upday, count(close > close 1 day ago,1)}
set{upday, is_upday * clcl}
set{sum_updays, sum(upday,14)}
set{cnt_updays, count(close > close 1 day ago,14)}
set{sma_updays, sum_updays / cnt_updays}
add column sma_updays

/* get SMA of Down Days */
set{is_dnday, count(close < close 1 day ago,1)}
set{dnday, is_dnday * clcl}
set{sum_dndays, sum(dnday,14)}
set{cnt_dndays, count(close < close 1 day ago,14)}
set{tmp_sma_dndays, sum_dndays / cnt_dndays}
set{sma_dndays, abs(tmp_sma_dndays)}

/* get Cutler's RSI */
set{sddi0, count(sma_dndays equals 0,1)}
set{sddn0, sma_updays / sma_dndays}
set{rs, sddi0 + sddn0}
set{n1, 1 + rs}
set{n2, 100 / n1}
set{crsi, 100 - n2}
add column crsi
draw crsi
draw rsi(14) on plot crsi
]



* fixed code to account for situation when RS denominator (sum of down days) = 0

General Discussion · Laguerre RSI
guru_trader
msg #110224
1/16/2013 2:42:15 AM

Ya -- it's very frustrating -- SF does not seem to care much about what features their customers want, they have their own agenda ... desktop versions, ipad versions, all that time and money spent without adding features many of us have been requesting for years and years and years

StockFetcher Forums ·  · << 1 2 3 4 5 ... 49 >>

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