TwinPulse Q Lead SPY x QQQ Intermarket Pulse 1HTwinPulse Q Lead is a concise one hour indicator for SPY and QQQ that converts three sources of market information into a single pulse line, a mode readout with BUY SELL WAIT, and compact alerts. It blends intermarket leadership between QQQ and SPY, intraday flow from the slope of session VWAP, and where the current price sits inside the regular trading hours range. The three components are normalized, fused, compressed to a stable range, and smoothed for clear thresholds. The aim is a readable intraday regime signal that helps you decide when to participate and when to stand aside.
The script is built with Pine v6, uses request security with lookahead off, and does not repaint. It is an indicator, not a strategy. It does not contain any solicitation, links, or outside references. The description is self contained and explains both logic and use so that any trader can understand the design without reading code.
What makes this original and useful
Intermarket leadership is measured directly from QQQ and SPY on your working timeframe using a Z score of the return spread. When growth is leading value heavy large caps, leadership turns positive. When it lags, leadership turns negative. This gives a real time read of the Nasdaq versus S and P tug of war that most day traders watch informally.
Intraday flow is taken from the slope of the session VWAP. A linear regression of VWAP over a short window captures whether value is rising or falling inside the day. Dividing by ATR normalizes slope by typical movement so that the signal is comparable across weeks.
Session position places price inside the current regular hours high to low. It answers whether the day is trading in the top half, the bottom half, or the middle. This is a simple but powerful context filter for breakouts and fades.
The three components are fused into one pulse, compressed with either hyperbolic tangent or softsign to keep values bounded, and then smoothed by a short EMA. This yields a stable range with a zero line so the eye can read shifts quickly.
The panel shows a human readable mode with reasons and a strength score. Traders who do not want to read lines can rely on a simple state and a compact justification that explains why the state is set.
This is not a mashup that simply overlays unrelated indicators. Each component was chosen to answer a distinct question that is common to SPY and QQQ intraday decision making. Leadership answers who is in charge, flow answers whether value inside the session is building or leaking, and position answers if price is pressing the extremes or circling the middle. The pulse ties the three together and prevents any single component from dominating.
How the calculations work
Leadership. Compute a short rate of change for SPY and QQQ. Subtract SPY from QQQ to get spread returns, then compute a rolling Z score over a longer window. Positive values mean QQQ is leading. Negative values mean SPY is leading.
Flow. Compute session VWAP on the active symbol. Regress VWAP over a short window to obtain a slope estimate. Divide by ATR to scale slope by current volatility so that a small rise on a quiet day is not treated the same as a small rise on a wild day.
Position. Track the highest high and lowest low since the start of regular hours. Place the current close inside that range on a zero to one scale, then recenter to a minus one to plus one scale. Positive means the top half of the day, negative means the bottom half.
Fusion. Multiply each component by a weight so users can emphasize or de emphasize leadership, flow, or position. Sum to a raw pulse.
Compression. Pass the raw pulse through a bounded function. Hyperbolic tangent is smooth and has natural saturation near the extremes. Softsign is faster and behaves like a smoother version of sign near zero. Compression avoids unbounded excursions and makes thresholds meaningful across days.
Smoothing. Apply a short EMA to the compressed pulse to reduce noise. This creates the main line called TwinPulse in the plot.
Thresholds. You can use static symmetric levels or adaptive levels. The adaptive option computes a mean and a standard deviation of the smoothed pulse over a user window, then sets upper and lower thresholds as mean plus or minus sigma times standard deviation. This allows thresholds to adjust across regimes. Static levels are still available for traders who want repeatable levels.
Events and mode. A long event fires when the smoothed pulse crosses the upper threshold with positive flow and any optional filters agree. A short event fires on the symmetric condition. The mode reads the current state rather than fire and forget. It returns BUY when the smoothed pulse is above the upper threshold with positive flow, SELL when the smoothed pulse is below the lower threshold with negative flow, otherwise WAIT. A cooldown controls how often events can fire so alerts do not spam during choppy periods.
Inputs and default values
The script ships with defaults chosen for SPY and QQQ on one hour charts.
Symbols. SPY and QQQ by default. You can switch to any pair. Many users may test IWM versus SPY for small cap reads.
Regular hours selector. On by default. This restricts the position factor to New York regular hours. Turn it off if you prefer full session behavior.
ROC length is three bars. Z score length is fifty bars. VWAP slope window is ten bars. ATR length is fourteen bars. Pulse smoothing length is three bars.
Compression mode. Choose hyperbolic tangent or softsign. Hyperbolic tangent is default.
Weights. Leadership and flow are one by default. Position is set to zero point seven to give a modest influence to where price sits inside the day.
Thresholds. Adaptive thresholds are on by default with a lookback of one hundred bars and a sigma width of zero point eight. Static levels at plus or minus zero point six are ready if you disable adaptive mode.
Filters. ADX filter is off by default. If you enable it, the script requires ADX above a user minimum before it will signal. Higher time frame confirmation is off by default. When enabled it compares the smoothed pulse on the confirm timeframe to zero and requires alignment for longs or shorts.
Cooldown. Three bars by default so that alerts do not trigger too frequently.
UI. Bar coloring is on by default. The panel is on by default and sits at the top right.
All request security calls use lookahead off and will not request future data. All persistent state variables are assigned in a way that prevents repainting. The indicator does not use non standard chart types in its logic.
How to use the indicator
Load a one hour chart of SPY or QQQ. Keep a clean chart so that the script output is easy to read.
Turn on regular hours if you want the session position to reflect the cash session. This is recommended for SPY and QQQ.
Watch the panel. Mode reads BUY or SELL or WAIT. The strength value is a simple vote based score that ranges from zero to one hundred. It counts leadership, flow, ADX if enabled, and higher time frame confirmation if enabled. You can use strength to filter weak states.
Consider action only when mode is BUY or SELL and the signal has not just fired on the last bar. The triangles mark where an event fired. Alerts use the same logic as the events. WAIT means stand aside.
To slow the system, enable ADX and set a higher minimum or enable higher time frame confirmation. To speed it up, disable the filters, disable adaptive thresholds, or tighten the sigma width.
When publishing, use a clean chart with only this indicator. Show the symbol and timeframe clearly and make sure the plot legend is visible. If you add drawings on the chart, only include ones that help readers understand the output.
Publication notes and compliance
This description is written in English. The title uses ASCII and only uses capital letters for common abbreviations. The script is original and explains how and why the components work together. There are no links or promotional material. The script does not claim performance. It does not use lookahead. The panel and alerts exist to help a human read and act with discipline. The indicator can be published as open source or as protected. If you choose protected, the description still allows readers to understand how the logic works without access to the code.
If you later convert the logic into a strategy for publication, use realistic commission and slippage, risk no more than a small share of equity per trade, and choose a dataset that yields a large enough sample. Explain any deviations from these default recommendations in your strategy description. Do not publish results from non standard chart types since they can mislead readers on signal timing.
Limitations and risks
Intermarket leadership is a relative measure. There are hours when both SPY and QQQ fall while leadership remains positive. Treat leadership as a context, not a stand alone trigger.
VWAP slope is a path measure inside the session. It can flip several times on a choppy day. That is why the script uses a short smoothing and an optional cooldown. Use ADX or higher time frame confirmation to avoid the worst chop.
Session position assumes a meaningful regular hours range. On half days or around openings with gaps the position factor can be less informative. If this bothers you, reduce the weight of position or turn it off.
Compression and smoothing introduce lag by design. The goal is stability and clarity. If you want earlier but noisier signals, reduce smoothing and weights, and use static thresholds.
No indicator guarantees future results. TwinPulse Q Lead is a decision aid. It should be combined with your risk rules, position size policy, and a clear exit plan. Past behavior is not a promise for the future.
Frequently asked questions
What symbols are supported. Any symbol can be used as the chart symbol. Leadership uses the two user symbols which default to SPY and QQQ. Many traders may try IWM versus SPY or DIA versus SPY.
Can I change the timeframe. Yes, but the design target is one hour. On very short timeframes the VWAP slope becomes very sensitive and you should consider stronger filters.
Does the script repaint. No. It uses request security with lookahead off and the panel updates on the last bar only. Events are based on bar close conditions unless you attach alerts on any alert function call which will still respect the logic without looking into the future.
How are the strength numbers built. The strength score is the share of aligned votes across leadership, flow, ADX if enabled, and higher time frame confirmation if enabled. A value near one hundred means many filters agree. A value near fifty means partial alignment. It is not a probability or an accuracy number.
Can I use non standard chart types. You can view the indicator on them but do not publish signals from non standard chart types because that can mislead readers about timing. Use classic candles or bars when you publish and when you test.
Why do I sometimes see BUY but the price is not moving. A BUY mode requires pulse above the upper threshold and positive flow. It does not require higher highs immediately. Treat BUY as a permission to look for entries using your own execution rules.