StockFetcher Forums · General Discussion · Fibonacci screener<< >>Post Follow-up
7 posts
msg #149298
Ignore freedom_trader777
10/6/2019 7:04:04 PM

Hey everyone,

I'm trying to write a screen that finds stocks that came within 3% of a Fib-level, previous day close, then pulled back.

Can someone help out me with the phrasing if it's possible?

93 posts
msg #149299
Ignore xarlor
10/6/2019 9:26:39 PM

Not exactly what you asked for, but I made a filter that shows a bounce off a 52-week Fibonacci line.

average volume(30) > 1234567
chart-time is 1 year
/* Set the Fib values at 23.6%, 38.2%, 50%, and 61.8%*/

set{Hi,high 1-year high}
set{Lo,low 1-year low}
set{Vdiff,Hi - Lo}
set{x1,Vdiff * .236}
set{x2,Vdiff * .382}
set{x3,Vdiff * .50}
set{x4,Vdiff * .618}
set{x5,Vdiff * .786}
set{Fib1, Hi - x1}
set{Fib2, Hi - x2}
set{Fib3, Hi - x3}
set{Fib4, Hi - x4}
set{Fib5, Hi - x5}

/* Check if price touched any of the Fib lines 1 day ago while that candle's body is above the Fib line */

set{touch1a,count(low 1 day ago <= Fib1,1)}
set{touch1b,count(close 1 day ago > fib1,1)}
set{touch1c,count(open 1 day ago > fib1,1)}
set{touch1d,touch1a * touch1b}
set{Touch1,touch1c * touch1d}

set{touch2a,count(low 1 day ago <= Fib2,1)}
set{touch2b,count(close 1 day ago > fib2,1)}
set{touch2c,count(open 1 day ago > fib2,1)}
set{touch2d,touch2a * touch2b}
set{Touch2,touch2c * touch2d}

set{touch3a,count(low 1 day ago <= Fib3,1)}
set{touch3b,count(close 1 day ago > fib3,1)}
set{touch3c,count(open 1 day ago > fib3,1)}
set{touch3d,touch3a * touch3b}
set{Touch3,touch3c * touch3d}

set{touch4a,count(low 1 day ago <= Fib4,1)}
set{touch4b,count(close 1 day ago > fib4,1)}
set{touch4c,count(open 1 day ago > fib4,1)}
set{touch4d,touch4a * touch4b}
set{Touch4,touch4c * touch4d}

set{touch5a,count(low 1 day ago <= Fib5,1)}
set{touch5b,count(close 1 day ago > fib5,1)}
set{touch5c,count(open 1 day ago > fib5,1)}
set{touch5d,touch5a * touch5b}
set{Touch5,touch5c * touch5d}

set{z1,Touch1 + Touch2}
set{z2,z1 + Touch3}
set{z3,z2 + Touch4}
set{Trigger,z3 + Touch5}
Trigger > 0

/* The bounce: Green day following a 3-day declining close */
close > high 1 day ago
close 1 day ago < close 2 days ago for last 3 days

draw price line at hi
draw price line at Fib1
draw price line at Fib2
draw price line at Fib3
draw price line at Fib4
draw price line at Fib5
draw price line at lo

do not draw Trigger

/* Debugging

add column hi
add column Vdiff
add column fib1
add column close 1 day ago

145 posts
msg #149307
Ignore ron22
10/7/2019 11:40:49 AM

xarlor, Great filter. What do you recommend for entry trigger and exit trigger? Thanks a lot.

378 posts
msg #149308
Ignore sandjco
10/7/2019 12:19:06 PM

I think SF has FIB as well...

Average Volume(30) > 100000

Fibonacci Down(89,13) is below 0.24 within the last 5 days

for sure, I have zero coding, pardon the suggestion. Maybe it helps.

93 posts
msg #149309
Ignore xarlor
10/7/2019 2:38:36 PM

Rules are pretty mechanical:

Enter at the close.
Initial stop loss set 0.06 below the Fib line it just bounced off of.
Profit target is next Fib line above. Note this is also your next resistance point, so may have to exit and take profits if it looks like it's bouncing off without clearing.
If you're feeling frisky, you can let a winner run beyond that Fib line and try for the next Fib line.

I haven't backtested it. Maybe something for nibor to do during Monday Night Football? :D

I did see the SF Fibonacci filters, but they were too vague/loose for my likes. It's a good starting point, like all the indicators on SF, but I needed something more granular.

378 posts
msg #149311
Ignore sandjco
10/7/2019 3:12:26 PM

no worries; guys like you who can code SF well are gems for the community!

hope you didn't take my comment the wrong way.

432 posts
msg #149312
Ignore Cheese
10/7/2019 4:41:11 PM

xarlor and everyone,
Since you guys are pretty good at this stuff,
any suggestions to better guess bull traps, bear traps, head fakes,
to get to safer entries and exits?

145 posts
msg #149315
Ignore ron22
10/7/2019 11:10:12 PM

xarlor, Thank you for the filter and for the trigger ideas. ron

StockFetcher Forums · General Discussion · Fibonacci screener<< >>Post Follow-up

*** Disclaimer *** 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. does not recommend particular securities., 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