Auto Pitchfork, Fib Retracement and Zig Zag by DGT
Mar 29, 2021

The Auto Pitchfork, Fib Retracement and Zig Zag by DGT indicator automates the plotting of Andrews' Pitchfork variations, Fibonacci retracements, and Zig Zag pivots to help traders identify geometric cycles and key support or resistance levels.
Usage
The Usage section describes how the script can be used, including how main settings affect the interpretation and output.
- Identifying Trends and Reversals: Traders can use the automated pitchforks to find median line targets and boundary reactions. Typically, buying occurs near the lower trendline or median line support, while selling occurs near the upper trendline or median line resistance.
- Market Adaptability: The indicator provides multiple pitchfork types to suit different market conditions:
- Original Andrews' Pitchfork: Best suited for strong, clearly trending markets.
- Schiff and Modified Schiff: More effective in corrective or sideways markets. The Modified version behaves similarly to a parallel channel.
- Fibonacci Analysis: The built-in Fibonacci retracement tool identifies potential price exhaustion levels based on the same pivots used for the pitchforks.
- Zig Zag Visualization: Use the Zig Zag feature to filter out market noise and focus on significant structural highs and lows.
Details
The script is constructed using pivot detection logic based on deviation and depth. It automatically selects the last three significant pivot points to anchor the pitchfork and Fibonacci levels.
- Andrews' Pitchfork: Based on the principle that price frequently returns to the median line. It uses three points: a starting point (pivot 1) and a subsequent reaction high/low (pivots 2 and 3).
- Schiff Variations: These modify the origin point of the pitchfork to account for slower-moving trends or consolidations, providing a flatter slope.
- Pivot Thresholds: The "Deviation" setting uses a multiplier based on the Average True Range (ATR) to determine the significance of a price move, while "Depth" ensures a minimum bar count between pivots to prevent over-sensitivity.
Settings
Pitchfork Settings
- First/Second Pitchfork Type: Enables the tool and selects the calculation method (Original, Schiff, Modified Schiff, or Inside).
- Deviation: A multiplier affecting how much price must deviate from a previous pivot to form a new one.
- Depth: The minimum number of bars required between pivots.
- Pitchfork Level Labels: Choose to display levels, prices, both, or none.
- Extend Pitchfork Lines: Extends the geometric lines indefinitely to the right of the chart.
- Median Line & Levels: Individual toggles and styling options (color, width, style) for the median line and various Fibonacci-based internal/external levels.
Visuals and History
- Background Transparency: Adjusts the opacity of the shaded areas between pitchfork levels.
- Historical Pitchforks/Fibonacci Levels: Determines how many previous sets of levels remain visible on the chart.
FAQ
How do I adjust the sensitivity of the pivot points? You can modify the "Deviation" and "Depth" settings. Increasing these values will result in fewer, more significant pivots, while decreasing them will capture smaller price swings.
When should I use the Modified Schiff Pitchfork instead of the Original? The Modified Schiff is ideal for markets that are trending less aggressively or moving in a sideways, channel-like fashion, whereas the Original version is designed for sharp, steep trends.
How can I access this indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

