DojiEmoji

Fractal Breakout Strategy [KL]

DojiEmoji Aggiornato   
Fractal Breakout Strategy
This strategy will enter into a Long position when (a) bullish fractal is formed, combined with (b) ATR is relatively low. Trailing stop loss is set based on ATR.

Bullish fractal pattern:
A bullish fractal pattern looks like this:
It is formed when lower-low has reached a local minimum followed by higher-lows.
By default, this script plots the pivot point (the local minimum) using green crosses. This line will extend to the right until the next bullish fractal is formed. The local minimum pivot point is considered as key level of support. For long position entry, entry price must be higher or equal to it.

On the other hand, a bearish fractal pattern looks like the exact opposite. Reversing the logic, it is a local maximum indicated by higher-highs followed by lower-highs. This is shown by red crosses.

Why use ATR to confirm entry:
Two reasons to enter when ATR is low:
1) Since trailing stop loss is based on ATR, entering the market when ATR is low means risking less for potentially high reward.
2) Low ATR often signals price consolidation. There are two favorable scenarios, either: (i) period of accumulation, or (ii) bull flag, ideally followed by breakout.

Determining whether ATR is low:
Relative lows are quantified out by using the method in my other script: Modified ATR Indicator

The method involves applying two-tailed hypothesis testing to assess whether ATR (ie. by default lookback period of 5) has greatly deviated from a larger sample size (ie. lookback period of 50). Assuming ATR is normally distributed and variance is known, then test statistic (z) can be used to determine whether ATR5 is within the critical area under Null Hypothesis: ATR5 == ATR50. If z falls below/above the left/right critical values (ie. 1.645 for a 90% confidence interval), then ATR is determined to the relatively low/high respectively. For the purpose of assessing whether ATR is low, the left-tail is the main focus.

Profit taking:
Profits by default are taken over 3 levels based on risk to reward ratio (ie. 1R, 2R, 3R). When a target is met at each level, strategy will close out one third of current position size. Remainders (ie. already taken once at 1R, but not yet reaching 2R or 3R) will eventually be closed at the trailing stop loss price.
Note di rilascio:
Order size management based on TradingView's parameters (go to Settings -> Properties -> Order size)
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?