Double Top/Bottom [Early]Early Double Top & Bottoms
This script will scan pivot highs/lows as well as the macro highs/lows to determine whether it thinks there could be a potential double top or double bottom.
This does not mean there definitely will be but the indicator from this point will display the proposed pattern and set out a box where you could look for reversal signals.
The simple premise is rather than having to wait like most pattern scripts this will identify the pattern much sooner and set you up so you can decide how you would like to take action.
Settings
You have the option to choose what type of alert you would like to receive, one option is for an alert soon as the pattern is detected, the 2nd is for when price break the neckline.
below in the settings you have an option to determine what classifies a break. Either the price has to close over the neckline or it can be just a wick, up to you.
You can change all colours of the patterns, labels and line styles.
There are extra labels which can help explain when the pattern is spotted or point out when the neckline is broken depending on your choices
You can also change the frequency in which the patterns will be spotted where 1 is the lowest. We currently believe that 1 spots enough patterns however if you want more feel free to change this.
Use Cases
One is to simply try DCA into the Box if the DB / DT lines up with your support or resistance,.
Another way you can use this on the neckline breaks to confirm the pattern, in the settings you have an option to decide whether you want the close or the wick to trigger the neckline break.
Thirdly, one which we have had the most success with is lining the box plays up with divergence signals.
Feel free to leave any suggestions, happy for the feedback!
Early
TTM Squeeze Pro BarsCredits:
-> John Carter creating the TTM Squeeze and TTM Squeeze Pro
-> Lazybear's original interpretation of the TTM Squeeze: Squeeze Momentum Indicator
-> Makit0's evolution of Lazybear's script to factor in the TTM Squeeze Pro upgrades - Squeeze PRO Arrows
This is my version of their collective works, with amendments primarily to the Squeeze Conditions to more accurately reflect the color coding used by the official TMM Squeeze Pro indicator.
Rather than having a separate indicator window, the TTM Squeeze Pro is now overlaid on the price bars for easier viewing.
For those unfamiliar with the TTM Squeeze, it is simply a visual way of seeing how Bollinger Bands (standard deviations from a simple moving average ) relate to Keltner Channels ( average true range bands) compared with the momentum of the price action. The concept is that as Bollinger Bands compress within Keltner Channels , price volatility decreases, giving way for a potential explosive price movement up or down.
Differences between the original TTM Squeeze and TTM Squeeze Pro:
-> Both use a 2 standard deviation Bollinger Band ;
-> The original squeeze only used a 1.5 ATR Keltner Channel; and
-> The pro version uses 1.0, 1.5 and 2.0 ATR Keltner Channels .
The pro version therefore helps differentiate between levels of squeeze (compression) as the Bollinger Bands moves through the Keltner Channels i.e. the greater the compression, the more potential for explosive moves - less compression means more squeezing.
The Histogram shows price momentum whereas the colored dots (along the zeroline) show where the Bollinger Bands are in relation to the Keltner Channels:
-> Cyan Bars = positive, increasing momentum;
-> Blue Bars = positive, decreasing momentum (indication of a reversal in price direction);
-> Red Bars = negative, increasing momentum;
-> Yellow Bars = negative, decreasing momentum (indication of a reversal in price direction);
-> Orange Dots = High Compression / large squeeze (One or both of the Bollinger Bands is inside the 1st (1.0 ATR) Keltner Channel);
-> Red Dots = Medium Squeeze (One or both of the Bollinger Bands is inside the 2nd (1.5 ATR) Keltner Channel);
-> Black Dots = Low compression / wide squeeze (One or both of the Bollinger Bands is inside the 3rd (2.0 ATR) Keltner Channels );
-> Green Dots = No Squeeze / Squeeze Fired (One or both of the Bollinger Bands is outside of the 3rd (2.0 ATR) Keltner Channel).
Ideal Scenario:
As the ticker enters the squeeze, black dots would warn of the beginning of a low compression squeeze. As the Bollinger bands continue to constrict within the Keltner Channels , red dots would highlight a medium compression. As the price action and momentum continues to compress an orange dot shows warning of high compression. As price action leaves the squeeze, the coloring would reverse e.g. orange to red to black to green. Any compression squeeze is considered fired at the first green dot that appears.
Note: This is an ideal progression of the different types of squeezes, however any type of squeeze (and color sequence) may appear at anytime, therefore the focus is primarily on the green dots after any type of compression.
Entry and Exit Guide:
-> John Carter recommends entering a position after at least 5 black dots or wait for 1st green dot ; and
-> Exit on second blue or yellow bar or, alternatively, remain in the position after confirming a continuing trend through a separate indicator.
Early/Delayed Signal FunctionEarly/Delayed Signal Function (before the bar close or after)
Usually, signals are considered to be valid at the bar close .
Some traders may prefer to have a chance to enter earlier .
It is of great risk , and the Strategy Tester is unable to provide consistent backtest data with regards to this.
But for those who want to integrate such a choice in their strategies, here is the Early Signal Function .
The function takes 2 parameters
- the signal that is considered valid at the bar close , of type bool
- the early time value in seconds, the time before the signal is valid, of type int
it returns a value of type bool - a New Entry Signal
The resulting conditions used for alerts would be:
- newLongCondition = earlySignal_f(myLongSignal, earlyTime)
- newShrtCondition = earlySignal_f(myShrtSignal, earlyTime)
Note: the signals can also be delayed - use a negative value for early time