Bar

The Bar — The Fundamental Unit of Price

Vyapari uses the term “Bar” to represent a complete snapshot of price and volume data — the Open, High, Low, Close, and Volume values (collectively called OHLCV).

Each Bar encapsulates this data as a single entity.
Visually, a Bar can be represented as a Candlestick, a Renko Brick, a Heiken-Ashi Candle, or any other form — but the underlying data remains the same: OHLCV.


Time in a Bar

Every Bar carries not just price information, but also time — specifically, its Opening Time and Closing Time.
The time span between these two depends entirely on the Time Frame of the Bar.

Let’s take a few examples to understand this better:

  • 1-Minute Bar

    • Open Time: 09:15
    • Close Time: 09:16
  • 15-Minute Bar

    • Open Time: 09:15
    • Close Time: 09:30
  • Day Bar

    • Open Time: 09:15
    • Close Time: 15:30

Bars Are Time-Stamped

Each Bar also contains the date associated with its time frame.
This means every Bar represents market activity at a unique moment in time.

For example, on 16/10/2025:

  • The 1-minute Bar opened at 09:15 and closed at 09:16.
  • The 15-minute Bar opened at 09:15 and closed at 09:30.
  • The Day Bar opened at 09:15 and closed at 15:30.

Each of these Bars is distinct, even though they share the same opening timestamp — their duration and data scope differ.


How Data Rolls Up Across Time Frames

The 1-minute Bar holds granular data describing how price and volume behaved between its open and close times.

The 15-minute Bar compresses the activity of fifteen 1-minute Bars (from 09:15 to 09:29) into a single set of values:

  • Open = the first 1-minute Bar’s Open
  • High = the highest High among all 15 1-minute Bars
  • Low = the lowest Low among all 15 1-minute Bars
  • Close = the last 1-minute Bar’s Close
  • Volume = the sum of all 15 1-minute Volumes

Similarly, the Day Bar aggregates data from 375 one-minute Bars between 09:15 and 15:29, representing the entire trading session for that day.


The Bar in Vyapari

A Bar is the smallest unit of price measurement in Vyapari.
It forms the bedrock for every calculation — from Indicators to Strategies, Scanners, and Backtests.
Every higher-level concept in Vyapari ultimately builds upon Bars.

Tip "Core Principle"

All calculations in Vyapari — Indicators, Strategies, Signals — begin with Bars.  
Understand the Bar, and you understand the market’s language.