Liquidity Swings

Liquidity Swings

1. Introduction

In the world of technical analysis, understanding where liquidity clusters can offer a powerful edge. These zones, often located around swing highs and lows, reveal areas where price has previously reacted strongly—either through rejection or breakthrough. The Liquidity Swings indicator (by LuxAlgo) is designed to visualize these key price zones, highlighting areas of potential support and resistance based on historical pivot points and volume interaction.

2. How the Indicator Works

The Liquidity Swings indicator identifies pivot highs and pivot lows based on a configurable lookback period. Once these pivot points are detected, the script begins to monitor how price interacts with those levels:

  • Touches: When price enters the defined liquidity zone but does not break through.

  • Crosses: When price decisively breaks beyond the liquidity zone.

For each pivot, the indicator keeps track of:

  • The number of touches.

  • The volume during these touches.

  • Whether the zone was eventually broken.

Once a zone is broken or has received enough interactions (touches), it is visualized on the chart with dynamic segments and rectangles to highlight the area.

This dual-layered logic allows traders to differentiate between respected zones (untouched) and weakened or broken zones (crossed).

3. Indicator Parameters

The indicator offers several parameters that allow for full customization:

  • length (default: 14)
    The number of bars used to identify pivot highs/lows. Higher values make the indicator detect more significant, less frequent pivots.

  • areaType (default: 1)
    Defines how the liquidity zone is drawn:

    • 1: Wick extremities (from high to candle body).

    • 2: Full range (from high to low).

  • filterValue (default: 2)
    Minimum number of touches required for a zone to be displayed.

Display Settings

  • showTop (default: 1)
    Enable or disable resistance zones (pivot highs).

  • topAreaAlpha (default: 30)
    Transparency level for the red resistance area (0–255).

  • showBtm (default: 1)
    Enable or disable support zones (pivot lows).

  • btmAreaAlpha (default: 30)
    Transparency level for the green support area (0–255).

4. Chart Interpretation

Once applied, the indicator highlights liquidity zones using a color-coded system:

  • Resistance Zones (Pivot Highs):

    • Red dotted line: broken liquidity level.

    • Red rectangle: area from top wick to body or full range.

    • Label above the zone shows total volume accumulated from touches.

  • Support Zones (Pivot Lows):

    • Green dotted line: broken liquidity level.

    • Green rectangle: support area.

    • Label below the zone shows volume data.

If the zone hasn’t been broken but has sufficient touch count, the indicator draws the segment until the current bar, allowing traders to assess ongoing respect for the zone.

This allows for intuitive visualization of both historical significance and current relevance of price zones.

5. Configuration Tips

  • Increase filterValue to 3 or more to reduce noise and focus on high-importance zones.

  • If you’re only interested in resistance, disable showBtm, and vice versa.

  • Adjust topAreaAlpha and btmAreaAlpha for better integration with your chart’s background.

6. ProRealTime Code

7. Conclusion

The Liquidity Swings indicator offers a visually intuitive and algorithmically robust way to detect and analyze areas of significant price interaction. By combining pivot structure with touch count and volume filtering, it enables traders to better anticipate where the market is likely to find support or resistance.

Whether used standalone or in combination with other tools, this indicator can become an essential part of your technical analysis workflow.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. roccafragius • 48 days ago #

    Hi Ivan, this indicator is great!!! Thank you so much! Do you think it is usable to create a bot starting from this indicator? Where do you see the trigger to open/close the trade? Thank you! Franco

    • Iván • 47 days ago #

      Hello, thank you. Yes, it could be used, although I see it more for identifying reversal zones, using as a trigger an oscillator-type indicator and/or a specific candlestick pattern. It could also be interesting for breakout movements.

  2. roccafragius • 47 days ago #

    Thank you so much Ivan! Which oscillator-type indicator do you suggets? Morover do you suggest differet timeframe ( like for example 15 min for zone identification and 2 minutes for oscillator/candlestick pattern) or it is better not? Grazie Franco

  3. roccafragius • 47 days ago #

    For example using TF 3 minutes, stocastico 3 min and 15 min, Dual Volume Divergence Indicator coming from this library, your Liquidity Swing Indicator, My 0725 Hull 30 Pull Back DistV1 ( that misure how wide is the swing, if it is green price is falling under a limit and in this case SELL are forbidden and must serach a BUY).. but I still having some false entry signal before 2100 of yesterday, please see image in attach

  4. roccafragius • 47 days ago #
  5. roccafragius • 47 days ago #

    https://drive.google.com/file/d/1lSmW7lDUw8jzpLMCVC2NXDqO9QBFaxhS/view?usp=sharing

  6. geroniman • 47 days ago #

    Merci Ivan, super indicateur. Question: comment modifier la transparence des rectangles?

  7. roccafragius • 47 days ago #

    Hi Ivan sorry another question, in order to create a bot that open the trade, I’m tryng to create an indicator starting from your to have the entry trigger. Unfortunatelly I have difficoult to understand if the current price is on the support or on a resistance.. I post my modification,please could you check whta is wrong?

  8. roccafragius • 47 days ago #

    ////////////////////////////////////////// 0825-liquidity-test
    //—————————————–//
    //0925_Ivan_Liquidity Swings
    //version = 0
    //05.09.2025
    //Iván González @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    //—————————————–//
    ///defparam drawonlastbaronly=true
    //—————————————–//
    // — Parámetros de Configuración —
    //—————————————–//
    length = 14 // Pivot Lookback
    areaType = 1 // Swing Area: 1 = Wick Extremity, 2 = Full Range
    filterValue = 2 // Mostrar solo zonas con un conteo/volumen mayor a este valor
    //// — Estilos —
    showTop = 1
    topAreaAlpha = 30 //0 – 255
    showBtm = 1
    btmAreaAlpha = 30 //0 – 255
    //—————————————–//
    // — Inicialización de Arrays —
    //—————————————–//
    ONCE phCount = 0
    ONCE plCount = 0
    //—————————————–//
    // — FASE 1: Creacion de Arrays
    //—————————————–//
    isPivotHigh = (high[length] = HIGHEST[2*length+1](high))
    isPivotLow = (low[length] = LOWEST[2*length+1](low))
    // Almacenar nuevo Pivote Alto
    IF isPivotHigh THEN
    $phTop[phCount] = high[length]
    IF areaType = 1 THEN
    $phBtm[phCount] = MAX(close[length], open[length])
    ELSE
    $phBtm[phCount] = low[length]
    ENDIF
    $phLeft[phCount] = barindex[length]
    $phRight[phCount] = barindex[length-1]
    $phCrossed[phCount] = 0
    $phTouchCount[phCount] = 0
    $phTouchVolume[phCount] = 0
    phCount = phCount + 1
    ENDIF
    // Almacenar nuevo Pivote Bajo
    IF isPivotLow THEN
    $plBtm[plCount] = low[length]
    IF areaType = 1 THEN
    $plTop[plCount] = MIN(close[length], open[length])
    ELSE
    $plTop[plCount] = high[length]
    ENDIF
    $plLeft[plCount] = barindex[length]
    $plRight[plCount] = barindex[length-1]
    $plCrossed[plCount] = 0
    $plTouchCount[plCount] = 0
    $plTouchVolume[plCount] = 0
    plCount = plCount + 1
    ENDIF
    //—————————————–//
    // — FASE 2: Dibujo
    //—————————————–//
    //IF islastbarupdate THEN
    // Procesar Zonas de Resistencia
    SonoSuResistenza=0
    if showTop then
    FOR i = 0 TO phCount-1 DO
    dist=barindex-$phLeft[i]
    // Localizar el punto de ruptura
    for j=dist downto 1 do
    if $phCrossed[i] = 0 and close[j] > $phTop[i] then
    $phCrossed[i] = 1
    $phRight[i] = barindex[j]
    break
    elsif $phCrossed[i] = 0 and high[j] > $phBtm[i] and low[j]filterValue then
    ///drawsegment($phLeft[i],$phTop[i],$phRight[i],$phTop[i])style(dottedline)coloured(“red”)
    //drawrectangle($phLeft[i],$phTop[i],$phRight[i],$phBtm[i])coloured(“red”,0)fillcolor(“red”,topAreaAlpha)
    //drawtext(“#vol#”,$phLeft[i]+7,$phTop[i])coloured(“red”)
    elsif $phCrossed[i]=0 and $phTouchCount[i]>filterValue then
    //drawsegment($phLeft[i],$phTop[i],barindex,$phTop[i])style(line)coloured(“red”)
    //drawrectangle($phLeft[i],$phTop[i],barindex,$phBtm[i])coloured(“red”,0)fillcolor(“red”,topAreaAlpha)
    //drawtext(“#vol#”,$phLeft[i]+7,$phTop[i])coloured(“red”)
    if high>$plTop[i] and close<$plTop[i] and open<$plTop[i] then
    SonoSuResistenza=1
    endif
    endif
    NEXT
    endif
    //—————————————–//
    // Procesar Zonas de Soporte
    SonoSuSupporto=0
    if showBtm then

    FOR i = 0 TO plCount – 1 DO
    dist2=barindex-$plLeft[i]
    // Localizar el punto de ruptura
    for j=dist2 downto 1 do
    if $plCrossed[i] = 0 and close[j] < $plBtm[i] then
    $plCrossed[i] = 1
    $plRight[i] = barindex[j]
    break
    elsif $plCrossed[i] = 0 and low[j]$plBtm[i] then
    $plTouchCount[i] = $plTouchCount[i]+1
    $plTouchVolume[i] = $plTouchVolume[i]+volume[j]
    endif
    next
    //Dibujar el nivel de liquidez
    vol2=$plTouchVolume[i]
    if $plCrossed[i]=1 and $plTouchCount[i]>filterValue then
    //drawsegment($plLeft[i],$plBtm[i],$plRight[i],$plBtm[i])style(dottedline)coloured(“green”)
    //drawrectangle($plLeft[i],$plBtm[i],$plRight[i],$plTop[i])coloured(“green”,0)fillcolor(“green”,btmAreaAlpha)
    //drawtext(“#vol2#”,$plLeft[i]+7,$plTop[i])coloured(“darkgreen”)
    if open>$plBtm[i] and close>$plBtm[i] and lowfilterValue then
    //drawsegment($plLeft[i],$plBtm[i],barindex,$plBtm[i])style(line)coloured(“green”)
    //drawrectangle($plLeft[i],$plBtm[i],barindex,$plTop[i])coloured(“green”,0)fillcolor(“green”,btmAreaAlpha)
    //drawtext(“#vol2#”,$plLeft[i]+7,$plTop[i])coloured(“darkgreen”)
    //drawtext(“#vol2#”,barindex,close)coloured(“blue”)
    if open>$plBtm[i] and close>$plBtm[i] and low<$plTop[i] then
    SonoSuSupporto=1
    endif
    endif
    NEXT
    endif

    ///ENDIF
    if SonoSuResistenza=1 THEN
    //DRAWARROWDOWN(barindex, high+10) COLOURED(0,0,0)
    endif
    if SonoSuSupporto=1 THEN
    //DRAWARROWUP(barindex, low-10) COLOURED(0,0,0)
    endif
    //—————————————–//
    RETURN SonoSuSupporto as "SonoSuSupporto"

  9. freddy382 • 42 days ago #

    Hello Ivan, I tested the indicator, which is great, but I only get the volume display for Bitcoin or gold, not for currency pairs. Why? I’m with IB.
    Thanks in advance.
    Freddy

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
datageek How do I change the thickness of the line or change it too dashed lines? Kind regards
lkiklkik NE fonctionne pas ( ou plus ... )
Nicolas il faut modifier toutes les références à top par itop et bottom par ibottom. Ces mots étant ...
Nicolas change the lastline with: RETURN lastsig and check if lastsig change its value with the a...
nectouxg Hello Nicolas, I will try tonight when I get home, just one last question, I trade the DA...
FXtonio Bonjour, j'ai un problème avec le code, il me dit que ce n'est pas correct ligne 26-27-28: ...
Vonasi There is another version of this indicator that can plot the same lines but onto an indicato...
Martin35 Hello Vonasi, do you think it is possible with PRT to code with the same principle as on thi...
abhay I am getting a shading between the lines, how can I avoid that. I just want to see lines as ...
Vonasi Delete the 'Color Zone' in the indicator settings window.
mathiasKN Steffen Schmauch • 12/11/2018 # hello Nicolas, can I change the indicator that I only get t...
Nicolas Please open a new topic in the indicator forum and explain there your query, thank you.
upupandaway This seems like a very useful indicator. However, it does not seem to open properly in the c...
mscharstrom Hi @robertogozzi, I really love this indicator. However, I'd like to tinker with it to fit ...
Ahimsa Hi Roberto I cannot thank you enough for writing this code. It could help me more than you ...
Nicolas With PRT v11, you have to click on "price" at the upper left side of the price chart.
Nicolas Sure, I suggest you open a new topic in the forum to discuss about your ideas.
hdgm Bonjour Nicolas, est ce que l'on peut en faire une stratégie de trading automatisée ?
Nicolas Non, pas en utilisant l'indicateur zigzag traditionnel de la plateforme.
Marcel The line is just a moving average line. The indicator reacts on the Parabolic SAR dots.
Mattzi I dont get the dots! What am i doing wrong? :)
Mattzi Ignore this comment ;)
Gianluca ok i fixed it i hope is ok like this: //TAC trader zone 10.2 | indicator //01.01.2018 //R...
TAC Bolsa Hello try this new version or view the blog with the new indicators .. https://www.t...
TAC Bolsa Sorry, TAC Trader Zone V2 https://www.tiburonesdealetacorta.com/2018/11/indicador-tac-tr...
FULVIO09 Attualmente non c'è sufficiente volatilità : la condizione "C0 = AverageTrueRange[1500](Clos...
vlongobardo67 Ma io intendevo in backtest ! Scusa non l’ho menzionato.
ciniselloftse salve fulvio .il trading sistem e sempre profittevole?
cervantes2 Buenas tardes y gracias por este magnifico indicador. Queria saber si tienes un proscreener ...
cervantes2 Que busque los valores que la linea verde acaba de cruzar al alza o a la baja
AngelPujalt Tenéis algún screener de este indicador?
Yannick Hello There is a mistake in trailing stop code, I think that this should fix the problem s...
Paul About the trailing-stop the way it's coded. That works for backtesting only, just look at th...
Jonny sorry paul, but system says that is not possible to put many stop order combined...what have...
Violet Abz, the arrows and circles are only the *first part* of a trade setup. If certain conditio...
gabri Violet, you did an excellent job. I attached here https://www.prorealcode.com/prorealtim...
fab.ub HI GABRI, if the cirled arrow is the intermediate point in which You can define your entry a...
Matt B RolanBay, L'ellipse apparaît-elle à la bougie notifiée et reste ?
gianlucapegaso scusa Gagry ma il programm da copiare è quello con tutte le modifiche di cui ho letto nei va...
Valentinocorse bonjour a tous , superbe travail j'aimerai si possible une indication pour modifier l'indic...
Nicolas Oui pourquoi pas? :)
claudiofred Bonjour Nicolas, merci encore pour ce super indicateur. se demander s'il est possible d'écr...
Nicolas Screener déjà présent sur le forum ici: https://www.prorealcode.com/topic/indicador-lastmans...
rb-72 Thank you, area of twist by dilatacion of the price, missing part of the code that is not pu...
Thomas007 after reading your blog now I understand why there is only a part of your code here. I'm try...
Juanjo Hola¡¡ la estrategia se podria aplicar sobre acciones con marco temporal diario?? gracias.
Jessar Hello, could you tell me how to use this indicator? I think the simplest things can still be...
Leo Hi all, I posted a new version of this indicator ( I just add arrows to spot the local maxi...
Trading_En_El_Ibex35 Muchas Gracias por compartir este interesante indicador. Un saludo
xavieralava hola gracias leo
Nicolas https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291
Manu L. Bonjour Nicolas, suite a une de mes precedentes demande dans le forum indicateur, j'ai touv...
AntoGH C'est selon moi le meilleur indicateur, que j'ai vu, si vous trouvez mieux dîtes moi car dif...
Nicolas Your PRT version is inferior to 10.3? So the code in its default state is not compatible. A ...
Mbulelo Hi Nicolas Hope all is well your side, do you have a specific strategy for the MFT Swing ...
Nicolas No I don't, try to make it on your own, or ask in forums (follow the posting rules please).

Top