OPEN-SOURCE SCRIPT
DayFlow VWAP Relay Forex Majors Strategy

Summary in one paragraph
DayFlow VWAP Relay is a day-trading strategy for major FX pairs on intraday timeframes, demonstrated on EURUSD 15 minutes. It waits for alignment between a daily anchored VWAP regime check, residual percentiles, and lower-timeframe micro flow before suggesting trades. The originality is the fusion of daily VWAP residual percentiles with a live micro-flow score from 1 minute data to switch between fade and breakout behavior inside the same session. Add it to a clean chart and use the markers and alerts.
Scope and intent
• Markets: Major FX pairs such as EURUSD, GBPUSD, USDJPY, AUDUSD, USDCHF, USDCAD
• Timeframes: One minute to one hour
• Default demo in this publication: EURUSD on 15 minutes
• Purpose: Reduce false starts by acting only when context, location and micro flow agree
• Limits: This is a strategy. Orders are simulated on standard candles only
Originality and usefulness
• Core novelty: Residual percentiles to daily anchored VWAP decide “balanced versus expanding day”. A separate 1 minute micro-flow score confirms direction, so the same model fades extremes in balance and rides range breaks in expansion
• Failure modes addressed: Chop fakeouts and unconfirmed breakouts are filtered by the expansion gate and micro-flow threshold
• Testability: Every input is exposed. Bands, background regime color, and markers show why a suggestion appears
• Portable yardstick: Stops and targets are ATR multiples converted to ticks, which transfer across symbols
• Open source status: No reused third-party code that requires attribution
Method overview in plain language
The day is anchored with a VWAP that updates from the daily session start. Price minus VWAP is the residual. Percentiles of that residual measured over a rolling window define location extremes for the current day. A regime score compares residual volatility to price volatility. When expansion is low, the day is treated as balanced and the model fades residual extremes if 1 minute micro flow points back to VWAP. When expansion is high, the model trades breakouts outside the VWAP bands if slope and micro flow agree with the move.
Base measures
• Range basis: True Range smoothed by ATR for stops and targets, length 14
• Return basis: Not required for signals; residuals are absolute price distance to VWAP
Components
• Daily Anchor VWAP Bands. VWAP with standard-deviation bands. Slope sign is used for trend confirmation on breakouts
• Residual Percentiles. Rolling percentiles of close minus VWAP over Signal length. Identify location extremes inside the day
• Expansion Ratio. Standard deviation of residuals divided by standard deviation of price over Signal length. Classifies balanced versus expanding day
• Micro Flow. Net up minus down closes from 1 minute data across a short span, normalized to −1..+1. Confirms direction and avoids fades against pressure
• Session Window optional. Restricts trading to your configured hours to avoid thin periods
• Cooldown optional. Bars to wait after a position closes to prevent immediate re-entry
Fusion rule
Gating rather than weighting. First choose regime by Expansion Ratio versus the Expansion gate. Inside each regime all listed conditions must be true: location test plus micro-flow threshold plus session window plus cooldown. Breakouts also require VWAP slope alignment.
Signal rule
• Long suggestion on balanced day: residual at or below the lower percentile and micro flow positive above the gate while inside session and cooldown is satisfied
• Short suggestion on balanced day: residual at or above the upper percentile and micro flow negative below the gate while inside session and cooldown is satisfied
• Long suggestion on expanding day: close above the upper VWAP band, VWAP slope positive, micro flow positive, session and cooldown satisfied
• Short suggestion on expanding day: close below the lower VWAP band, VWAP slope negative, micro flow negative, session and cooldown satisfied
• Positions flip on opposite suggestions or exit by brackets
What you will see on the chart
• Markers on suggestion bars: L for long, S for short
• Exit occurs on reverse signal or when a bracket order is filled
• Reference lines: daily anchored VWAP with upper and lower bands
• Optional background: teal for balanced day, orange for expanding day
Inputs with guidance
Setup
• Signal length. Residual and regime window. Typical 40 to 100. Higher smooths, lower reacts faster
Micro Flow
• Micro TF. Lower timeframe used for micro flow, default 1 minute
• Micro span bars. Count of lower-TF bars. Typical 5 to 20
• Micro flow gate 0..1. Minimum absolute flow. Raising it demands stronger confirmation and reduces trade count
VWAP Bands
• VWAP stdev multiplier. Band width. Typical 0.8 to 1.6. Wider bands reduce breakout frequency and increase fade distance
• Expansion gate 0..3. Threshold to switch from fades to breakouts. Raising it favors fades, lowering it favors breakouts
Sessions
• Use session filter. Enable to trade only inside your window
• Trade window UTC. Default 07:00 to 17:00
Risk
• ATR length. Stop and target basis. Typical 10 to 21
• Stop ATR x. Initial stop distance in ATR multiples
• Target ATR x. Profit target distance in ATR multiples
• Cooldown bars after close. Wait bars before a new entry
• Side. Both, long only, or short only
View
• Show VWAP and bands
• Color bars by residual regime
Properties visible in this publication
• Initial capital 10000
• Base currency Default
• request.security uses lookahead off everywhere
• Strategy: Percent of equity with value 3. Pyramiding 0. Commission cash per order 0.0001 USD. Slippage 3 ticks. Process orders on close ON. Bar magnifier ON. Recalculate after order is filled OFF. Calc on every tick OFF. Using standard OHLC fills ON.
Realism and responsible publication
No performance claims. Past results never guarantee future outcomes. Fills and slippage vary by venue. Shapes can move while a bar forms and settle on close. Strategies must run on standard candles for signals and orders.
Honest limitations and failure modes
High impact news, session opens, and thin liquidity can invalidate assumptions. Very quiet days can reduce contrast between residuals and price volatility. Session windows use the chart exchange time. If both stop and target are touched within a single bar, TradingView’s standard OHLC price-movement model decides the outcome.
Expect different behavior on illiquid pairs or during holidays. The model is sensitive to session definitions and feed time. Past results never guarantee future outcomes.
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs.
DayFlow VWAP Relay is a day-trading strategy for major FX pairs on intraday timeframes, demonstrated on EURUSD 15 minutes. It waits for alignment between a daily anchored VWAP regime check, residual percentiles, and lower-timeframe micro flow before suggesting trades. The originality is the fusion of daily VWAP residual percentiles with a live micro-flow score from 1 minute data to switch between fade and breakout behavior inside the same session. Add it to a clean chart and use the markers and alerts.
Scope and intent
• Markets: Major FX pairs such as EURUSD, GBPUSD, USDJPY, AUDUSD, USDCHF, USDCAD
• Timeframes: One minute to one hour
• Default demo in this publication: EURUSD on 15 minutes
• Purpose: Reduce false starts by acting only when context, location and micro flow agree
• Limits: This is a strategy. Orders are simulated on standard candles only
Originality and usefulness
• Core novelty: Residual percentiles to daily anchored VWAP decide “balanced versus expanding day”. A separate 1 minute micro-flow score confirms direction, so the same model fades extremes in balance and rides range breaks in expansion
• Failure modes addressed: Chop fakeouts and unconfirmed breakouts are filtered by the expansion gate and micro-flow threshold
• Testability: Every input is exposed. Bands, background regime color, and markers show why a suggestion appears
• Portable yardstick: Stops and targets are ATR multiples converted to ticks, which transfer across symbols
• Open source status: No reused third-party code that requires attribution
Method overview in plain language
The day is anchored with a VWAP that updates from the daily session start. Price minus VWAP is the residual. Percentiles of that residual measured over a rolling window define location extremes for the current day. A regime score compares residual volatility to price volatility. When expansion is low, the day is treated as balanced and the model fades residual extremes if 1 minute micro flow points back to VWAP. When expansion is high, the model trades breakouts outside the VWAP bands if slope and micro flow agree with the move.
Base measures
• Range basis: True Range smoothed by ATR for stops and targets, length 14
• Return basis: Not required for signals; residuals are absolute price distance to VWAP
Components
• Daily Anchor VWAP Bands. VWAP with standard-deviation bands. Slope sign is used for trend confirmation on breakouts
• Residual Percentiles. Rolling percentiles of close minus VWAP over Signal length. Identify location extremes inside the day
• Expansion Ratio. Standard deviation of residuals divided by standard deviation of price over Signal length. Classifies balanced versus expanding day
• Micro Flow. Net up minus down closes from 1 minute data across a short span, normalized to −1..+1. Confirms direction and avoids fades against pressure
• Session Window optional. Restricts trading to your configured hours to avoid thin periods
• Cooldown optional. Bars to wait after a position closes to prevent immediate re-entry
Fusion rule
Gating rather than weighting. First choose regime by Expansion Ratio versus the Expansion gate. Inside each regime all listed conditions must be true: location test plus micro-flow threshold plus session window plus cooldown. Breakouts also require VWAP slope alignment.
Signal rule
• Long suggestion on balanced day: residual at or below the lower percentile and micro flow positive above the gate while inside session and cooldown is satisfied
• Short suggestion on balanced day: residual at or above the upper percentile and micro flow negative below the gate while inside session and cooldown is satisfied
• Long suggestion on expanding day: close above the upper VWAP band, VWAP slope positive, micro flow positive, session and cooldown satisfied
• Short suggestion on expanding day: close below the lower VWAP band, VWAP slope negative, micro flow negative, session and cooldown satisfied
• Positions flip on opposite suggestions or exit by brackets
What you will see on the chart
• Markers on suggestion bars: L for long, S for short
• Exit occurs on reverse signal or when a bracket order is filled
• Reference lines: daily anchored VWAP with upper and lower bands
• Optional background: teal for balanced day, orange for expanding day
Inputs with guidance
Setup
• Signal length. Residual and regime window. Typical 40 to 100. Higher smooths, lower reacts faster
Micro Flow
• Micro TF. Lower timeframe used for micro flow, default 1 minute
• Micro span bars. Count of lower-TF bars. Typical 5 to 20
• Micro flow gate 0..1. Minimum absolute flow. Raising it demands stronger confirmation and reduces trade count
VWAP Bands
• VWAP stdev multiplier. Band width. Typical 0.8 to 1.6. Wider bands reduce breakout frequency and increase fade distance
• Expansion gate 0..3. Threshold to switch from fades to breakouts. Raising it favors fades, lowering it favors breakouts
Sessions
• Use session filter. Enable to trade only inside your window
• Trade window UTC. Default 07:00 to 17:00
Risk
• ATR length. Stop and target basis. Typical 10 to 21
• Stop ATR x. Initial stop distance in ATR multiples
• Target ATR x. Profit target distance in ATR multiples
• Cooldown bars after close. Wait bars before a new entry
• Side. Both, long only, or short only
View
• Show VWAP and bands
• Color bars by residual regime
Properties visible in this publication
• Initial capital 10000
• Base currency Default
• request.security uses lookahead off everywhere
• Strategy: Percent of equity with value 3. Pyramiding 0. Commission cash per order 0.0001 USD. Slippage 3 ticks. Process orders on close ON. Bar magnifier ON. Recalculate after order is filled OFF. Calc on every tick OFF. Using standard OHLC fills ON.
Realism and responsible publication
No performance claims. Past results never guarantee future outcomes. Fills and slippage vary by venue. Shapes can move while a bar forms and settle on close. Strategies must run on standard candles for signals and orders.
Honest limitations and failure modes
High impact news, session opens, and thin liquidity can invalidate assumptions. Very quiet days can reduce contrast between residuals and price volatility. Session windows use the chart exchange time. If both stop and target are touched within a single bar, TradingView’s standard OHLC price-movement model decides the outcome.
Expect different behavior on illiquid pairs or during holidays. The model is sensitive to session definitions and feed time. Past results never guarantee future outcomes.
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
🔻Website: finaur.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
🔻Website: finaur.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
🔻Strategies: finaur.com/lab/
🔻Blog: finaur.com/blog/
🔻Telegram : t.me/finaur_com/
🔻Trader Psychology Profile – thelumenism.com/
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.