Strategy · Pine Script v6 · Own pane

Q-Trend + KVO Strategy

by TradersPost

This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades.

View on GitHub

GitHub stars218on the repository
Pine versionv6current
Lines of code293
Settings27inputs
LicenceNone stated
Last update3 months ago23 Jul 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Q-Trend + KVO Strategy enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades under inverted conditions. Exits are managed via a stop loss placed at recent swing highs or lows and a fixed risk-to-reward take-profit target. Settings allow adjusting ATR parameters, KVO moving average lengths, swing lookback depth, and risk-reward ratios. Plotted in a separate indicator pane.

Details

Published by

TradersPost on GitHub

Type

Strategy, Pine Script v6

Draws

Separate pane below the chart

Category

Trend, Volume, Oscillators & momentum, Breakout

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
SourcesourcecloseqtSrcInput
Trend Periodint200qtPeriod
ATR Periodint40qtAtrPeriod
ATR Multiplierfloat1.0qtMult
Signal ModestringType AqtMode
Smooth Source with EMA?boolfalseqtUseEma
EMA Smoother Periodint10qtEmaPeriod
Fast Lengthint29kvFastLength
Slow Lengthint55kvSlowLength
Signal Smoothing TypestringEMAkvSignalType
Signal Smoothing Lengthint16kvSignalLength
Long: require STRONG buy signalboolfalserequireStrongLong
Show all 27 settings
SettingTypeDefaultVariable
Short: require STRONG sell signalboolfalserequireStrongShort
Require candle confirmationbooltruerequireCandle
Allow Long tradesbooltrueallowLongs
Allow Short tradesbooltrueallowShorts
Stop-Loss Swing Lookback (bars)int5slLookback
Risk : Reward Ratiofloat1.5rrRatio
Show Q-Trend linebooltrueshowTrendLine
Show entry signalsbooltrueshowSignals
Color bars by Q-TrendboolfalsecolorBars
Tint background by KVO areaboolfalseshowKvoBg
Show KVO oscillator (this pane)booltrueshowKvo
Long / TP colorcolorcolor.new(#26a69a, 0)longColor
Short / SL colorcolorcolor.new(#ef5350, 0)shortColor
Ticker fieldstring{{ticker}}tpTicker
Quantity field (optional)stringtpQty
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Brrrrr Strategy

by hasnocool
106 stars

The Brrrrr Strategy is a macro-based breakout strategy designed for crypto markets. It tracks the Glassnode total USDT supply daily metric and calculates a Donchian Channel over a user-defined lookback period. The strategy enters a long position when the USDT

Strategy v5 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Brrrrr Strategy

BTC MACD Basic Tests

by iamrichardD
57 stars

BTC MACD Basic Tests implements a Pine Script unit-testing framework designed to validate components of a long-only Bitcoin MACD trading system. It constructs structured test cases to evaluate mock functions for MACD crossover calculations, volume threshold ch

Strategy v6 Oscillators & momentumTrend
Updated 1 year ago · Apache-2.0 GitHub repository of BTC MACD Basic Tests
53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

ADA4H Optuna Strategy

by skywalker0803r
42 stars

This strategy trades longs and shorts on the price chart. Long entries require a close above the prior Donchian high, a close above a long-term SMA, and RSI above a threshold, with size set as a percentage of equity. Long exits use a stop at the prior Donchian

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of ADA4H Optuna Strategy
23 stars

This strategy evaluates breakout and trend opportunities on the price chart using a weighted composite score of volume, trend, and candlestick structure. It tracks volume spikes, fast and slow EMAs, higher-timeframe EMA trend alignment, opening ranges, and ses

Strategy v6 TrendVolume Repaints
Updated 3 weeks ago · Custom licence GitHub repository of TradingAlpha Point-Clip Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers