Indicator · Pine Script v5 · Own pane

Hyper Flow Indicator

by jawauntb

This indicator calculates a composite RSI oscillator paired with STARC volatility bands in a separate pane.

View on GitHub

Repaints

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code149
Settings10inputs
LicenceGPL-3.0
Last update2 years ago22 May 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

149 lines of Pine Script v5 from hyper-flow-indicator.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

hyper-flow-indicator.pine
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © jawauntb

//@version=5
indicator("Hyper Flow Indicator", overlay=false)

// Constants
MS_IN_MIN = 60 * 1000
MS_IN_HOUR = MS_IN_MIN * 60
MS_IN_DAY = MS_IN_HOUR * 24

// Inputs
rsiPeriod = input.int(14, "RSI Period")
emaPeriod = input.int(15, "EMA Period")
maPeriod = input.int(32, "MA Period")
vwapPeriod = input.int(10, "VWAP Period")
vwapBandMultiplier = input.float(0.5, "VWAP Band Multiplier")
tprInput = input.int(8, "VRVP Ticks Per Row")
cvdPersistencePeriods = input.int(4, "CVD Persistence Periods")
starcBandMultiplier = input.float(2.0, "Starc Band Multiplier")
compRsiUpperThreshold = input.int(110, "Composite RSI Upper Threshold")
compRsiLowerThreshold = input.int(18, "Composite RSI Lower Threshold")

// Timeframe conversion
htfStep() =>
    tfInMs = timeframe.in_seconds() * 1000
    string result = na
    if tfInMs <= MS_IN_MIN
        result := "60"
    else if tfInMs < MS_IN_HOUR * 3
        result := "D"
    else if tfInMs <= MS_IN_HOUR * 12
        result := "W"
    else if tfInMs < MS_IN_DAY * 7
        result := "M"
    else
        result := "12M"
    result

higherTimeframe = htfStep()

// Calculations
rsiSource = close
rsiDelta = ta.rsi(rsiSource, rsiPeriod) - ta.rsi(rsiSource, rsiPeriod)[9]
rsiSma = ta.sma(ta.rsi(rsiSource, 3), 3)
compRsi = rsiDelta + rsiSma
starcBasis = ta.sma(compRsi, rsiPeriod)
starcDev = starcBandMultiplier * ta.stdev(compRsi, rsiPeriod)
starcUpper = starcBasis + starcDev
starcLower = starcBasis - starcDev
compRsiBottomed = compRsi < compRsi[1] and compRsi > starcLower
compRsiTopped = compRsi > compRsi[1] and compRsi < starcUpper
compRsiCrossingUp = ta.crossover(compRsi, starcLower)
compRsiCrossingDown = ta.crossunder(compRsi, starcUpper)

[compRsiHigher, _] = request.security(syminfo.tickerid, higherTimeframe, [compRsi, close], lookahead=barmerge.lookahead_on)
starcUpperHigher = ta.sma(compRsiHigher, rsiPeriod) + starcBandMultiplier * ta.stdev(compRsiHigher, rsiPeriod)
starcLowerHigher = ta.sma(compRsiHigher, rsiPeriod) - starcBandMultiplier * ta.stdev(compRsiHigher, rsiPeriod)
compRsiBottomedHigher = compRsiHigher < compRsiHigher[1] and compRsiHigher > starcLowerHigher
compRsiToppedHigher = compRsiHigher > compRsiHigher[1] and compRsiHigher < starcUpperHigher

// CVD calculations
[cvdUp, cvdDown] = request.security(syminfo.tickerid, timeframe.period, expression=[high, low], lookahead=barmerge.lookahead_on)
cvd = cvdUp - cvdDown
cvdStdev = ta.stdev(cvd, 20)
cvdBrightThreshold = cvdStdev * 2
cvdBright = (cvd > cvdBrightThreshold) or (cvd < -cvdBrightThreshold)
cvdPersistent = ta.barssince(not cvdBright) >= cvdPersistencePeriods

ema = ta.ema(close, emaPeriod)
ma = ta.sma(close, maPeriod)
emaBullish = ema > ma * 1.01
emaBearish = ema < ma * 0.99

[vwap, vwapUpper, vwapLower] = ta.vwap(hlc3, true, vwapBandMultiplier)

[poc, _, _] = request.security(syminfo.tickerid, timeframe.period, expression=[close, high, low], lookahead=barmerge.lookahead_on)
[totalVolume, _, _] = request.security(syminfo.tickerid, timeframe.period, expression=[volume, high, low], lookahead=barmerge.lookahead_on)
tpr = tprInput/syminfo.mintick
vrvpUpperBound = poc + tpr * 1.2
vrvpLowerBound = poc - tpr * 1.2

fpAbovePriceBuy = request.security(syminfo.tickerid, timeframe.period, high, lookahead=barmerge.lookahead_on)
fpAbovePriceSell = request.security(syminfo.tickerid, timeframe.period, low, lookahead=barmerge.lookahead_on)
fpBelowPriceBuy = request.security(syminfo.tickerid, timeframe.period, high, lookahead=barmerge.lookahead_on)
fpBelowPriceSell = request.security(syminfo.tickerid, timeframe.period, low, lookahead=barmerge.lookahead_on)
fpAbovePrice = fpAbovePriceBuy - fpAbovePriceSell
fpBelowPrice = fpBelowPriceBuy - fpBelowPriceSell
fpAbovePriceDecreasing = fpAbovePrice < fpAbovePrice[1]
fpBelowPriceDecreasing = fpBelowPrice > fpBelowPrice[1]

volumeMA = ta.sma(volume, 15)
volumeConfirmation = volume > volumeMA

maLong = ta.sma(close, 105)
maShort = ta.sma(close, 24)
maMedium = ta.sma(close, 50)
trendingUp = maShort > maMedium and maMedium > maLong
trendingDown = maShort < maMedium and maMedium < maLong

// Conditions
compRsiLongCondition = (compRsiBottomed and (compRsiCrossingUp or compRsi < compRsiUpperThreshold))
compRsiShortCondition = (compRsiTopped and compRsiCrossingDown) or compRsi > (compRsiLowerThreshold*4)
compRsiHigherLongCondition = compRsiBottomedHigher and compRsiHigher < (compRsiUpperThreshold*1.1)
compRsiHigherShortCondition = compRsiToppedHigher and compRsiHigher > (compRsiLowerThreshold*2.8)
compRsiMomentumLongCondition = compRsiLongCondition or (compRsiHigherLongCondition and (compRsi > 67)) or ((compRsi > rsiSma) and compRsi > 46)
compRsiMomentumShortCondition = compRsiShortCondition or compRsiHigherShortCondition
trendCondition = (trendingUp or emaBullish) or (trendingDown and emaBearish)
volumeCondition = (cvd > 0 and volumeConfirmation) or (volumeConfirmation and cvd < 0)
priceCondition = (close > (0.95* vwap)) or (close < 0.7*vwap)

// ATR
atrl = ta.atr(14)

// Momentum component
momentumMin = 0
momentumMax = 100
momentumValue = (compRsi - momentumMin) / (momentumMax - momentumMin) * 100
momentumDelta = momentumValue - momentumValue[9]
momentumComponent = momentumValue + momentumDelta

// Volume component
volumeMin = -cvdBrightThreshold
volumeMax = cvdBrightThreshold
volumeValue = (cvd - volumeMin) / (volumeMax - volumeMin) * 100
volumeDelta = volumeValue - volumeValue[9]
volumeComponent = volumeValue + volumeDelta

// Price component
priceMin = low
priceMax = high
priceValue = (close - priceMin) / (priceMax - priceMin) * 100
priceDelta = priceValue - priceValue[9]
priceComponent = priceValue + priceDelta

// Trend component
trendMin = -100
trendMax = 100
trendValue = ((maShort - maLong) / maLong - trendMin) / (trendMax - trendMin) * 100
trendDelta = trendValue - trendValue[9]
trendComponent = trendValue + trendDelta

// Combine components
compositeOscillator = (momentumComponent + volumeComponent + priceComponent + trendComponent) / 4

// Plot the oscillator and moving averages
plot(compositeOscillator, color=color.blue, linewidth=3)
plot(ta.sma(compositeOscillator, 13), color=color.yellow, linewidth=2)
plot(ta.sma(compositeOscillator, 33), color=color.red, linewidth=2)

Overview

Hyper Flow Indicator evaluates momentum by combining RSI differentials with smoothed RSI readings, while also referencing higher-timeframe data, moving averages, and estimated volume delta. User inputs allow adjustment of RSI lengths, STARC band multipliers, moving average periods, and threshold levels. The script uses security calls with lookahead enabled on higher-timeframe data, causing historical signals to reflect future bars and repaint.

Details

Published by

jawauntb on GitHub

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Oscillators & momentum, Volatility & bands, Volume

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)
  • Reads higher-timeframe data with lookahead on, so the history can show signals that were not there in real time

Settings

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

SettingTypeDefaultVariable
RSI Periodint14rsiPeriod
EMA Periodint15emaPeriod
MA Periodint32maPeriod
VWAP Periodint10vwapPeriod
VWAP Band Multiplierfloat0.5vwapBandMultiplier
VRVP Ticks Per Rowint8tprInput
CVD Persistence Periodsint4cvdPersistencePeriods
Starc Band Multiplierfloat2.0starcBandMultiplier
Composite RSI Upper Thresholdint110compRsiUpperThreshold
Composite RSI Lower Thresholdint18compRsiLowerThreshold
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

114 stars

This indicator standardizes price inputs using z-score normalization before calculating a relative strength index (RSI). It generates trade signals when standardized price components cross over or under the standardized RSI feature. Signals can be filtered by

Indicator v4 Oscillators & momentumVolatility & bands Repaints
Updated 1 year ago · None stated GitHub repository of Preprosessed & Standardized RSI

PPO ATR Bands

by cryptorife
75 stars

PPO ATR Bands plots a percentage price oscillator in a separate pane. It compares a Hull average of typical price with a volume-weighted exponential average of Parabolic SAR, then scales three true-range bands around the slow average into matching oscillator l

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · GPL-3.0 GitHub repository of PPO ATR Bands

This indicator calculates the Relative Strength Index (RSI) alongside a simple moving average to generate directional momentum signals in a separate pane. It supports Break Flip and Break Continuous scanning modes for long and short setups. A wide array of opt

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Momentum Setup: RSI Direction Confirmation

NFI v6

by koradiyakaushal
12 stars

This Pine v4 study ports early NostalgiaForInfinity V6 conditions onto the price chart. It computes two Bollinger setups, several EMAs and SMAs, RSI, MFI, a percent SMA spread labeled EWO, a 14-period choppiness value, and short and longer volume medians. Fixe

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · MIT GitHub repository of NFI v6

The script calculates a variant of the Fear & Greed Index using rate of return, accumulation distribution money flow weighted by volume, and volatility from VIX. It offers display options for the raw index value or price candles scaled by the index level. Smoo

Indicator v5 Oscillators & momentumVolatility & bands Repaints
Updated 4 years ago · MPL-2.0 GitHub repository of Trading Psychology - Fear & Greed Index by DGT

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers