ZeroHeroTrading

HTF Ascending Triangle

HTF Ascending Triangle aims at detecting ascending triangles using higher time frame data, without repainting nor misalignment issues.

Ascending triangles are defined by an horizontal upper trend line and a rising lower trend line. It is a chart pattern used in technical analysis to predict the continuation of an uptrend.

This indicator can be useful if you, like me, believe that higher time frames can offer a broader perspective and provide clearer signals, smoothing out market noise and showing longer-term trends.

You can change the indicator settings as you see fit to tighten or loosen the detection, and achieve the best results for your use case.

Features
  • It draws the detected ascending triangle on the chart.
  • It supports alerting when a detection occurs.
  • It allows for setting the higher time frame to run the detection on.
  • It allows for setting the minimum number of consecutive valid higher time frame bars to fit the pattern criteria.
  • It allows for setting a high factor detection criteria to apply on higher time frame bars high as a proportion of the distance between the reference bar high and open/close.
  • It allows for turning on an adjustment of the triangle using highest/lowest values within valid higher time frame bars.

Settings
  • Higher Time Frame dropdown: Selects higher time frame to run the detection on. It must be higher than, and a multiple of, the chart's timeframe.
  • Valid Bars Minimum field: Sets minimum number of consecutive valid higher time frame bars to fit the pattern criteria.
  • High Factor checkbox: Turns on/off high factor detection criteria.
  • High Factor field: Sets high factor to apply on higher time frame bars high as a proportion of the distance between the reference bar high and close/open.
  • Adjust Triangle checkbox: Turns on/off triangle adjustment using highest/lowest values within valid higher time frame bars.

Detection Algorithm Notes
The detection algorithm recursively selects a higher time frame bar as reference. Then it looks at the consecutive higher time frame bars (as per the requested number of minimum valid bars) as follows:
  • Low must be higher than previous bar.
  • Open/close max value must be lower than reference bar high.
  • When high factor criteria is turned on, high must be higher than reference bar open/close max value plus high factor proportion of the distance between reference bar high and open/close max value.

Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?