Fractals stock screener

Category: Screeners By: Nicolas Created: November 10, 2016, 10:16 AM
November 10, 2016, 10:16 AM
Screeners
12 Comments

This is a stock screener that will fetch stocks that have made a new Fractal (calculated upon the last “p” period = 10 periods by default) in the last 5 days (“lookback” variable that can be modified at line 6 of the below code).

Some Fractals indicators can be downloaded too in the Library:

The Fractals code here do not respect completely the Bill Williams original description (FYI).

This screener has been coded by request.

 

//PRC_FractalsScreener | screener
//03.11.2016
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

lookback = 5 //how much days in the past to scan for new fractal?
p = 10 //period to calculate new fractals

if high[p] >= highest[2*p+1](high) then
 fractalH = 1
 fractalL=0
else
 fractalH = 0
endif

if low[p] <= lowest[2*p+1](low)  then
 fractalL = -1
 fractalH=0
else
 fractalL = 0
endif

newhigh = summation[lookback](fractalH=1 and fractalH[1]=0)=1
newlow = summation[lookback](fractalL=-1 and fractalL[1]=0)=1

SCREENER [newhigh or newlow]

 

Download
Filename: PRC_FractalsScreener.itf
Downloads: 376
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...