StockFetcher Forums · Filter Exchange · Variety of STAT filters ...<< >>Post Follow-up
guru_trader
485 posts
msg #67349
Ignore guru_trader
modified
9/17/2008 3:44:35 AM

Here are some new creations I'm having fun with. I know they can be written with less code, but I have developed a madness to my methods, or, should that be the other way around?

*I was a little sleepy while developing these ... perhaps someone can work out the bugs

guru_trader
485 posts
msg #67350
Ignore guru_trader
modified
9/17/2008 3:45:20 AM

Based on a variety of TRO's stats filters ... what is the maximum potential profit if you ...
+ went long if the OPEN < CLOSE yesterday and exited at the HIGH or
+ went short if OPEN > CLOSE yesterday and exited at the LOW
... kind of like filling the gap stats ... obviously, a "best-case" scenario and unrealistic, but enjoy anyway

Fetcher[
/* Chart Settings */
chart-length is 45 days

/* Basic Criteria */
close > 1
avgVol(100) > 543210
not otcbb
and date offset 0
and sort column 25 descending

/* ==================== */ add column separator /* ==================== */

/* What was today's HIGH - today's OPEN */
set{hiop, high - open}

/* What was the 100 day exponential moVing aVerage of today's HIGH - today's OPEN */
set{cema_hiop, cema(hiop,100)}
add column cema_hiop

/* What was today's OPEN - today's LOW */
set{loop, open - low}

/* What was the 100 day exponential moVing aVerage of today's OPEN - today's LOW */
set{cema_loop, cema(loop,100)}
add column cema_loop

/* What was today's CLOSE - today's OPEN */
set{clop, close - open}

/* What was the 100 day exponential moVing aVerage of today's OPEN - today's LOW */
set{cema_clop, cema(clop,100)}
add column cema_clop

/* ==================== */ add column separator /* ==================== */

/* Count the number of times the OPEN was below yesterday's CLOSE over the last 100 days */
set{cnt_opVcl_last100, count(open < close 1 day ago,100)}
add column cnt_opVcl_last100
draw cnt_opVcl_last100

/* Count the number of times the OPEN was aboVe yesterday's CLOSE over the last 100 days */
set{cnt_opAcl_last100, count(open > close 1 day ago,100)}
add column cnt_opAcl_last100
draw cnt_opAcl_last100

/* ==================== */ add column separator /* ==================== */

/* Was today's OPEN below yesterday's CLOSE */
set{opVcl, count(open < close 1 day ago,1)}
add column opVcl
draw opVcl

/* Was today's OPEN aboVe yesterday's CLOSE */
set{opAcl, count(open > close 1 day ago,1)}
add column opAcl
draw opAcl

/* ==================== */ add column separator /* ==================== */

/* On those days when OPEN was < yesterday's CLOSE, what could you haVe earned if you bought at the OPEN and sold at the HIGH on those days */
set{hiop_on_opVcl, hiop * opVcl}
add column hiop_on_opVcl
draw hiop_on_opVcl

/* On those days when OPEN was > yesterday's CLOSE, what could you haVe earned if you bought at the OPEN and sold at the LOW on those days */
set{loop_on_opAcl, loop * opAcl}
add column loop_on_opAcl
draw loop_on_opAcl

/* ==================== */ add column separator /* ==================== */

/* On those days when OPEN was < yesterday's CLOSE, what was the cum sum of the HIOP over the last 100 days */
set{sum_hiop_on_opVcl_last100, sum(hiop_on_opVcl,100)}
add column sum_hiop_on_opVcl_last100
draw sum_hiop_on_opVcl_last100

/* On those days when OPEN was < yesterday's CLOSE, what was the aVerage HIOP over the last 100 days */
set{avg_hiop_on_opVcl_last100, sum_hiop_on_opVcl_last100 / cnt_opVcl_last100}
add column avg_hiop_on_opVcl_last100
draw avg_hiop_on_opVcl_last100

/* On those days when OPEN was > yesterday's CLOSE, what was the cum sum of the LOOP over the last 100 days */
set{sum_loop_on_opAcl_last100, sum(loop_on_opAcl,100)}
add column sum_loop_on_opAcl_last100
draw sum_loop_on_opAcl_last100

/* On those days when OPEN was > yesterday's CLOSE, what was the aVerage LOOP over the last 100 days */
set{avg_loop_on_opAcl_last100, sum_loop_on_opAcl_last100 / cnt_opAcl_last100}
add column avg_loop_on_opAcl_last100
draw avg_loop_on_opAcl_last100

/* ==================== */ add column separator /* ==================== */

/* What was your maximum potential profit if you went long if the OPEN < CLOSE yesterday and exited at the HIGH or went short if OPEN > CLOSE yesterday and exited at the LOW ... obviously, a "best-case" scenario and unrealistic */
set{max_pp_for_today, hiop_on_opVcl + loop_on_opAcl}
add column max_pp_for_today
draw max_pp_for_today

/* Over the last 100 days, what was your maximum potential profit if you went long if the OPEN < CLOSE yesterday and exited at the HIGH or went short if OPEN > CLOSE yesterday and exited at the LOW ... obviously, a "best-case" scenario and unrealistic */
set{sum_max_pp_last_100, sum(max_pp_for_today, 100)}
add column sum_max_pp_last_100
draw sum_max_pp_last_100
]



guru_trader
485 posts
msg #67351
Ignore guru_trader
modified
9/17/2008 3:52:47 AM

Same filter as above, the only difference is that instead of exiting at the HIGH or LOW of the day we exit at the 100 day exponential moving average of the HIGH or LOW of the day ... maybe more realistic

Fetcher[
/* Chart Settings */
chart-length is 45 days

/* Basic Criteria */
close > 1
avgVol(100) > 543210
not otcbb
and date offset 0
and sort column 25 descending

/* ==================== */ add column separator /* ==================== */

/* What was today's HIGH - today's OPEN */
set{hiop, high - open}

/* What was the 100 day exponential moVing aVerage of today's HIGH - today's OPEN */
set{cema_hiop, cema(hiop,100)}
add column cema_hiop

/* What was today's OPEN - today's LOW */
set{loop, open - low}

/* What was the 100 day exponential moVing aVerage of today's OPEN - today's LOW */
set{cema_loop, cema(loop,100)}
add column cema_loop

/* What was today's CLOSE - today's OPEN */
set{clop, close - open}

/* What was the 100 day exponential moVing aVerage of today's OPEN - today's LOW */
set{cema_clop, cema(clop,100)}
add column cema_clop

/* ==================== */ add column separator /* ==================== */

/* Count the number of times the OPEN was below yesterday's CLOSE over the last 100 days */
set{cnt_opVcl_last100, count(open < close 1 day ago,100)}
add column cnt_opVcl_last100
draw cnt_opVcl_last100

/* Count the number of times the OPEN was aboVe yesterday's CLOSE over the last 100 days */
set{cnt_opAcl_last100, count(open > close 1 day ago,100)}
add column cnt_opAcl_last100
draw cnt_opAcl_last100

/* ==================== */ add column separator /* ==================== */

/* Was today's OPEN below yesterday's CLOSE */
set{opVcl, count(open < close 1 day ago,1)}
add column opVcl
draw opVcl

/* Was today's OPEN aboVe yesterday's CLOSE */
set{opAcl, count(open > close 1 day ago,1)}
add column opAcl
draw opAcl

/* ==================== */ add column separator /* ==================== */

/* On those days when OPEN was < yesterday's CLOSE, what could you haVe earned if you bought at the OPEN and sold at the 100 day exponential moving average of the HIGH on those days */
set{hiop_on_opVcl, cema_hiop * opVcl}
add column hiop_on_opVcl
draw hiop_on_opVcl

/* On those days when OPEN was > yesterday's CLOSE, what could you haVe earned if you bought at the OPEN and sold at the 100 day exponential moving average of the LOW on those days */
set{loop_on_opAcl, cema_loop * opAcl}
add column loop_on_opAcl
draw loop_on_opAcl

/* ==================== */ add column separator /* ==================== */

/* On those days when OPEN was < yesterday's CLOSE, what was the cum sum of the HIOP over the last 100 days */
set{sum_hiop_on_opVcl_last100, sum(hiop_on_opVcl,100)}
add column sum_hiop_on_opVcl_last100
draw sum_hiop_on_opVcl_last100

/* On those days when OPEN was < yesterday's CLOSE, what was the aVerage HIOP over the last 100 days */
set{avg_hiop_on_opVcl_last100, sum_hiop_on_opVcl_last100 / cnt_opVcl_last100}
add column avg_hiop_on_opVcl_last100
draw avg_hiop_on_opVcl_last100

/* On those days when OPEN was > yesterday's CLOSE, what was the cum sum of the LOOP over the last 100 days */
set{sum_loop_on_opAcl_last100, sum(loop_on_opAcl,100)}
add column sum_loop_on_opAcl_last100
draw sum_loop_on_opAcl_last100

/* On those days when OPEN was > yesterday's CLOSE, what was the aVerage LOOP over the last 100 days */
set{avg_loop_on_opAcl_last100, sum_loop_on_opAcl_last100 / cnt_opAcl_last100}
add column avg_loop_on_opAcl_last100
draw avg_loop_on_opAcl_last100

/* ==================== */ add column separator /* ==================== */

/* What was your maximum potential profit if you went long if the OPEN < CLOSE yesterday and exited at the HIGH or went short if OPEN > CLOSE yesterday and exited at the LOW ... obviously, a best-case scenario and unrealistic */
set{max_pp_for_today, hiop_on_opVcl + loop_on_opAcl}
add column max_pp_for_today
draw max_pp_for_today

/* Over the last 100 days, what was your maximum potential profit if you went long if the OPEN < CLOSE yesterday and exited at the HIGH or went short if OPEN > CLOSE yesterday and exited at the LOW ... obviously, a best-case scenario and unrealistic */
set{sum_max_pp_last_100, sum(max_pp_for_today, 100)}
add column sum_max_pp_last_100
draw sum_max_pp_last_100
]



guru_trader
485 posts
msg #67352
Ignore guru_trader
modified
9/17/2008 3:59:55 AM

Same filter as above, the only difference is that we exit at the CLOSE of the day ... "worst case scenario"

Fetcher[
/* Chart Settings */
chart-length is 45 days

/* Basic Criteria */
close > 1
avgVol(100) > 543210
not otcbb
and date offset 0
and sort column 25 descending

/* ==================== */ add column separator /* ==================== */

/* What was today's HIGH - today's OPEN */
set{hiop, high - open}

/* What was the 100 day exponential moVing aVerage of today's HIGH - today's OPEN */
set{cema_hiop, cema(hiop,100)}
add column cema_hiop

/* What was today's OPEN - today's LOW */
set{loop, open - low}

/* What was the 100 day exponential moVing aVerage of today's OPEN - today's LOW */
set{cema_loop, cema(loop,100)}
add column cema_loop

/* What was today's CLOSE - today's OPEN */
set{clop, close - open}

/* What was the 100 day exponential moVing aVerage of today's OPEN - today's LOW */
set{cema_clop, cema(clop,100)}
add column cema_clop

/* ==================== */ add column separator /* ==================== */

/* Count the number of times the OPEN was below yesterday's CLOSE over the last 100 days */
set{cnt_opVcl_last100, count(open < close 1 day ago,100)}
add column cnt_opVcl_last100
draw cnt_opVcl_last100

/* Count the number of times the OPEN was aboVe yesterday's CLOSE over the last 100 days */
set{cnt_opAcl_last100, count(open > close 1 day ago,100)}
add column cnt_opAcl_last100
draw cnt_opAcl_last100

/* ==================== */ add column separator /* ==================== */

/* Was today's OPEN below yesterday's CLOSE */
set{opVcl, count(open < close 1 day ago,1)}
add column opVcl
draw opVcl

/* Was today's OPEN aboVe yesterday's CLOSE */
set{opAcl, count(open > close 1 day ago,1)}
add column opAcl
draw opAcl

/* ==================== */ add column separator /* ==================== */

/* On those days when OPEN was < yesterday's CLOSE, what could you haVe earned if you bought at the OPEN and sold at the CLOSE - OPEN on those days */
set{hiop_on_opVcl, clop * opVcl}
add column hiop_on_opVcl
draw hiop_on_opVcl

/* On those days when OPEN was > yesterday's CLOSE, what could you haVe earned if you bought at the OPEN and sold at the CLOSE - OPEN on those days */
set{loop_on_opAcl, clop * opAcl}
add column loop_on_opAcl
draw loop_on_opAcl

/* ==================== */ add column separator /* ==================== */

/* On those days when OPEN was < yesterday's CLOSE, what was the cum sum of the HIOP over the last 100 days */
set{sum_hiop_on_opVcl_last100, sum(hiop_on_opVcl,100)}
add column sum_hiop_on_opVcl_last100
draw sum_hiop_on_opVcl_last100

/* On those days when OPEN was < yesterday's CLOSE, what was the aVerage HIOP over the last 100 days */
set{avg_hiop_on_opVcl_last100, sum_hiop_on_opVcl_last100 / cnt_opVcl_last100}
add column avg_hiop_on_opVcl_last100
draw avg_hiop_on_opVcl_last100

/* On those days when OPEN was > yesterday's CLOSE, what was the cum sum of the LOOP over the last 100 days */
set{sum_loop_on_opAcl_last100, sum(loop_on_opAcl,100)}
add column sum_loop_on_opAcl_last100
draw sum_loop_on_opAcl_last100

/* On those days when OPEN was > yesterday's CLOSE, what was the aVerage LOOP over the last 100 days */
set{avg_loop_on_opAcl_last100, sum_loop_on_opAcl_last100 / cnt_opAcl_last100}
add column avg_loop_on_opAcl_last100
draw avg_loop_on_opAcl_last100

/* ==================== */ add column separator /* ==================== */

/* What was your maximum potential profit if you went long if the OPEN < CLOSE yesterday and exited at the HIGH or went short if OPEN > CLOSE yesterday and exited at the LOW ... obviously, a best-case scenario and unrealistic */
set{max_pp_for_today, hiop_on_opVcl + loop_on_opAcl}
add column max_pp_for_today
draw max_pp_for_today

/* Over the last 100 days, what was your maximum potential profit if you went long if the OPEN < CLOSE yesterday and exited at the HIGH or went short if OPEN > CLOSE yesterday and exited at the LOW ... obviously, a best-case scenario and unrealistic */
set{sum_max_pp_last_100, sum(max_pp_for_today, 100)}
add column sum_max_pp_last_100
draw sum_max_pp_last_100
]



StockFetcher Forums · Filter Exchange · Variety of STAT filters ...<< >>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 2016 - 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