StockFetcher Forums · Filter Exchange · Best filter to detect breakouts<< >>Post Follow-up
byebyemoney
31 posts
msg #149249
Ignore byebyemoney
9/28/2019 3:38:14 PM

This is my best filter to detect breakouts. If it gives you a warning that you need the advanced subscription, simply click the filter to bring it up in the editor and click on "Fetch Stocks" button twice. It should populate the second time.

This filter detects breakouts by finding the 10 day high within 10 days and a 20 day high within 60 days and calculating the value if a trendline were to connect those two highs and extend it till today. After it calculates that it pulls up any stocks that has a close that crossed above that value. Hope this helps. Only finds descending trendlines

Any comments would be helpful or modifications

Fetcher[
chart-length is 9 months
optionable
market is not otcbb
market is not etf

/*trendline calculation. finds 10 days high within 10 days and the 20 day high within 60 days and calculates the value if a line connected the two highs to today. The condition is when the price crosses above that calculated value*/
set{ipeak1offset, days(high reached new 10 day high,10) 3 days ago}
set{ipeak1, ipeak1offset + 3} /*add offset of days ago above*/
ipeak1 is above 3 /*add offset of days ago above*/
set{vpeak1, varOffset(high, ipeak1)}

set{ipeak2offset, days(high reached new 20 day high,50) 13 days ago}
set{ipeak2, ipeak2offset + 13} /*add offset of days ago above*/
ipeak2 is above 13 /*add offset of days ago above*/
set{vpeak2, varOffset(high, ipeak2)}

set{gapday, ipeak2-ipeak1}

vpeak2 is above vpeak1
ipeak2 is above ipeak1
ipeak1 is above 0
gapday is above 3

/*calculation to find value of the trendline today*/
set{ydiff, vpeak2-vpeak1}
set{xdiff, ipeak2-ipeak1}
set{slope, ydiff/xdiff}
set{mx, slope * ipeak2}
set{supportline, vpeak2-mx}
set{ratioclosetrend, close/supportline}

/*conditions when the close crosses above the calculated trendline*/
close crossed above supportline

/*debug columns*/
/*
add column ipeak1
add column ipeak2
add column vpeak1
add column vpeak2
add column gapday
add column slope
add column supportline
*/

do not draw vpeak1
do not draw vpeak2
do not draw ipeak1
do not draw ipeak2
do not draw supportline
do not draw gapday
do not draw ratioclosetrend

/*draws line at the highs used and value of the trendline if extended to today*/
draw price line at supportline
draw price line at vpeak1
draw price line at vpeak2
]




nibor100
1,044 posts
msg #149251
Ignore nibor100
9/30/2019 11:22:23 AM

@byebyemoney,

First, Thanks for making me aware of the "varOffset(, )" command it should prove to be very useful.

Regarding your filter,
a. it seems everything starts 3 days ago for some reason, can you explain why? as the 10 day high within 10 days is kind of within 13 days ago, etc.

b. it appears you are filtering for Ipeak as both >3 and >0, I suspect SF is only using one of them.

c. The variable GapDay and xdiff seem to be the same value, you can probably simplify your filter by using the same variable name in all places those 2 are named.

Thanks,
Ed S.

snappyfrog
731 posts
msg #149256
Ignore snappyfrog
10/1/2019 5:54:36 PM

Results have been very promising.

byebyemoney
31 posts
msg #149271
Ignore byebyemoney
10/2/2019 7:39:51 PM

@nibor100

Thanks for the response!

a. it seems everything starts 3 days ago for some reason, can you explain why? as the 10 day high within 10 days is kind of within 13 days ago, etc.

This is a good question. I do this as part of my tweaking. I want to find a 10 day high a couple days from today. This really is just to give some space for the highs to form. But you are more than free to remove that, but you will have to also remove the offset or adjust the offset to whatever days away you want the filter to start looking for highs.

b. it appears you are filtering for Ipeak as both >3 and >0, I suspect SF is only using one of them.

Ah yes good catch. the ipeak>0 was there when I wasn't doing the days away from the previous question. SF considers today to be -1 so I had that in there so it would exclude any results that used today in it's calculation.

c. The variable GapDay and xdiff seem to be the same value, you can probably simplify your filter by using the same variable name in all places those 2 are named.

This i'm not too sure of. That would be a good suggestion but for me it was helpful to have a variable specifically named just to calculate the distance between the two highs that were being used.

hope that helps and thanks for your suggestions. Let me know if you want this same filter looking for breakdowns instead of breakouts

onderoz
1 posts
msg #149316
Ignore onderoz
10/9/2019 2:40:59 PM

can you explain how to use it to a NOOB? when to enter with to a stock with this screen

Nobody
404 posts
msg #150894
Ignore Nobody
2/24/2020 2:37:32 PM

yes please - Care to explain THANK YOU!

vmittal
13 posts
msg #153350
Ignore vmittal
8/1/2020 4:37:58 PM

i do not see breakout after scaning of results. Are these ready to breakout or already breakout?
Thanks

miketranz
969 posts
msg #153356
Ignore miketranz
8/2/2020 11:13:54 AM

Fetcher[close reached a new 90 DAY high
count(close reached a new 90 DAY high 5 days ago,90) equal 0

close between 1 and 500
avg vol(5) is above 500000
]



richardfrench1
1 posts
msg #154096
Ignore richardfrench1
9/21/2020 8:43:12 AM

hey man, amazing filter thank you. i saw you mentioned you have one for the downside. would be much appreciated if you were to share.

StockFetcher Forums · Filter Exchange · Best filter to detect breakouts<< >>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 2022 - 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.