The formulas for fractals are:
Bearish Fractal=
High(N)>High(N−2) and
High(N)>High(N−1) and
High(N)>High(N+1) and
High(N)>High(N+2)
Bullish Fractal=
Low(N)<Low(N−2) and
Low(N)<Low(N−1) and
Low(N)<Low(N+1) and
Low(N)<Low(N+2)
where:
N=High/low of the current price bar
N−2=High/low of price bar two periods
to the left of N
N−1=High/low of price bar one period
to the left of N
N+1=High/low of price bar one period
to the right of N
N+2=High/low of price bar two periods
to the right of N
The formulas for fractals are: Bearish Fractal= High(N)>High(N−2) and High(N)>High(N−1) and High(N)>High(N+1) and High(N)>High(N+2) Bullish Fractal= Low(N)<Low(N−2) and Low(N)<Low(N−1) and Low(N)<Low(N+1) and Low(N)<Low(N+2) where: N=High/low of the current price bar N−2=High/low of price bar two periods to the left of N N−1=High/low of price bar one period to the left of N N+1=High/low of price bar one period to the right of N N+2=High/low of price bar two periods to the right of N