Tool
Gann Fan Interpretor
interpretor.gann_fan
Inputs
A Gann fan bundle from market.gann_fan carrying the nine rays anchored at a pivot.
A price series (such as market.close) compared against the fan rays each bar; must share the upstream fan's symbol and timeframe.
Outputs
A boolean that is true on each bar the chosen fan rule holds -- ready to wire into a filter, entry, or exit gate.
Gann Fan Interpretor turns a Gann fan into a simple yes/no signal you can act on. It reads the fan rays and a price series, then answers one question each bar -- is price above or below a chosen ray, is it riding the main 1x1 line, or did it just break below it?
How it works
Wire the fan bundle into 'fan' and a price series (like market.close) into 'price'; the mode picker chooses the rule and the interpretor outputs a per-bar BOOL. above_ray and below_ray test price against the ray named by ray_index, ride_1x1 fires while price holds at or above the 1x1 line within tolerance, and break_1x1 fires on the single bar price crosses below the 1x1 after riding it.
Modes
Gates true on each bar price is above the ray named by ray_index.
When to use: Confirm bullish control while price stays above a chosen fan line.
Gates true on each bar price is below the ray named by ray_index.
When to use: Confirm bearish control while price stays beneath a chosen fan line.
Fires while price holds at or above the main 1x1 (45-degree) line within tolerance.
When to use: Only allow trend-following entries while price is riding the central 1x1 line.
Fires on the single bar price crosses below the 1x1 line after riding it -- a trend-failure trigger.
When to use: Exit or reverse the moment price loses the 1x1 line.
Configuration
Which fan rule to evaluate: above_ray or below_ray (price versus the chosen ray), ride_1x1 (price holding the 1x1 line), or break_1x1 (the bar price breaks below the 1x1).
Which of the 9 rays to test price against in above_ray or below_ray mode; 0 is the canonical 1x1 (45-degree) ray.
The maximum distance from the 1x1 line allowed in ride_1x1 and break_1x1 modes; 0.0 means exactly on the line, larger values admit a band around it.
Connects to
Examples
- Use ride_1x1 mode as a filter so long trades are only allowed while price holds the 1x1 line.
- Use break_1x1 mode as the trigger to exit or reverse the moment price drops below the 1x1.
Common mistakes
- Leaving tolerance at 0.0 for ride_1x1, which demands price sit exactly on the line and almost never fires -- widen it to admit a small band.
- Wiring a price series from a different symbol or timeframe than the upstream fan, so the comparison is meaningless.