PyraTime FVG [Pro] | Smart Anchored Price ActionPyraTime FVG is a professional-grade institutional trading suite designed to declutter price action analysis. Unlike standard indicators that flood the chart with infinite zones, this tool uses a proprietary "Velcro" Anchoring Engine that physically snaps Fair Value Gaps (FVGs) and Order Blocks to the exact candle geometry.
This tool replaces 4 separate indicators (FVG, Market Structure, Order Blocks, and Trend Dashboard) with a single, performance-optimized Pine Script v6 script.
🎯 Key Features
1. The "Velcro" FVG Engine Most FVG indicators draw boxes that extend infinitely, making charts messy.
Smart Extension: Zones extend to the right but automatically "snap" and cut off the moment price mitigates (fills) them.
Precision Anchoring: Boxes are drawn from the exact wick/body limits of the originating candles—no floating pixels.
Mitigation Tracking: Mitigated zones are instantly dimmed and archived, keeping your chart clean for current price action.
2. Intelligent Structure Mapping (BOS & CHoCH) The script distinguishes between trend continuation and trend reversals:
BOS (Break of Structure): Marked with Dotted Lines. Signals that the current trend is healthy and continuing.
CHoCH (Change of Character): Marked with Solid Lines. Signals a potential major trend reversal (e.g., the first Lower Low after an uptrend).
3. Multi-Timeframe (MTF) Scanner A non-intrusive dashboard in the bottom-right corner scans the 1H, 4H, and Daily timeframes in real-time.
IN BULL GAP: Price is currently inside a Higher Timeframe Buying Zone.
IN BEAR GAP: Price is currently inside a Higher Timeframe Selling Zone.
CLEAR: No major HTF obstacles nearby.
📚 How to Trade With This Tool (Tutorial)
Step 1: Check the "Big Picture" Look at the MTF Scanner (Bottom Right).
If the 1H and 4H say "IN BEAR GAP" (Gold), you know the higher timeframe bias is Down. You should prioritize selling opportunities.
Step 2: Wait for Price to Visit a Zone On your current chart (e.g., 5m or 15m), wait for price to enter a Gold FVG (Resistance).
Note: The box will be bright gold. Once price touches it, the script will snap the box to that candle, confirming the test.
Step 3: Confirm with Structure Don't sell blindly. Wait for a CHoCH Label (Change of Character) to appear. This confirms that the short-term uptrend has broken and sellers are stepping in.
Step 4: Target the Opposing Zone Aim for the next unmitigated Teal FVG (Bullish Support) or Order Block below.
⚙️ Settings & Customization
Filter Small Gaps: Uses an ATR filter (default 0.5) to ignore insignificant noise. Increase to 1.0 for a cleaner "Swings Only" view.
Show Midpoint: Toggles a dotted 50% equilibrium line inside every active gap.
Visual Style: Fully customizable colors. Default scheme is PyraTime Desert Gold & Oasis Teal.
Fairvaluearea
Fair value bands / quantifytools— Overview
Fair value bands, like other band tools, depict dynamic points in price where price behaviour is normal or abnormal, i.e. trading at/around mean (price at fair value) or deviating from mean (price outside fair value). Unlike constantly readjusting standard deviation based bands, fair value bands are designed to be smooth and constant, based on typical historical deviations. The script calculates pivots that take place above/below fair value basis and forms median deviation bands based on this information. These points are then multiplied up to 3, representing more extreme deviations.
By default, the script uses OHLC4 and SMA 20 as basis for the bands. Users can form their preferred fair value basis using following options:
Price source
- Standard OHLC values
- HL2 (High + low / 2)
- OHLC4 (Open + high + low + close / 4)
- HLC3 (High + low + close / 3)
- HLCC4 (High + low + close + close / 4)
Smoothing
- SMA
- EMA
- HMA
- RMA
- WMA
- VWMA
- Median
Once fair value basis is established, some additional customization options can be employed:
Trend mode
Direction based
Cross based
Trend modes affect fair value basis color that indicates trend direction. Direction based trend considers only the direction of the defined fair value basis, i.e. pointing up is considered an uptrend, vice versa for downtrend. Cross based trends activate when selected source (same options as price source) crosses fair value basis. These sources can be set individually for uptrend/downtrend cross conditions. By default, the script uses cross based trend mode with low and high as sources.
Cross based (downtrend not triggered) vs. direction based (downtrend triggered):
Threshold band
Threshold band is calculated using typical deviations when price is trading at fair value basis. In other words, a little bit of "wiggle room" is added around the mean based on expected deviation. This feature is useful for cross based trends, as it allows filtering insignificant crosses that are more likely just noise. By default, threshold band is calculated based on 1x median deviation from mean. Users can increase/decrease threshold band width via input menu for more/less noise filtering, e.g. 2x threshold band width would require price to cross wiggle room that is 2x wider than typical, 0x erases threshold band altogether.
Deviation bands
Width of deviation bands by default is based on 1x median deviations and can be increased/decreased in a similar manner to threshold bands.
Each combination of customization options produces varying behaviour in the bands. To measure the behaviour and finding fairest representation of fair and unfair value, some data is gathered.
— Fair value metrics
Space between each band is considered a lot, named +3, +2, +1, -1, -2, -3. For each lot, time spent and volume relative to volume moving average (SMA 20) is recorded each time price is trading in a given lot:
Depending on the asset, timeframe and chosen fair value basis, shape of the distributions vary. However, practically always time is distributed in a normal bell curve shape, being highest at lots +1 to -1, gradually decreasing the further price is from the mean. This is hardly surprising, but it allows accurately determining dynamic areas of normal and abnormal price behaviour (i.e. low risk area between +1 and -1, high risk area between +-2 to +-3). Volume on the other hand is typically distributed the other way around, being lowest at lots +1 to -1 and highest at +-2 to +-3. When time and volume are distributed like so, we can conclude that 1) price being outside fair value is a rare event and 2) the more price is outside fair value, the more anomaly behaviour in volume we tend to find.
Viewing metric calculations
Metric calculation highlights can be enabled from the input menu, resulting in a lot based coloring and visibility of each lot counter (time, cumulative relative volume and average relative volume) in data window:
— Alerts
Available alerts are the following:
Individual
- High crossing deviation band (bands +1 to +3 )
- Low crossing deviation band (bands -1 to -3 )
- Low at threshold band in an uptrend
- High at threshold band in a downtrend
- New uptrend
- New downtrend
Grouped
- New uptrend or downtrend
- Deviation band cross (+1 or -1)
- Deviation band cross (+2 or -2)
- Deviation band cross (+3 or -3)
— Practical guide
Example #1 : Risk on/risk off trend following
Ideal trend stays inside fair value and provides sufficient cool offs between the moves. When this is the case, fair value bands can be used for sensible entry/exit levels within the trend.
Example #2 : Mean reversions
When price shows exuberance into an extreme deviation, followed by a stall and signs of exhaustion (wicks), an opportunity for mean reversion emerges. The higher the deviation, the more volatility in the move, the more signalling of exhaustion, the better.
Example #3 : Tweaking bands for desired behaviour
The faster the length of fair value basis, the more momentum price needs to hit extreme deviation levels, as bands too are moving faster alongside price. Decreasing fair value basis length typically leads to more quick and aggressive deviations and less steady trends outside fair value.

