OPEN-SOURCE SCRIPT

Vanilla ABCD Pattern

Patterns makes parts of the many predictive tools available to technical analysts, the most simples ones can be easily detected by using scripts. The proposed tool detect the simple (vanilla) form of the ABCD pattern, a pattern aiming to detect potential price swings. The script can use an additional confirmation condition that aim to filter potential false signals.

ABCD PATTERN

The ABCD pattern is not meant to be detected by analyzing individuals closing price observations but by analyzing longer term movements, this is done by using tools such as zig-zag. Like any pattern the ABCD one comes in different flavors, the simplest being based on the following structures:

快照

Once price reach D we can expect a reversal. The classical pattern has the following conditions : BC = 0.618*AB and CD = 1.618*AB, as you can see this condition is based on 0.618 which is a ratio in the Fibonacci sequence. Other conditions are for AB to equal to CD or for CD to be 161.8% longer than AB. Why these conditions ? Cause Fibonacci of course.

The ABCD pattern that the proposed tool aim to detect is not based on the zig-zag but only on individual price observations and don't make use of any of the previously described conditions, thus becoming more like a candle pattern.

快照

When the label is blue it means that the tool has detected a bullish ABCD pattern, while a red label means that the tool has detected a bearish ABCD pattern.

We can't expect patterns based on the analysis of 1,2,3 or 4 closing price observations to predict the reversal of mid/long term movements, this can be seen on the above chart, but we can see some signals predicting short term movements.

Since the pattern is based on a noisy variation, using smoother input can result in less signals.

快照

Above the tool on BTCUSD using closing price as input. Below the tool using ohlc4 as input:

快照

TOOL OPTIONS

Being to early can be as devastating as being to late, therefore a confirmation point can be beneficial, the tool allow you to wait for confirmation thus having a potentially better timing. Below is a chart of AMD with no confirmation:

快照

As we can see there are many signals with some of them occurring to early, we can fix this by checking the confirmation option:

快照

The confirmation is simply based on the candle color, for example if a bearish ABCD pattern has been detected in the past and the closing price is greater than the opening price then the tool return a buy signal. The same apply with a bearish ABCD pattern.

The "last bar repaint" option is true by default, this in order to show the bar where the D point of the pattern has been detected, since the closing price of the last bar is constantly changing the signals on the last bar can be constantly appearing/disappearing, unchecking the option will fix this but will no longer the bar where the D point of the pattern has been detected.

SUMMARY

The pattern is simple and can sometimes be accurate when predicting the direction of future short terms movements. The tool was a request, as it seems i don't post many pattern detectors, well thats true, and the reason is that for me patterns are not super significant, and their detection can be extremely subjective, this is why simple patterns are certainly the only ones worth a look.

Don't expect me to post many pattern related indicators in the future ^^'
AB=CDcandleCandlestick AnalysispatternTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


Check out the indicators we are making at luxalgo: tradingview.com/u/LuxAlgo/
更多:

免責聲明