Skip to main content
Prices, volume, orderflow, the instrument, the timeframe, sessions and time. Each row maps one concept from Lipi to the other languages; the word in a cell is the relation, explained in the language map overview. Each section below gives the Lipi construct first, then the construct in each language, with a note wherever behaviour differs. The language name links to the documentation the row was checked against.

Price and volume of the bar

The open, high, low, close and volume of the current bar. In Lipi: open, high, low, close, volume.

Average prices of the bar

Common averages of a bar’s prices, such as the mid-point of high and low. In Lipi: hl2, hlc3, ohlc4, hlcc4. hlcc4 is (high + low + 2 x close) / 4.

Open interest

The number of open contracts, for instruments that report it. In Lipi: oi. oi is 0, not na, on a bar that carries no open interest.

Orderflow of the bar

Buy and sell volume, delta and trade counts of the bar. In Lipi: orderflow.buyvolume, orderflow.sellvolume, orderflow.delta, orderflow.trades, orderflow.cvd. Ten integer series exist only where the chart has footprint data, else na. orderflow.cvd restarts at session.isfirst.

Instrument details

The symbol, exchange, currency, tick size and type of the instrument on the chart. In Lipi: syminfo.ticker, syminfo.exchange, syminfo.currency, syminfo.mintick, syminfo.asset_type. syminfo has 14 names; no tickerid, pointvalue or type. ticker is exchange:segment:symbol; mintick = tick size / maximum tick precision.

Chart timeframe

The timeframe of the chart and tests for its kind, such as intraday or daily. In Lipi: interval.interval, interval.isintraday, interval.isdaily, interval.multiplier, interval.in_seconds. There is no timeframe namespace; use interval.*. in_seconds counts a month as 2628003 seconds and is na for tick and range intervals.

Data from another symbol or timeframe

Reading a series of a different instrument or a different timeframe from the one on the chart. Lipi has no construct for this. Lipi reads only the chart’s own symbol and timeframe.

Chart type

Whether the chart shows standard candles or another bar type. In Lipi: chart.is_standard, chart.is_heikinashi, chart.is_renko. chart.* has nine names: bg_color, fg_color, is_standard, is_heikinashi, is_kagi, is_linebreak, is_pnf, is_range, is_renko.

Time of the bar

The opening and closing time of the current bar. In Lipi: time, time_close. time and time_close are int milliseconds; time_close is the open time plus one interval.

Current time

The present time while the script runs. In Lipi: timenow. timenow is the wall clock on every run, not the bar’s time. time.now does not exist.

Parts of a date

The year, month, day, weekday, hour, minute and second of a time. In Lipi: year, month, dayofmonth, dayofweek, hour, minute, second. dayofweek runs 1 (Sunday) to 7 (Saturday). hour(time, zone) needs an IANA zone name; an offset such as “UTC-5” gives 0.

Build a time value

Making a time value from a date and time of day. In Lipi: timestamp. A date string without a zone is read as UTC; a string that matches no layout gives na. The numeric form uses the exchange zone.

Format a time as text

Turning a time value into readable text. In Lipi: str.format_time. str.format_time reads seconds, not milliseconds: pass int(time / 1000). The layout is the reference date 2006-01-02 15:04:05.

Trading session

Whether a bar falls inside a session, and the start of the trading day. In Lipi: session.isfirst, session.date, time_sessionday. session.* has only date and isfirst; there is no session.islast.