OPEN-SOURCE SCRIPT

Six Pillars

Telah dikemas kini
General Overview
The "Six Pillars" indicator is a comprehensive trading tool that combines six different technical analysis methods to provide a holistic view of market conditions.

These six pillars are:
  • Trend
  • Momentum
  • Directional Movement (DM)
  • Stochastic
  • Fractal
  • On-Balance Volume (OBV)


The indicator calculates the state of each pillar and presents them in an easy-to-read table format. It also compares the current timeframe with a user-defined comparison timeframe to offer a multi-timeframe analysis.

A key feature of this indicator is the Confluence Strength meter. This unique metric quantifies the overall agreement between the six pillars across both timeframes, providing a score out of 100. A higher score indicates stronger agreement among the pillars, suggesting a more reliable trading signal.

I also included a visual cue in the form of candle coloring. When all six pillars agree on a bullish or bearish direction, the candle is colored green or red, respectively. This feature allows traders to quickly identify potential high-probability trade setups.

The Six Pillars indicator is designed to work across multiple timeframes, offering a comparison between the current timeframe and a user-defined comparison timeframe. This multi-timeframe analysis provides traders with a more comprehensive understanding of market dynamics.

Origin and Inspiration
The Six Pillars indicator was inspired by the work of Dr. Barry Burns, author of "Trend Trading for Dummies" and his concept of "5 energies." (Trend, Momentum, Cycle, Support/Resistance, Scale) I was intrigued by Dr. Burns' approach to analyzing market dynamics and decided to put my own twist upon his ideas.

Comparing the Six Pillars to Dr. Burns' 5 energies, you'll notice I kept Trend and Momentum, but I swapped out Cycle, Support/Resistance, and Scale for Directional Movement, Stochastic, Fractal, and On-Balance Volume. These changes give you a more dynamic view of market strength, potential reversals, and volume confirmation all in one package.

What Makes This Indicator Unique
The standout feature of the Six Pillars indicator is its Confluence Strength meter. This feature calculates the overall agreement between the six pillars, providing traders with a clear, numerical representation of signal strength.

The strength is calculated by considering the state of each pillar in both the current and comparison timeframes, resulting in a score out of 100.

Here's how it calculates the strength:

  • It considers the state of each pillar in both the current timeframe and the comparison timeframe.
  • For each pillar, the absolute value of its state is taken. This means that both strongly bullish (2) and strongly bearish (-2) states contribute equally to the strength.
  • The absolute values for all six pillars are summed up for both timeframes, resulting in two sums: current_sum and alternate_sum.
  • These sums are then added together to get a total_sum.
  • The total_sum is divided by 24 (the maximum possible sum if all pillars were at their strongest states in both timeframes) and multiplied by 100 to get a percentage.
  • The result is rounded to the nearest integer and capped at a minimum of 1.


This calculation method ensures that the Confluence Strength meter takes into account not only the current timeframe but also the comparison timeframe, providing a more robust measure of overall market sentiment. The resulting score, ranging from 1 to 100, gives traders a clear and intuitive measure of how strongly the pillars agree, with higher scores indicating stronger potential signals.

This approach to measuring signal strength is unique in that it doesn't just rely on a single aspect of price action or volume. Instead, it takes into account multiple factors, providing a more robust and reliable indication of potential market moves. The higher the Confluence Strength score, the more confident traders can be in the signal.

The Confluence Strength meter helps traders in several ways:
  • It provides a quick and easy way to gauge the overall market sentiment.
  • It helps prioritize potential trades by identifying the strongest signals.
  • It can be used as a filter to avoid weaker setups and focus on high-probability trades.
  • It offers an additional layer of confirmation for other trading strategies or indicators.
  • By combining the Six Pillars analysis with the Confluence Strength meter, I've created a powerful tool that not only identifies potential trading opportunities but also quantifies their strength, giving traders a significant edge in their decision-making process.


How the Pillars Work (What Determines Bullish or Bearish)
While developing this indicator, I selected and configured six key components that work together to provide a comprehensive view of market conditions. Each pillar is set up to complement the others, creating a synergistic effect that offers traders a more nuanced understanding of price action and volume.

  • Trend Pillar: Based on two Exponential Moving Averages (EMAs) - a fast EMA (8 period) and a slow EMA (21 period). It determines the trend by comparing these EMAs, with stronger trends indicated when the fast EMA is significantly above or below the slow EMA.
  • Directional Movement (DM) Pillar: Utilizes the Average Directional Index (ADX) with a default period of 14. It measures trend strength, with values above 25 indicating a strong trend. It also considers the Positive and Negative Directional Indicators (DI+ and DI-) to determine trend direction.
  • Momentum Pillar: Uses the Moving Average Convergence Divergence (MACD) with customizable fast (12), slow (26), and signal (9) lengths. It compares the MACD line to the signal line to determine momentum strength and direction.
  • Stochastic Pillar: Employs the Stochastic oscillator with a default period of 13. It identifies overbought conditions (above 80) and oversold conditions (below 20), with intermediate zones between 60-80 and 20-40.
  • Fractal Pillar: Uses Williams' Fractal indicator with a default period of 3. It identifies potential reversal points by looking for specific high and low patterns over the given period.
  • On-Balance Volume (OBV) Pillar: Incorporates On-Balance Volume with three EMAs - short (3), medium (13), and long (21) periods. It assesses volume trends by comparing these EMAs.


Each pillar outputs a state ranging from -2 (strongly bearish) to 2 (strongly bullish), with 0 indicating a neutral state. This standardized output allows for easy comparison and aggregation of signals across all pillars.

Users can customize various parameters for each pillar, allowing them to fine-tune the indicator to their specific trading style and market conditions. The multi-timeframe comparison feature also allows users to compare pillar states between the current timeframe and a user-defined comparison timeframe, providing additional context for decision-making.

Design
From a design standpoint, I've put considerable effort into making the Six Pillars indicator visually appealing and user-friendly. The clean and minimalistic design is a key feature that sets this indicator apart.

I've implemented a sleek table layout that displays all the essential information in a compact and organized manner. The use of a dark background (#030712) for the table creates a sleek look that's easy on the eyes, especially during extended trading sessions.

The overall design philosophy focuses on presenting complex information in a simple, intuitive format, allowing traders to make informed decisions quickly and efficiently.

The color scheme is carefully chosen to provide clear visual cues:
  • White text for headers ensures readability
  • Green (#22C55E) for bullish signals
  • Blue (#3B82F6) for neutral states
  • Red (#EF4444) for bearish signals


This color coding extends to the candle coloring, making it easy to spot when all pillars agree on a bullish or bearish outlook.

I've also incorporated intuitive symbols (↑↑, ↑, →, ↓, ↓↓) to represent the different states of each pillar, allowing for quick interpretation at a glance.

The table layout is thoughtfully organized, with clear sections for the current and comparison timeframes. The Confluence Strength meter is prominently displayed, providing traders with an immediate sense of signal strength.

To enhance usability, I've added tooltips to various elements, offering additional information and explanations when users hover over different parts of the indicator.

How to Use This Indicator
The Six Pillars indicator is a versatile tool that can be used for various trading strategies. Here are some general usage guidelines and specific scenarios:

General Usage Guidelines:
  • Pay attention to the Confluence Strength meter. Higher values indicate stronger agreement among the pillars and potentially more reliable signals.
  • Use the multi-timeframe comparison to confirm signals across different time horizons.
  • Look for alignment between the current timeframe and comparison timeframe pillars for stronger signals.


One of the strengths of this indicator is it can let you know when markets are sideways – so in general you can know to avoid entering when the Confluence Strength is low, indicating disagreement among the pillars.

Customization Options
The Six Pillars indicator offers a wide range of customization options, allowing traders to tailor the tool to their specific needs and trading style. Here are the key customizable elements:

Comparison Timeframe:
  • Users can select any timeframe for comparison with the current timeframe, providing flexibility in multi-timeframe analysis.


Trend Pillar:
  • Fast EMA Period: Adjustable for quicker or slower trend identification
  • Slow EMA Period: Can be modified to capture longer-term trends


Momentum Pillar:
  • MACD Fast Length
  • MACD Slow Length
  • MACD Signal Length These can be adjusted to fine-tune momentum sensitivity


DM Pillar:
  • ADX Period: Customizable to change the lookback period for trend strength measurement
  • ADX Threshold: Adjustable to define what constitutes a strong trend


Stochastic Pillar:
  • Stochastic Period: Can be modified to change the sensitivity of overbought/oversold readings


Fractal Pillar:
  • Fractal Period: Adjustable to identify potential reversal points over different timeframes


OBV Pillar:
  • Short OBV EMA
  • Medium OBV EMA
  • Long OBV EMA These periods can be customized to analyze volume trends over different timeframes


These customization options allow traders to experiment with different settings to find the optimal configuration for their trading strategy and market conditions. The flexibility of the Six Pillars indicator makes it adaptable to various trading styles and market environments.
Nota Keluaran
Fixed bug where 1 day time period was not displaying the number correctly.
Nota Keluaran

  • Squashed some bugs with the timeframe display
  • Fixed issue design issue with the last column and confluence score
Nota Keluaran
  • Bug fixes
confluencedirectionalMomentum Indicator (MOM)movementmulti-timeframeOn Balance Volume (OBV)trendtrend-analysisTrend Analysis

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian