Colorful code editor representing Lipi scripting engine
⚡ Built into GoCharting

Lipi — GoCharting's
Scripting Engine

Write custom indicators, strategy automations and data visualisations directly on the chart. Native access to orderflow metrics, COT data and a community of 7,000+ shared scripts.

7,000+ Community Scripts
3M+ Traders Worldwide
120+ Countries
#1 Web Orderflow Platform

Lipi is a powerful and flexible scripting language built directly into GoCharting. With access to orderflow metrics, COT data and a thriving community library, Lipi is the most capable scripting engine available in any web-based trading platform. No installs, no plugins — just open the Script Editor and start coding.

What You Can Build

📐
Custom Indicators
Plot any calculation as an overlay or in a separate pane. Combine price, volume and orderflow into a single visual.
Strategy Automation
Define entry and exit rules in code and backtest against historical or live data using GoCharting's built-in backtester.
🔬
Orderflow Metrics
Access Buy/Sell Volume, Delta, Open Interest and COT data natively inside scripts — unique to GoCharting.
📚
7,000+ Community Scripts
Browse and apply scripts published by the GoCharting community — from simple MAs to complex orderflow confluences.

Key Features

  • Full API documentation with examples and code snippets
  • Indicator-on-indicator support — chain multiple scripts together
  • Plot shapes, labels, lines, filled areas and backgrounds from code
  • Alert conditions defined in script — fires on chart or via notification
  • Save and share scripts from the cloud — works across all devices
  • Community support, self-help videos and guided tutorials

Learn & Reference

Community Scripts Showcase

Explore More

Discover what traders have built with Lipi. Browse all 7,000+ scripts →

1BullBear™ - Sessions
1BullBear™ - Sessions
sessionstimerange

1BB Sessions — Multi-session high/low tracker for the four major global trading windows, with automatic DST handling.

What it shows

For each of Tokyo, London, Premarket (US), and New York, the indicator draws:

  • A top line tracking the running session high
  • A bottom line tracking the running session low
  • A single-character open marker above the first bar (T / L / P / N)

Each session is evaluated in its own local time, and DST is handled automatically — US sessions follow EDT/EST (2nd Sunday March → 1st Sunday November), London follows BST/GMT (last Sunday March → last Sunday October), Tokyo is fixed JST year-round.

Default windows (city local time)

  • Tokyo 09:00 – 15:00
  • London 08:00 – 11:00
  • Premarket 07:00 – 09:00
  • New York 09:30 – 16:00

Inputs

  • Show / hide each session independently
  • Pick a custom color per session

Notes (V1)

First port of the Sessions module from the Pine Script v6 indicator "1BullBear" by KweeBoss_ (TradingView, MPL 2.0).

LipiScript doesn't currently expose drawing primitives (no box.new, line.new, or label.new), so the original Pine boxes are approximated using paired plots for the top/bottom and per-bar character markers for the opens. If LipiScript adds those primitives — or relaxes some of the parser constraints around float math and typing inside functions — a V2 with editable times, background fills, and proper labels becomes straightforward.

Credit: Original Pine Script "1BullBear" by KweeBoss_ — TradingView, MPL 2.0.

by KB 1BB
Dual Rolling VWAP
Dual Rolling VWAP

El Rolling VWAP (VWAP rodante) es una evolución del VWAP tradicional diseñada para eliminar el "efecto memoria" o el sesgo del punto de inicio.

Para entenderlo, primero debemos recordar que el VWAP estándar siempre empieza a calcularse desde un evento fijo (normalmente la apertura de la sesión, el inicio del mes o del año). El Rolling VWAP, en cambio, utiliza una ventana móvil de tiempo o de velas. 

by Carlos Adrian HCD
RDC
RDC

On a 30 minute time frame, when a green candle has negative Min / max delta threshold, and the high of that candle Is broken by the next candle, then we get a buy alert. We star trailing SL at 5% while keeping the SL at 3%. Vice Versa for a red candle .

by kunal sadana
Delta Divergence with Delta Threshold
Delta Divergence with Delta Threshold

This indicator is designed to identify delta divergence-based reversal opportunities using order flow data.

For a buy setup, it first detects a divergence where the price shows strength (a green candle), but the underlying order flow is weak (negative delta). This suggests hidden selling pressure despite price moving up. The next candle must confirm strength by being bullish (green) with a strong delta (at least 90% of the maximum or minimum delta), indicating aggressive buying entering the market. When this confirmation occurs, an up arrow is plotted on the divergence candle, signaling a potential upward move.

For a sell setup, the logic is reversed. It identifies a red candle (price weakness) with positive delta, indicating hidden buying pressure. The following candle must be bearish (red) with a strong imbalance in delta, confirming aggressive selling. A down arrow is then plotted on the divergence candle, signaling a potential downward move.

Overall, the strategy combines price action and order flow imbalance to detect situations where the market may reverse after absorbing opposing pressure, making it useful for spotting high-probability trade entries. 

by TradeVision
Trap Fade Reversal (TFR)
Trap Fade Reversal (TFR)
TFRTrap TradingOderflow

📊 Trap Fade Reversal Indicator :

The Trap Fade Reversal Indicator (TFR) is designed to identify high-probability turning points in the market by analyzing volume footprint dynamics, delta imbalances, and trader aggressiveness. It highlights situations where one side of the market (buyers or sellers) becomes trapped, and fading that imbalance offers a reversal opportunity.

🔑 Core Features

  • Volume Footprint Analysis: Tracks traded volume at each price level to reveal hidden buying or selling pressure.
  • Delta Monitoring: Measures the difference between aggressive buyers and sellers to detect exhaustion or imbalance.
  • Trader Aggressiveness: Identifies when market participants are chasing moves too aggressively, often leading to traps.
  • Call & Put Signals: Generates clear reversal signals:
    • Call (Buy) when sellers are trapped and aggressive selling fails to push price lower.
    • Put (Sell) when buyers are trapped and aggressive buying fails to push price higher.

🎯 Trading Logic

  • Trap Detection: Spots failed breakouts or breakdowns where aggressive traders are caught on the wrong side.
  • Fade Setup: Signals a reversal entry against the trapped side, anticipating a move back toward equilibrium.
  • Confirmation by Volume: Strong signals are validated by volume surges and footprint imbalances.

⚡ Benefits

  • Helps avoid chasing false breakouts.
  • Provides early warning of potential reversals.
  • Enhances decision-making with objective, footprint-based signals.
by Rajib Lochan Sahu
Aggression Ration Analysis
Aggression Ration Analysis

📊 Aggression Ratio – What it shows

This indicator measures market pressure by comparing selling volume vs buying volume:

  • Ratio = Sell Volume / Buy Volume

  • It reflects who is more aggressive in the market at any moment.

🔍 Interpretation

  • Ratio > 1.0 (Red)

    → Selling pressure dominates

    → More aggressive sellers (potential bearish sentiment)
  • Ratio < 1.0 (Green)

    → Buying pressure dominates

    → More aggressive buyers (potential bullish sentiment)
  • Ratio ≈ 1.0

    → Balanced market (buyers ≈ sellers)

⚙️ Smoothing Logic


  • Uses either:
    • EMA (default) → faster, reacts quickly to changes
    • SMA → smoother, slower response

  • Smoothing helps reduce noise from raw order flow spikes.

📈 Visualization

  • Column mode (default):

    Easy visual of shifting dominance between buyers and sellers.
  • Optional ratio line:

    Helps track trend in aggression over time.
  • Baseline at 1.0:

    Critical threshold separating bullish vs bearish pressure.

🧠 Practical Insight

  • Sustained >1 → Strong selling trend / possible continuation down
  • Sustained <1 → Strong buying trend / possible continuation up
  • Sharp spikes → Potential exhaustion or reversal zones
  • Divergence vs price → Early signal of weakening trend

⚠️ Important Note 

by TradeVision
Euphoria & Capitulation
Euphoria & Capitulation

This indicator highlights potential capitulation and euphoria moments in the market using a combination of volume spikes and recent price extremes.

It looks for unusually high volume compared to recent history (using a Z-score approach).

If high volume occurs when price is near the lowest level of a recent window, it marks a capitulation signal (possible panic selling).

If high volume occurs when price is near the highest level of a recent window, it marks a euphoria signal (possible excessive buying).

 

by TradeVision
Open Interest Z Score
Open Interest Z Score

This indicator is not just measuring Open Interest—it’s contextualizing participation in a statistical way, turning raw OI into a behavioral signal about market positioning.

🧠 What it really represents

Open Interest reflects how many contracts are open, but on its own it lacks meaning. This script transforms it into a Z-score, which effectively answers:

👉 “Is the current level of market participation unusually high or low compared to recent behavior?”

So instead of absolute values, you’re reading deviations from normal participation.

📊 Behavioral structure of the indicator

🟣 Z-score line (main signal)

This line shows how aggressively traders are entering or exiting positions relative to the past:


  • When it rises → participation is expanding faster than usual

  • When it falls → participation is shrinking or lagging

This makes it a second-order indicator—it doesn’t track price, but the commitment behind price.

🟢 +Z level (upper band)

This represents a statistical extreme in participation:


  • Market is seeing abnormally high positioning activity

  • Typically occurs when:

    • Trends are strong and attracting traders

    • Late-stage moves become overcrowded

👉 At this level, the market is often:


  • Either in a powerful continuation phase

  • Or approaching a saturation point where too many traders are on one side

🔴 -Z level (lower band)

This represents unusually low participation:


  • Traders are closing positions or staying inactive

  • Often seen after:

    • Liquidation events

    • Trend exhaustion

    • During sideways markets

👉 This reflects a lack of conviction, where the market is resetting before the next move.

⚖️ Market psychology behind it

This indicator is best understood as a crowd positioning thermometer:


  • High Z-score → “Everyone is getting involved”

  • Low Z-score → “No one is interested”

Markets tend to behave predictably at these extremes:


  • Crowded conditions → fragile, prone to sharp moves

  • Empty conditions → stable, but ready for expansion

🔗 Relationship with price (critical insight)

The real power comes from combining it with price:

1. Price ↑ + Z ↑


  • Strong trend with real participation

  • Indicates healthy continuation

2. Price ↑ + Z ↓


  • Price rising but participation dropping

  • Signals weak move / potential trap

3. Price ↓ + Z ↑


  • Increasing positions in a falling market

  • Can indicate aggressive shorting or panic selling

4. Price ↓ + Z ↓


  • Positions closing during decline

  • Suggests selling pressure is fading

⚡ Nature of extremes

The ±Z levels (like ±2) are statistically significant:


  • They mark rare deviations, not normal behavior

  • When reached, they often coincide with:

    • Breakouts fueled by new positions

    • Climax phases where positions become overcrowded

But importantly:

👉 Extremes don’t automatically mean reversal—they mean imbalance

by TradeVision
CVD Z Score
CVD Z Score

This indicator is a Z-score–normalized order flow tool, built around Cumulative Volume Delta (CVD) and per-bar delta, designed to measure how aggressive buying or selling is relative to recent history.

🧠 Core concept

At its heart, this script tracks order flow imbalance:

  • Buys (orderflow.buy) → aggressive market buying
  • Sells (orderflow.sell) → aggressive market selling
  • Delta = Buys − Sells → net aggression per candle

It then standardizes this using a Z-score, so instead of raw numbers, you see:

👉 “How extreme is current buying/selling compared to normal?”

📊 Two operating modes

1. useDeltaZ = true (default)


  • Uses per-bar delta

  • Focuses on short-term aggression spikes

👉 Best for:


  • Scalping

  • Spotting sudden buying/selling bursts

2. useDeltaZ = false


  • Uses CVD (cumulative delta)

  • Focuses on position buildup over time

👉 Best for:


  • Trend confirmation

  • Detecting sustained accumulation/distribution

📈 Z-score interpretation

🟢 Above 0 (green fill)


  • Buying pressure dominates

  • Positive delta relative to average

  • Indicates buyers are more aggressive than usual

👉 Context matters:


  • Rising price + positive Z → strong bullish participation

  • Falling price + positive Z → possible absorption (hidden selling)

🔴 Below 0 (red fill)


  • Selling pressure dominates

  • Negative delta relative to average

  • Indicates sellers are more aggressive than usual

👉 Context:


  • Falling price + negative Z → strong bearish conviction

  • Rising price + negative Z → possible hidden accumulation

⚡ Extreme values (|Z| > 2 or 3)


  • Statistically rare events

  • Signal unusual order flow imbalance

These zones often precede:


  • Liquidity grabs

  • Exhaustion moves

  • Sharp reversals or continuation bursts

🎛️ Smoothing logic

The indicator applies optional smoothing:

  • SMA smoothing → stable, less noisy
  • EMA smoothing → faster, more reactive

👉 Effect:


  • Reduces noise from raw delta spikes

  • Makes trends in order flow easier to read

🎨 Visual structure

  • Blue line (zLine) → normalized order flow strength
  • Zero line (red) → neutral boundary
  • Fill:

    • Green → bullish dominance

    • Red → bearish dominance

This creates a momentum-style oscillator, but based on real trading activity, not price alone. 

by TradeVision
Triple EMA with Upward Cross
Triple EMA with Upward Cross

plots three 50-period Exponential Moving Averages on the chart

each calculated from a different price source:

  • EMA Close (yellow, thicker) — the standard EMA based on closing prices
  • EMA Low (red, thin) — EMA calculated from candle lows, acting as a dynamic support floor
  • EMA High (green, thin) — EMA calculated from candle highs, acting as a dynamic resistance ceiling
by Nitin Patidar

Supported Markets

Lipi scripts work across all GoCharting markets — NSE/BSE Futures & Options, CME Futures (/ES, /NQ, /CL, /GC), Forex & Crypto and Indian equities. Orderflow metrics (delta, buy/sell volume, OI) are available wherever the underlying data feed supports them.

Related Features

← Back to Developers AI Charting Library → Charting Features → Orderflow Tools → Free Orderflow Education →
Start Scripting for Free →