Vector Candles
Vector Candles
Vector Candles
0 at
https://mozilla.org/MPL/2.0/
// Original pattern formation by plasmapug, rise retrace continuation to the upside
by infernix, peshocore and xtech5192
// Modified by RapidFireOG
// Original pattern formation by plasmapug, rise retrace continuation to the upside
by infernix, peshocore and xtech5192
// Please note code is open source and you are free to use it however you like
// This script is a Vector Candles indicator that visualizes climax and above-
average volume candles on the chart.
// It uses the PVSRA (Price, Volume, Support, and Resistance Analysis) method to
determine the candle color based on volume and price action.
// The indicator displays the candles in different colors, allowing traders to
identify potential trend reversals and significant market moves.
//@version=5
indicator('Vector Candles', overlay=true, max_bars_back=300,max_boxes_count=500,
max_lines_count=500, max_labels_count=500)
//inputs
bool overridesym = input.bool(group='PVSRA', title='Override chart symbol?',
defval=false, inline='pvsra')
string pvsra_sym = input.symbol(group='PVSRA', title='', defval='INDEX:BTCUSD',
tooltip='You can use INDEX:BTCUSD or you can combine multiple feeds, for
example \'(BINANCE:BTCUSDT+COINBASE:BTCUSD)\'. Note that adding too many will slow
things down.', inline='pvsra')
// PVSRA
pvsra_security(sresolution, sseries) =>
request.security(overridesym ? pvsra_sym : syminfo.tickerid, sresolution,
sseries[barstate.isrealtime ? 1 : 0], barmerge.gaps_off, barmerge.lookahead_off)
pvsra_security_1 = pvsra_security('', volume)
pvsra_volume = overridesym == true ? pvsra_security_1 : volume
pvsra_security_2 = pvsra_security('', high)
pvsra_high = overridesym == true ? pvsra_security_2 : high
pvsra_security_3 = pvsra_security('', low)
pvsra_low = overridesym == true ? pvsra_security_3 : low
pvsra_security_4 = pvsra_security('', close)
pvsra_close = overridesym == true ? pvsra_security_4 : close
pvsra_security_5 = pvsra_security('', open)
pvsra_open = overridesym == true ? pvsra_security_5 : open
CUColor = color.lime // Climax up (bull) bull and bear both start with b so it
would be weird hence up down
CDColor = color.red // Climax down (bear)
NUColor = #9b9b9b
NDColor = #414141
// candleColor =
iff(climax,iff(isBull,CUColor,CDColor),iff(aboveA,iff(isBull,AUColor,ADColor),iff(i
sBull,NUColor,NDColor)))
iff_5 = va == 2 ? AUColor : NUColor
iff_6 = va == 1 ? CUColor : iff_5
iff_7 = va == 2 ? ADColor : NDColor
iff_8 = va == 1 ? CDColor : iff_7
candleColor = isBull ? iff_6 : iff_8
barcolor(candleColor)