Video: If Your Trading Indicator Keeps Losing, Do This Before Every Trade
Creator: TradeGenius
Original Video: Watch the original video
Difficulty: Advanced
The Big Idea
An indicator signal is an event to evaluate, rather than an instruction to trade. TradeGenius proposes two changes: reject signals against a higher-timeframe trend reference, and replace automatic rebound entries with a pullback followed by a support or resistance break.
The resulting sequence is trend, pullback, breakout, and risk definition. Its appeal is that each step can disqualify an otherwise tempting signal. Whether those filters improve results is a research question; the selected chart examples do not establish that they eliminate losses or solve sideways trading.
Understand the Two Entry Methods
The video distinguishes rebound triangles from breaks of generated horizontal levels. A rebound signal appears when price crosses the regression value while the indicator’s momentum condition remains aligned. The alternative waits for a return to the regression band, then a break of the most recent relevant level.
A bullish triangle and a bullish resistance breakout therefore represent different entries. Testing one does not validate the other.
The retrieved creator description for Nadaraya-Watson Regression Liquidity Sweeps by AlgoAlpha (paid link) describes a smoothed regression estimate, a normalized slope oscillator, volatility-adjusted bands, and levels associated with weakening momentum. That description is consistent with the functions discussed in the video, but the transcript does not establish the exact installed version or all its defaults.
A “liquidity” label is an interpretation of price-derived information. It does not show all resting orders or prove that institutions are defending a level.
The Trend Filter Sets Permission
The source uses a dashed higher-timeframe Supertrend reference. When it is below price, the presenter considers longs and skips sells; when it is above price, the reverse applies.
In a bullish example, a sell triangle may be a countertrend reaction rather than a useful short. The trend filter removes that entry from consideration. It does not imply that every permitted buy will work.
The source calls the second tool Supertrend MTF Heikin Ashi, disables its first Supertrend option, and keeps the higher-timeframe line visible. Its dashed appearance is visual styling, not part of the trading logic. Exact default lengths and the automatic timeframe mapping are not specified in the transcript.
Higher-timeframe confirmation adds delay. A completed hourly reading is different from the current unfinished hourly reading, which can change before the hour closes. Decide which is allowed and preserve that choice in historical and live evaluation.
The Pullback Prepares; the Breakout Triggers
| Step | Long setup | Short setup |
|---|---|---|
| Permission | Trend reference below price | Trend reference above price |
| Preparation | Price retraces to the regression band | Price rallies to the regression band |
| Entry event | Break of the relevant resistance | Break of the relevant support |
| Protection | Recent swing low | Recent swing high |
| Objective | 1.5 times entry-to-stop price risk | 1.5 times entry-to-stop price risk |
The pullback alone does not authorize entry. Waiting for a subsequent break asks price to demonstrate renewed movement in the intended direction.
This can reduce signal frequency, but ranges can also produce pullbacks and false breakouts. A trend reference can remain bullish while price chops around it. The video does not supply a separate objective range-classification rule, so “the ranging problem is solved” should be treated as a claim to test.
For a repeatable test, identify which level is active at the pullback, when it becomes known, how long the setup may wait, and what cancels it. Replacing the target level with a convenient newer level after seeing price move would change the strategy.
Understand the 1.5R Target
In an original price example, a long fill at 2,400 with a stop at 2,392 has eight price units of planned risk. A 1.5R target is 2,412. Cash risk depends on quantity and the instrument’s dollar multiplier; a gold chart does not establish which contract or multiplier is being traded.
If the actual fill is 2,402 while the stop remains 2,392, risk is ten units and a fill-based 1.5R target is 2,417. Keeping the old 2,412 target would offer only 1R. Orders, fills, and bracket calculations need to describe the same experiment.
With exactly +1.5R winners and −1R losers, the theoretical break-even win rate is 40% before costs. If average round-trip friction is 0.10R per trade, the simplified threshold rises to 44%. This arithmetic assumes those exact payoff sizes; gaps, partial fills, and early exits can change them.
Settings: Avoid a Common Mix-Up
The source sets the regression indicator’s normalized length to 45 and leaves other parameters at their defaults. A normalized-slope calculation length is not automatically the regression kernel’s window, its bandwidth, or an ATR period. Do not substitute 45 into every field carrying a “length” label.
Record the exact script author, version, timeframe, and remaining defaults before reproducing the demonstration. The video uses both 15-minute and one-hour gold examples, which can produce different signal timing and sample sizes.
Pine Script Research Strategy
Expand the complete Pine Script research strategy
//@version=6
strategy("Causal regression pullback breakout - research proxy", overlay=true,
initial_capital=25000, pyramiding=0, margin_long=100, margin_short=100,
commission_type=strategy.commission.percent, commission_value=0.01,
slippage=2, calc_on_order_fills=true, calc_on_every_tick=false,
process_orders_on_close=false)
htf = input.timeframe("60", "Higher trend timeframe (must exceed chart)")
useHA = input.bool(true, "Use Heikin-Ashi for trend calculation only")
atrLength = input.int(10, "HTF Supertrend ATR length", minval=1)
factor = input.float(3, "HTF Supertrend factor", minval=0.1)
kernelLength = input.int(50, "Causal kernel window (not normalized length)", minval=2, maxval=300)
bandwidth = input.float(8, "Gaussian bandwidth", minval=0.1)
bandATR = input.float(1.5, "Band width / ATR(14)", minval=0.1)
levelBars = input.int(10, "Prior range breakout reference", minval=2)
stopBars = input.int(5, "Stop reference lookback", minval=1)
expiry = input.int(20, "Pullback expiry, chart bars", minval=1)
reward = input.float(1.5, "Target / actual entry-to-stop distance", minval=0.1)
cashRisk = input.float(100, "Estimated cash risk before costs", minval=1)
quantityStep = input.float(1, "Quantity increment", minval=0.000001)
maxQuantity = input.float(100, "Maximum quantity", minval=0.000001)
allowShorts = input.bool(true, "Allow shorts")
if barstate.isfirst
if not chart.is_standard
runtime.error("Use standard candles; HA is a reference feed only.")
if timeframe.in_seconds(htf) <= timeframe.in_seconds()
runtime.error("Trend timeframe must exceed the chart timeframe.")
f_confirmedTrend() =>
[line, direction] = ta.supertrend(factor, atrLength)
[line[1], direction[1]]
trendTicker = useHA ? ticker.heikinashi(syminfo.tickerid) : syminfo.tickerid
[trendLine, trendDirection] = request.security(trendTicker, htf, f_confirmedTrend(),
gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)
bull = trendDirection < 0 and close > trendLine
bear = trendDirection > 0 and close < trendLine
float weighted = 0.0
float weights = 0.0
for i = 0 to kernelLength - 1
w = math.exp(-0.5 * math.pow(i / bandwidth, 2))
weighted += close[i] * w
weights += w
regression = weighted / weights
width = ta.atr(14) * bandATR
upperBand = regression + width
lowerBand = regression - width
bandTouch = low <= upperBand and high >= lowerBand
recentResistance = ta.highest(high, levelBars)[1]
recentSupport = ta.lowest(low, levelBars)[1]
recentLow = ta.lowest(low, stopBars)
recentHigh = ta.highest(high, stopBars)
varip int armed = 0
varip int armedBar = na
varip float trigger = na
varip float setupStop = na
varip float tradeStop = na
varip float tradeTarget = na
varip float seenPosition = 0.0
varip int lastFillBar = na
fillPass = strategy.position_size != seenPosition
seenPosition := strategy.position_size
if fillPass
lastFillBar := bar_index
if strategy.position_size != 0
distance = strategy.position_size > 0 ? strategy.position_avg_price - tradeStop : tradeStop - strategy.position_avg_price
if distance > 0
tradeTarget := strategy.position_avg_price + (strategy.position_size > 0 ? 1 : -1) * reward * distance
else
strategy.close_all(comment="Fill beyond stop", immediately=true)
// Setups are processed only at ordinary confirmed closes, never on fill passes.
if not fillPass and barstate.isconfirmed and strategy.position_size == 0 and
(na(lastFillBar) or bar_index > lastFillBar)
if armed != 0
invalid = bar_index - armedBar > expiry or
(armed == 1 ? not bull or low <= setupStop : not bear or high >= setupStop)
if invalid
armed := 0
// Valid setups retain their original trigger and stop.
if armed == 0 and bandTouch and not na(regression)
if bull and recentResistance > close
armed := 1
trigger := recentResistance
setupStop := recentLow - syminfo.mintick
armedBar := bar_index
else if bear and allowShorts and recentSupport < close
armed := -1
trigger := recentSupport
setupStop := recentHigh + syminfo.mintick
armedBar := bar_index
if armed != 0 and bar_index > armedBar
breakout = armed == 1 ? close > trigger : close < trigger
distance = armed == 1 ? close - setupStop : setupStop - close
if breakout and distance > 0
unitRisk = distance * syminfo.pointvalue
quantity = math.floor(math.min(maxQuantity, cashRisk / unitRisk) / quantityStep) * quantityStep
if quantity >= quantityStep
tradeStop := setupStop
tradeTarget := na
if armed == 1
strategy.entry("L", strategy.long, qty=quantity)
strategy.exit("L-bracket", "L", stop=tradeStop)
else
strategy.entry("S", strategy.short, qty=quantity)
strategy.exit("S-bracket", "S", stop=tradeStop)
armed := 0
if strategy.position_size > 0 and not na(tradeTarget)
strategy.exit("L-bracket", "L", stop=tradeStop, limit=tradeTarget)
if strategy.position_size < 0 and not na(tradeTarget)
strategy.exit("S-bracket", "S", stop=tradeStop, limit=tradeTarget)
plot(regression, "Causal regression", color=color.blue)
plot(upperBand, "Upper band", color=color.new(color.blue, 50))
plot(lowerBand, "Lower band", color=color.new(color.blue, 50))
plot(trendLine, "Confirmed HTF trend reference", color=color.orange, linewidth=2)
plot(armed != 0 ? trigger : na, "Frozen breakout trigger", color=color.purple, style=plot.style_linebr)
plot(strategy.position_size != 0 ? tradeStop : na, "Frozen stop", color=color.red, style=plot.style_linebr)
plot(strategy.position_size != 0 ? tradeTarget : na, "Fill-based target", color=color.green, style=plot.style_linebr)
The following original strategy tests the ordering of the conditions, rather than reproducing either named indicator. Its regression is a causal Gaussian-weighted average using only the current and earlier closes. The envelope is ±1.5 ATR around that estimate. Its default 50-bar window and bandwidth of eight are our research choices, not the source’s normalized length of 45.
The trend reference is a standard Supertrend calculated on confirmed higher-timeframe data, optionally using Heikin-Ashi input. Defaults are ATR length ten, factor three, and a 60-minute reference. These are also ours. Use a reference strictly above the chart timeframe; for a one-hour chart, select a higher value such as 240 minutes.
A candle overlapping the band arms a setup. Resistance or support comes from the prior ten-bar range and is frozen at that point. The stop uses the last five bars’ extreme, including the pullback candle, plus a tick. A later completed close must break the frozen level within 20 bars. A trend change or penetration of the proposed stop cancels the setup.
This deliberately replaces the indicator’s momentum-generated liquidity levels with range references and uses candle closes instead of unspecified intrabar breaks. It has no rebound triangles or source oscillator.
Execution QA
Run the strategy on standard candles. Heikin-Ashi is used only as an optional trend-reference feed; entries, stops, and fills use the standard chart. TradingView’s non-standard chart documentation (paid link) explains that Heikin-Ashi prices are synthetic and should not be mistaken for executable market prices.
The higher-timeframe function returns the previous completed line and direction before requesting them with lookahead enabled. This avoids accessing an unfinished higher-timeframe value as though it had already been known historically.
Valid armed setups retain their original trigger and stop. New pullbacks do not overwrite them. The breakout must occur after the arming candle. If the breakout candle also penetrates the proposed stop, the setup is canceled before entry, a conservative rule that avoids assuming a favorable intrabar sequence.
A market entry normally fills at the next bar’s open. Its initial protective stop is submitted alongside the entry. A fill-only recalculation sets the target from actual average entry and the frozen stop without using that fill bar’s high, low, or close to select another setup. A fill beyond the stop prompts an immediate simulated exit.
Quantity is estimated from the signal close, so a gap can exceed the intended cash risk. The calculation assumes cash risk and contract profit-and-loss values use the same currency; foreign-currency conversion is not modeled. Set quantity increments and maximum exposure for the actual instrument. The 100% margin assumption can reject orders that lack buying power.
Commission defaults to 0.01% per fill and slippage to two ticks, adjustable in Strategy Properties. Borrow fees, funding, variable spreads, and broker restrictions are absent. Positions remain open until their bracket fills; there is no automatic session flatten. Include applicable overnight costs in further research.
Same-bar stop and target outcomes depend on broker-emulator assumptions. Inspect ambiguous trades with Bar Magnifier where available. The code has been reviewed for its stated logic but has not been compiled or backtested in TradingView; no performance result is claimed.
Backtest Lab
| Comparison | Controlled change | Question |
|---|---|---|
| Trend-reference data | Toggle Heikin-Ashi versus standard inputs | Does smoothing help enough to justify its delay? |
| Pullback definition | Change band width | Are results sensitive to a permissive overlap rule? |
| Breakout level | Vary the prior-range lookback | Does the apparent edge survive nearby definitions? |
| Execution stress | Increase commission and slippage | Does net expectancy survive realistic friction? |
Use identical instruments and dates, change one assumption at a time, and reserve an untouched period for validation. To evaluate the source’s claim about rebound triangles, separately log the actual indicator’s rebound signals and compare trend-aligned triangles against its pullback-and-level-break entries. The proxy strategy cannot settle that comparison because it does not generate those source signals.
Final Takeaway
The lesson is selective participation: a trend reference establishes permission, a pullback prepares an opportunity, and a level break supplies the trigger. Each condition must be defined before the trade. Fewer entries can improve discipline, but only a consistent test with realistic fills can establish whether the additional waiting improves results.
Risk Disclosure: This material is for educational and research purposes only and is not financial or investment advice. Trading can result in substantial losses. Backtests are hypothetical, depend heavily on their assumptions, and cannot reproduce every aspect of live execution. Commissions, spreads, slippage, liquidity, gaps, order behavior, market regime changes, and discretionary decision-making can materially affect real-world results. Leveraged products and short selling carry additional risks. Historical results do not guarantee future performance.
This article is an independent educational companion to the video and is not affiliated with, sponsored by, endorsed by, or authorized by TradeGenius, AlgoAlpha, or the creators of the referenced tools.