StockFetcher Forums · General Discussion · Lowest High Combo?<< >>Post Follow-up
mktmole
325 posts
msg #121919
Ignore mktmole
11/5/2014 5:41:53 PM

" The lowest high of either 2 or 3 days ago is below the lowest high of the prior 10 days. "

Help to code the above would be much appreciated.
Thank you.

rgds,
mm

mahkoh
895 posts
msg #121936
Ignore mahkoh
modified
11/6/2014 2:39:27 PM

Fetcher[

s&p 500
chartlength 13 days

set{a,high 13 days ago}
set{b,high 12 days ago}
set{c,high 11 days ago}
set{d,high 10 days ago}
set{e,high 9 days ago}
set{f,high 8 days ago}
set{g,high 7 days ago}
set{h,high 6 days ago}
set{i,high 5 days ago}
set{j,high 4 days ago}
set{k,high 3 days ago}
set{l,high 2 days ago}

set{aa,min(a,b)}
set{ab,min(c,d)}
set{ac,min(e,f)}
set{ad,min(g,h)}
set{ae,min(i,j)}

set{zz,min(k,l)}
zz below aa
zz below ab
zz below ac
zz below ad
zz below ae

draw price line at zz
]



This should do it



mktmole
325 posts
msg #121960
Ignore mktmole
11/7/2014 4:22:31 PM

Thanks kindly mahkoh,
rgds
mm

mahkoh
895 posts
msg #121969
Ignore mahkoh
11/9/2014 3:08:59 AM

You're welcome. Are you looking for some consistent outcome following this pattern?

mktmole
325 posts
msg #121990
Ignore mktmole
11/13/2014 11:14:55 AM

mahkoh, here you go, work in progress. a reversal.

Fetcher[
and add column Average Volume (40)
/*ADD PRICE AND LIQUIDITY REQUIREMENTS TO AVOID GETTING SCREWED ON
BID/ASK SPREADS*/
set{liquidity, close * volume}
count(liquidity above 500,000,10)
and add column count(liquidity above 500,000,10)
and do not draw liquidity

set{diff, volume - volume 1 day ago}
set{diffratio, diff / volume 1 day ago}
set{vspike, diffratio*100.0}
and do not draw vspike
and add column vspike

/* TODAY'S BAR */
and high reached a 3 day high
and do not draw high 3 day high
set{hidiff, high - high 1 day ago}
set{hidiffratio, hidiff / high 1 day ago}
set{high_spike, hidiffratio*100.0}
and do not draw high_spike
and add column high_spike
and high > 0.5% above high 1 day ago
and close below day position(0.41)
and do not draw day position(0.41)

set{Lowest_High19, High 19 day Low}
and add column lowest_high19 and draw lowest_high19 on plot price

/* Lowest High of Either 2 or 3 Days Ago IS EQUAL TO or BELOW the Lowest High in the Past 19 Days, above */
set{high2, High 2 days ago} and add column high2{high2daysago}
set{high3, High 3 days ago} and add column high3{high3daysago}

/* set{high2dwn, count(high2 is below Lowest_High19,1)}
and add column high2dwn */

set{my_diff, Lowest_high19 - high2}
/* and add column my_diff
show stocks where my_diff equal 0 */

/* set{high3dwn, count(high3 is below Lowest_High19,1)}
and add column high3dwn */

set{my_diff2, Lowest_high19 - high3}
/* and add column my_diff2
show stocks where my_diff2 equal 0 */

/* Either High, 2 OR 3 days ago is below the 19 Day lowest High */
and my_diff OR my_diff2 equal 0

and price above 1
and average volume(45) above 100,000
and chart-scale is log
and market is not otcbb

and chart-type is OHLC
and chart-length is 40 days
and sort by column 8 descending

offset 11/11/2014
]



mahkoh
895 posts
msg #121991
Ignore mahkoh
11/13/2014 3:51:59 PM

I think you'd need to phrase

and my_diff OR my_diff2 equal 0

like this

set{x,count(my_diff equal 0,1)}
set{y,count(my_diff2 equal 0,1)}
set{z,x + y}
y above 0.5


But

set{Lowest_High19, High 19 day Low}

is a much better solution for the original problem.

mktmole
325 posts
msg #121992
Ignore mktmole
11/14/2014 11:37:06 AM

thanks! tried re-phrasing suggested but that seems to have a hiccup somewhere

Fetcher[and add column Average Volume (40)
count(liquidity above 500,000,10)
and add column count(liquidity above 500,000,10)
and do not draw liquidity
and draw ema(8) and draw ma(20) and draw ma(50)

set{diff, volume - volume 1 day ago}
set{diffratio, diff / volume 1 day ago}
set{vspike, diffratio*100.0}
and do not draw vspike
and add column vspike

/* TODAY'S BAR */
and high reached a 3 day high
and do not draw high 3 day high
set{hidiff, high - high 1 day ago}
set{hidiffratio, hidiff / high 1 day ago}
set{high_spike, hidiffratio*100.0}
and do not draw high_spike
and add column high_spike
and high > 0.5% above high 1 day ago
and close below day position(0.41)
and do not draw day position(0.41)


set{Lowest_High19, High 19 day Low}
and add column lowest_high19 and draw lowest_high19 on plot price

/* Lowest High of Either 2 or 3 Days Ago IS EQUAL TO or BELOW the Lowest High in the Past 19 Days, above */
set{high2, High 2 days ago} and add column high2{high2daysago}
set{high3, High 3 days ago} and add column high3{high3daysago}

set{high2dwn, count(high2 is below Lowest_High19,1)}
and add column high2dwn

set{my_diff, Lowest_high19 - high2}
and add column my_diff
/* show stocks where my_diff equal 0 */

set{high3dwn, count(high3 is below Lowest_High19,1)}
and add column high3dwn

set{my_diff2, Lowest_high19 - high3}
and add column my_diff2
/* show stocks where my_diff2 equal 0 */

/* Either High, 2 OR 3 days ago is below the 19 Day lowest High */
/* and my_diff OR my_diff2 equal 0 */

set{x,count(my_diff equal 0,1)}
set,{y,count(my_diff2 equal 0,1)}
set{z,x + y }
and y above 0.5

and price above 1
and average volume(45) above 100,000
and chart-scale is log
and market is not otcbb

and chart-type is OHLC
and chart-length is 40 days
]




mahkoh
895 posts
msg #121993
Ignore mahkoh
modified
11/14/2014 1:52:42 PM

Fetcher[
and add column Average Volume (40)
/*ADD PRICE AND LIQUIDITY REQUIREMENTS TO AVOID GETTING SCREWED ON
BID/ASK SPREADS*/
set{liquidity, close * volume}
count(liquidity above 500,000,10) above 8
and add column count(liquidity above 500,000,10)
and do not draw liquidity

set{diff, volume - volume 1 day ago}
set{diffratio, diff / volume 1 day ago}
set{vspike, diffratio*100.0}
and do not draw vspike
and add column vspike

/* TODAY'S BAR */
and high reached a 3 day high
and do not draw high 3 day high
set{hidiff, high - high 1 day ago}
set{hidiffratio, hidiff / high 1 day ago}
set{high_spike, hidiffratio*100.0}
and do not draw high_spike
and add column high_spike
and high > 0.5% above high 1 day ago
and close below day position(0.41)
and do not draw day position(0.41)

set{Lowest_High19, High 19 day Low}
and add column lowest_high19 and draw lowest_high19 on plot price

/* Lowest High of Either 2 or 3 Days Ago IS EQUAL TO or BELOW the Lowest High in the Past 19 Days, above */
set{high2, High 2 days ago} and add column high2{high2daysago}
set{high3, High 3 days ago} and add column high3{high3daysago}

/* set{high2dwn, count(high2 is below Lowest_High19,1)}
and add column high2dwn */

set{my_diff, Lowest_high19 - high2}
/* and add column my_diff
show stocks where my_diff equal 0 */

/* set{high3dwn, count(high3 is below Lowest_High19,1)}
and add column high3dwn */

set{my_diff2, Lowest_high19 - high3}
/* and add column my_diff2
show stocks where my_diff2 equal 0 */

/* Either High, 2 OR 3 days ago is below the 19 Day lowest High */
/*and my_diff OR my_diff2 equal 0*/
set{x,count(my_diff equal 0,1)}
set{y,count(my_diff2 equal 0,1)}
set{z,x + y}
z above 0.5

and price above 1
and average volume(45) above 100,000
and chart-scale is log
and market is not otcbb

and chart-type is OHLC
and chart-length is 40 days
and sort by column 8 descending

offset 11/11/2014
]



Careful where you place your comma's.
A few other adjustments:

count(liquidity above 500,000,10) above 8

to ensure consistent liquidity rather than today's

and z has to be >0.5, not y

StockFetcher Forums · General Discussion · Lowest High Combo?<< >>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