// VOLUME STOPS
// código original para la plataforma Tradingview por Gqman
// adaptación para la plataforma Prorealtime v10.3
// https://www.prorealcode.com/prorealtime-indicators/volume-stops/
//
redbar=open>=close
greenbar=open<=close
long1=volume[2]<volume[1] and volume[1]<volume[0] and redbar[2] and redbar[1] and greenbar[0]
short1=volume[2]<volume[1] and volume[1]<volume[0] and greenbar[2] and greenbar[1] and redbar[0]
long2=volume[2]>volume[1] and volume[1]>volume[0] and redbar[2] and redbar[1] and greenbar[0]
short2=volume[2]>volume[2] and volume[1]>volume[0] and greenbar[2] and greenbar[1] and redbar[0]
Signal = 0
if long1 or long2 then
//drawcandle (open,high,low,close) coloured (0,0,255) bordercolor (0,0,0)
Signal = 1
elsif short1 or short2 then
//drawcandle (open,high,low,close) coloured (0,0,0) bordercolor (0,0,0)
Signal = 2
endif
screener[Signal](Signal AS "1=↑,2=↓")