OPEN-SOURCE SCRIPT

Hyperfork Matrix

451
🔱 Hyperfork Matrix 🔱 A manual Andrews Pitchfork tool with action/reaction propagation lines and lattice matrix functionality. This indicator extends Dr. Alan Andrews' and Patrick Mikula's median line methodology by automating the projection of reaction and action lines at equidistant intervals, creating a time-price grid that highlights where pivot levels intersect the matrix.

Three pitchfork variants are supported: Original, Schiff, and Modified Schiff. Each variant adjusts the anchor point position to accommodate different trend angles.


สแนปชอต


═══════════════════════════════════════════════════════════════


THE METHOD

Andrews Pitchfork
Dr. Alan Andrews developed the pitchfork as a trend channel tool. The core principle: price tends to return to the median line roughly 80% of the time. When it fails to reach the median, a reversal may be developing.

A pitchfork requires three pivot points:
Point A — The anchor (starting pivot)
Point B — First swing in the opposite direction
Point C — Second swing, same direction as A

The median line runs from Point A through the midpoint of B-C. Parallel lines through B and C form the channel boundaries.

Action/Reaction Principle
Based on Newton's third law ("action and reaction are equal and opposite"), this principle suggests that price movements elicit proportional reactions in the future. By projecting lines at equal intervals along the pitchfork's slope, we anticipate where these reactions may occur.

Lattice Matrix
The lattice squares pivot price levels to the matrix structure. A horizontal from your selected pivot intersects the pitchfork and propagation lines, with verticals drawn at each intersection. These verticals mark time points where price-time geometry converges—potential areas to watch for trend changes.

สแนปชอต


═══════════════════════════════════════════════════════════════


HOW THE INDICATOR WORKS

This section explains the calculation flow from your inputs to the final drawing.

Step 1 — Pivot Selection
You click on the chart to select three timestamps. The indicator retrieves the high or low price at each timestamp based on your starting pivot type selection:
• Starting with "Low" creates a Low-High-Low pattern
• Starting with "High" creates a High-Low-High pattern

Step 2 — Anchor Calculation
The anchor position depends on your pitchfork variant:
Original — Anchor stays at Point A
Schiff — Anchor shifts 50% toward B in price (Y-axis only)
Modified Schiff — Anchor shifts 50% toward B in both time and price

Step 3 — Median Line
A line is drawn from the anchor through the midpoint of the B-C segment. This median line defines the channel's slope and center.

Step 4 — Parallel Tines
Parallel lines are drawn through Points B and C, maintaining the median line's slope. These form the upper and lower channel boundaries.

Step 5 — Extra Parallels
If configured, additional parallel lines are drawn at equal spacing beyond B and C. The spacing equals the distance from the median to each tine.

Step 6 — Handle Length
The "handle" is the segment from the anchor to the B-C midpoint. This length becomes the unit of measurement for propagation.

Step 7 — Propagation Points
Points are placed along the median line at handle-length intervals:
• Forward points extend into the future
• Backward points extend into the past

Step 8 — Reaction Lines
Through each propagation point, a line is drawn parallel to B-C (the transversal slope). These reaction lines mark time-price zones based on the original swing rhythm, where trend changes may occur.

Step 9 — Action Lines
Through each propagation point, a line is drawn parallel to A-B (the initial move slope). These action lines project the original momentum into future price zones.

Step 10 — Lattice Grid
If enabled, a horizontal line is drawn at the price level of your selected pivot. Vertical lines are then drawn at every intersection between this horizontal and the selected line type (pitchfork, reaction, or action lines).

Step 11 — Alert Monitoring
On each bar, the indicator checks if the price has crossed any of the drawn lines. Crossings trigger alerts based on your configuration.


═══════════════════════════════════════════════════════════════


PITCHFORK VARIANTS

Original (Andrews)
The classic pitchfork. The anchor remains at Point A. Best suited for strong trending markets where price respects steep channels.

Schiff
Named after Jerome Schiff, a student of Andrews. The anchor shifts halfway toward Point B in price only—same time position as A, but price is the midpoint of A and B.

This produces a less steep channel, better suited for:
• Shallow trends
• Corrective phases
• Markets where the original pitchfork angle is too aggressive

Modified Schiff
The anchor shifts halfway toward Point B in both time and price—positioned at the midpoint of the A-B segment.

This creates an even gentler slope than the standard Schiff variant. Use when:
• Trends are weak or ranging
• Price doesn't respect steeper channel angles
• You need a middle ground between Original and Schiff

สแนปชอต


═══════════════════════════════════════════════════════════════


ACTION & REACTION LINES

Reaction Lines
These run parallel to the B-C segment (the "transversal"). They represent the market's response rhythm—the swing from B to C sets a pattern that may repeat at predictable intervals.

Action Lines
These run parallel to the A-B segment (the initial impulse). They project the original momentum forward, suggesting where similar price movements may begin or end.

Forward vs Backward
Forward Lines — Project into the future beyond the B-C midpoint
Backward Lines — Project into the past before Point A

Most analysis focuses on forward lines, but backward lines can reveal historical confluence with past pivots.

Propagation Spacing
Lines are spaced at equal intervals defined by the handle length (anchor to B-C midpoint). This creates a rhythmic structure where each segment equals the original pitchfork's core measurement.

Action Lines
สแนปชอต

Reaction Lines
สแนปชอต

Extra Parallels with/ both Action & Reactions Line extended within the grid

สแนปชอต

═══════════════════════════════════════════════════════════════


LATTICE MATRIX

The lattice creates a grid overlay within the pitchfork structure.

Horizontal Line
A horizontal line is drawn at the price level of your selected pivot (A, B, or C). This squares the pivot's price level to find where it aligns with the matrix structure. These confluences may represent higher-probability reaction points in time.

Vertical Lines
Vertical lines are drawn at every point where the horizontal intersects your selected line source. These verticals mark time points—potential areas to watch for trend changes.
Pitchfork & Parallels — Intersections with median and all parallel tines
Action Lines — Intersections with action transversals
Reaction Lines — Intersections with reaction transversals
Action & Reaction — Both types combined


Envelope Clamping
Lattice lines are automatically clamped to stay within the pitchfork's channel envelope (bounded by the outermost parallels). This keeps the grid visually clean and focused on relevant areas.


สแนปชอต

═══════════════════════════════════════════════════════════════


ALERTS

The indicator monitors price crossings and triggers alerts when the price moves through any drawn line type.

Available Alert Types
Pitchfork Lines — Crossing the median or any parallel
Action Lines — Crossing any action transversal (when action lines are drawn)
Reaction Lines — Crossing any reaction transversal (when reaction lines are drawn)
Lattice Horizontal — Crossing the horizontal price level (when lattice is enabled)
Any Line Crossing — Combined alert for all of the above

Setting Up Alerts
1. Right-click on the indicator or use the alert menu
2. Select "Create Alert."
3. Choose the desired condition from the dropdown
4. Configure notification preferences (pop-up, email, webhook, etc.)

Alert Timing
Alerts trigger once per bar close when a crossing is detected between the previous and current bar's close prices.


═══════════════════════════════════════════════════════════════


HOW TO USE

Basic Setup
1. Add the indicator to your chart
2. When prompted, click on three pivot points in sequence: A, B, C
3. Choose starting pivot type: Auto (detects pattern), Low (LHL), or High (HLH)
4. The pitchfork draws automatically

Adjusting the Pitchfork
• Change the variant (Original/Schiff/Modified Schiff) if the angle doesn't suit your trend
• Add extra parallel levels to see where price might react beyond the main channel
• Disable or Adjust price range min/max to hide parallels outside your focus area

Adding Propagation Lines
• Adjust forward offset to add/remove lines beyond auto-extend (0 = to current bar)
• Choose which line types to display: Reaction Only, Action Only, or Both
• Customize colors to distinguish line types visually

Using the Lattice
• Enable "Draw Lattice" in the Lattice settings group
• Select which pivot's price level to use for the horizontal
• Choose the intersection source that matches your analysis style
• Look for time zones where verticals cluster—these may be significant dates

Log Scale Charts
If your chart uses logarithmic scale, enable "Logarithmic Scale" in Pitchfork Settings. This ensures all calculations transform correctly for log price axes.


═══════════════════════════════════════════════════════════════


SETTINGS REFERENCE

1. Pivot Points
• Starting Pivot Type — Auto (detect pattern), Low (force LHL), or High (force HLH)
• Pivot A/B/C Time — Timestamps for your three pivots (click to select)
• Show Pivot Labels — Display A, B, C labels at pivot locations
• Pivot Colors — Customize high/low label colors
• Label Size — Tiny, Small, Normal, or Large

2. Pitchfork Settings
• Logarithmic Scale — Enable for log charts
• Pitchfork Type — Original, Schiff, or Modified Schiff
• Extra Parallel Levels — Additional parallels beyond B and C
• Line styling (color, width, style)
• Extend Direction — Right only or Both directions
• Enable Price Range Filter — Toggle filtering of extra parallels
• Price Range Min/Max — Hide extra parallels outside this range

3. Action / Reaction Lines
• Draw Type — None, Reaction Only, Action Only, or Both
• Forward Lines Offset — Adjust from auto-extend (0 = to current bar, positive adds more)
• Backward Lines Count — Number of lines projected before Point A
• Separate styling for reaction and action lines

4. Lattice
• Draw Lattice — Master toggle
• Select Pivot for Horizontal — A, B, or C price level
• Intersection Source — Which lines to use for vertical placement
• Lattice styling


สแนปชอต

═══════════════════════════════════════════════════════════════


LIMITATIONS

Maximum 500 lines — TradingView limits line objects; complex setups with many parallels and propagation lines may approach this limit
Manual pivot selection — Pivots must be selected manually via timestamp inputs; no auto-detection
Log scale requires toggle — You must enable "Logarithmic Scale" manually if your chart uses log axes
Minor visual drift — Action/Reaction lines may shift slightly when toggling between odd and even extra parallel counts (cosmetic only)
Backward lines visibility — When adding backward propagation lines, you may need to scroll the chart left for them to render


═══════════════════════════════════════════════════════════════


FURTHER READING

For deeper study of pitchfork analysis and action/reaction methodology:
• Patrick Mikula's "The Best Trendline Methods of Alan Andrews and Five New Trendline Techniques"

No affiliation implied. Referenced for educational context only.


═══════════════════════════════════════════════════════════════


RELATED

For a video walkthrough of the Super Pitchfork methodology that inspired this indicator:
How to Build a Super Pitchfork with Reaction & Trigger Lines

This tutorial covers manual pitchfork construction, reaction line projection, and timing techniques.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน