Sweep Institucional indicator

Category: Indicators By: Iván González Created: February 29, 2024, 2:09 PM
February 29, 2024, 2:09 PM
Indicators
4 Comments

Market sweeps are not mere random fluctuations, they are strategic moves designed to capture liquidity or to set the stage for more significant price movements. Therefore, understanding these sweeps can be key to anticipating big rallies or crashes, allowing traders to optimally position their trades.

The Sweep Institucional Indicator not only helps to identify these critical points with astonishing accuracy but also provides deep insights into the psychology behind market actions.

The Sweep strategy involves identifying potential trades based on the creation of a sweep (liquidity grab) at the Swing High or Swing Low.

//PRC_Sweep Institucional
//version = 0
//28.02.24
//Iván González @ www.prorealcode.com
//Sharing ProRealTime knowledge
///////////////////////////////////////////////
/////////////inputs////////////////////////////
cooldownPeriod =10 //"Cooldown Period"
prd = 20
src1 = low
src2 = high
////////Calculations//////////////////////////
/////pivots low
if src1 > src1[prd] and lowest[prd](src1) > src1[prd] and src1[prd] < lowest[prd](src1)[prd+1] then
$prevpivotlowy[lastset($prevpivotlowy)+1] = $pivotlowy[max(lastset($pivotlowy),1)]
$prevpivotlowx[lastset($prevpivotlowx)+1] = $pivotlowx[max(lastset($pivotlowx),1)]
$pivotlowy[lastset($pivotlowy)+1] = src1[prd]
$pivotlowx[lastset($pivotlowx)+1] = barindex[prd]
z = z + 1
drawpoint(barindex[prd],src1[prd],1)coloured("White")
drawtext("L",barindex[prd],src1[prd]-0.5*tr)coloured("green")
endif
/////pivots high
if src2 < src2[prd] and highest[prd](src2)<src2[prd] and src2[prd]>highest[prd](src2)[prd+1] then
$prevpivothighy[lastset($prevpivothighy)+1] = $pivothighy[max(lastset($pivothighy),1)]
$prevpivothighx[lastset($prevpivothighx)+1] = $pivothighx[max(lastset($pivothighx),1)]
$pivothighy[lastset($pivothighy)+1]=src2[prd]
$pivothighx[lastset($pivothighx)+1]=barindex[prd]
t=t+1
drawpoint(barindex[prd],src2[prd],1)coloured("White")
drawtext("H",barindex[prd],src2[prd]+0.5*tr)coloured("red")
endif
////////////////////////////////////////////////////////
pLow = $pivotlowy[max(1,lastset($pivotlowy))]
pHigh = $pivothighy[max(1,lastset($pivothighy))]
pLowindex = $pivotlowx[max(1,lastset($pivotlowx))]
pHighindex = $pivothighx[max(1,lastset($pivothighx))]

lp = lowest[prd](low)
hp = highest[prd](high)
lowestclose = lowest[prd](close)
highestclose = highest[prd](close)

////////////////////////Sweep conditions///////////////////////////////////////////
bullishSFP = low < pLow and close > pLow and open > pLow and low = lp and lowestClose >= pLow

bearishSFP = high > pHigh and close < pHigh and open < pHigh and high = hp and highestClose <= pHigh

bullCond = bullishSFP[3] and (close > pLow) and  (close[1] > pLow[1]) and (close[2] > pLow[2]) and barindex >= bullSignalIndex + cooldownPeriod

bearCond = bearishSFP[3] and (close < pHigh) and  (close[1] < pHigh[1]) and (close[2] < pHigh[2]) and barindex >= bearSignalIndex + cooldownPeriod

//Draw sweep lines
if bullcond then
bullsignalindex = barindex
drawsegment(pLowindex,pLow,barindex[3],pLow)style(dottedline,2)coloured(120,255,120)
drawtext("Sweep",barindex+1,plow-0.25*tr)coloured(120,255,120)
elsif bearcond then
bearSignalIndex = barindex
drawsegment(pHighindex,pHigh,barindex[3],pHigh)style(dottedline,2)coloured(255,120,120)
drawtext("Sweep",barindex+1,pHigh+0.25*tr)coloured(255,50,50)
endif

//Draw last Pivot High/Low line
if islastbarupdate then
if low > pHigh then
x = barssince(low crosses over pHigh)
drawsegment(pHighindex,pHigh,barindex-x,pHigh)style(line,2)coloured("red")
elsif high < pLow then
y = barssince(high crosses under pLow)
drawsegment(pHighindex,pHigh,barindex-y,pLow)style(line,2)coloured("green")
ELSE
drawsegment(pHighindex,pHigh,barindex+10,pHigh)style(line,2)coloured("red")
drawsegment(pLowindex,pLow,barindex+10,pLow)style(line,2)coloured("green")
endif
endif

return

Download
Filename: PRC_Sweep-Institucional.itf
Downloads: 230
Iván González Master
Operating in the shadows, I hack problems one by one. My bio is currently encrypted by a complex algorithm. Decryption underway...
Author’s Profile

Comments

Logo Logo
Loading...