Trading The Kangaroo Tail Pattern
Coding the Kangaroo Tail Candlestick Pattern Scanner in TradingView
Candlestick patterns are a great addition to market analysis. Some may even consider them vital in research and trading. This article presents the Kangaroo Tail pattern and shows how to code a scanner in TradingView that detects it.
The Kangaroo Tail Pattern
Candlestick charts are among the most famous ways to analyze the time series visually. They contain more information than a simple line chart and have more visual interpretability than bar charts.
The Kangaroo Tail pattern (as presented by Alex Nekritin and Walter Peters) is a one-candlestick reversal configuration that has roots in classic candlestick patterns (namely the hammer and Doji patterns), therefore, it may resemble them but with a few extra conditions to filter false signals.
The bullish Kangaroo Tail is composed of a very long wick where the open and close price are in the upper two thirds of the candle’s range (the high minus the low). Similarly, it must be in a down trend with a range that is superior to the prior candlesticks (to avoid what is known as a runaway). Some minor conditions are in the code.
The bearish Kangaroo Tail is composed of a very long wick where the open and close price are in the lower two thirds of the candle’s range (the high minus the low). Similarly, it must be in an up trend with a range that is superior to the prior candlesticks (to avoid what is known as a runaway). Some minor conditions are in the code.
If you want to see more of my work, you can visit my website for the books catalogue by simply following this link:
Coding the Scanner in TradingView
The conditions of the pattern are relatively easy to code especially in a straightforward and simple coding language such as Pine Script, TradingView’s native language.
The aim of the scanner is to detect the Kangaroo Tail patterns using the following indications:
A green arrow for bullish Kangaroo Tail signals.
A red arrow for bearish Kangaroo Tail signals.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Sofien-Kaabar
//@version=5
indicator("Candlestick Pattern - Kangaroo Tail", overlay = true)
look_to_the_left = 200
candle_range = high - low
two_third_candle_range = candle_range * 0.66
bullish_kangaroo_tail = close > (two_third_candle_range + low) and open > (two_third_candle_range + low) and close > low[1] and close < high[1] and open > low[1] and open < high[1] and close < close[look_to_the_left] and candle_range > candle_range[1] and candle_range > candle_range[2] and candle_range > candle_range[3] and close[1] < open[2] and low <= ta.lowest(low, 13)
bearish_kangaroo_tail = close < (high - two_third_candle_range) and open < (high - two_third_candle_range) and close > low[1] and close < high[1] and open > low[1] and open < high[1] and close > close[look_to_the_left] and candle_range > candle_range[1] and candle_range > candle_range[2] and candle_range > candle_range[3] and close[1] > open[1] and high >= ta.lowest(high, 13)
plotshape(bullish_kangaroo_tail, style = shape.triangleup, color = color.green, location = location.belowbar, size = size.small)
plotshape(bearish_kangaroo_tail, style = shape.triangledown, color = color.red, location = location.abovebar, size = size.small)
The following Figure shows a signal chart after the code has been applied and executed. Bear in mind that this pattern is quite rare.
The following Figure shows another signal chart.
The following Figure shows another signal chart.
Entry conditions are simple:
The buy pattern is validated following the surpass of the high of the Kangaroo Tail.
The sell pattern is validated following the break of the low of the Kangaroo Tail.
The following Figure shows another signal chart.
You can also check out my other newsletter The Weekly Market Sentiment Report that sends weekly directional views every weekend to highlight the important trading opportunities using a mix between sentiment analysis (COT report, put-call ratio, etc.) and rules-based technical analysis.
If you liked this article, do not hesitate to like and comment, to further the discussion!