ZeroHeroTrading

HTF Descending Triangle

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

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

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 descending 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 low factor detection criteria to apply on higher time frame bars low as a proportion of the distance between the reference bar low 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.
  • Low Factor checkbox: Turns on/off low factor detection criteria.
  • Low Factor field: Sets low factor to apply on higher time frame bars low as a proportion of the distance between the reference bar low and open/close.
  • 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:
  • High must be lower than previous bar.
  • Open/close min value must be higher than reference bar low.
  • When low factor criteria is turned on, low must be lower than reference bar open/close min value minus low factor proportion of the distance between reference bar low and open/close min value.

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟