This article was generated by AI. Please verify important information independently.

What Is PNL? Complete Guide to Trading Profit and Loss

Crypto Wiki|Jul 13, 2026|4.5 (500 ratings)
AI Summary

Learn what PNL means in trading, how it's calculated, and how OHLCV data powers your profit and loss calculations on crypto exchanges.

If you have seen "OHLCV" on a trading chart or "PNL: -$47.20" on your exchange dashboard and had no idea what either term meant, this guide covers both. These two concepts look unrelated at first glance, but they are directly connected: OHLCV data is the raw input that produces the PNL number you see on your Binance, Bybit, or Coinbase account. Understanding one without the other leaves a gap that most traders never close.

What Is OHLCV?

OHLCV stands for Open, High, Low, Close, and Volume: the 5 data points recorded for every price candle in financial markets. Open is the first traded price, High is the highest, Low is the lowest, Close is the final price, and Volume is the total units traded during that period. Together, these 5 values define every candlestick on a trading chart.

OHLCV is the standard format for market data delivery. When exchanges, APIs, and data providers transmit price information, they package it as OHLCV records (in crypto markets, these records are compiled from trade data settled on blockchain networks, the underlying infrastructure that makes transactions verifiable). The format applies equally across forex, stocks, commodities, and cryptocurrency markets.

One note on terminology: OHLC refers to the four-component version without Volume, used in some traditional finance chart formats. OHLCV adds Volume as the fifth field. They are related but distinct.

The Five OHLCV Components Explained

OHLCV contains 5 components, each measuring a different aspect of price activity within a single candle period. Here is what each one means and why it matters.

How OHLCV Data Creates a Candlestick

Every candlestick on a chart is built from exactly 5 data points: the OHLCV values for that time period. The diagram below shows how each component maps to a candle's visual structure.

BULLISH CANDLE (Close > Open)      BEARISH CANDLE (Close < Open)

        High --- ^ (upper wick)           High --- ^ (upper wick)
                 |                                  |
        Close -- +-----+ (top of body)    Open --- +-----+ (top of body)
                 |     |                            |     |
                 |GREEN|                            | RED |
                 |BODY |                            |BODY |
                 |     |                            |     |
        Open --- +-----+ (bottom of body) Close --- +-----+ (bottom of body)
                 |                                  |
        Low ----- v (lower wick)          Low ----- v (lower wick)

        [Volume bar shown below chart]

A bullish candle forms when Close is above Open; the body is green. A bearish candle forms when Close is below Open; the body is red. Bar charts (OHLC bars) represent the same underlying data in a different visual format, but every candlestick you see on platforms like Bybit's trading chart interface is constructed from these same 5 OHLCV values.

O: Open Price

The Open price is the first traded price at the start of the candle's time period. It marks the beginning of a candle and is one of the two prices that determine whether the candle closes bullish or bearish. The Open price changes based on which timeframe you are viewing: a 1-hour candle and a 1-day candle for BTC on the same day will show different Open values.

Suppose the 1-hour BTC/USD candle opened at $65,000. That means the first trade executed at the start of that hour was at $65,000. If you bought BTC at that moment, your entry price for PNL calculation is $65,000.

H: High Price

The High price is the highest price at which any trade was executed during the candle's time period. On the candlestick, the High sits at the tip of the upper wick. It represents the maximum bullish pressure reached during the period. High prices across multiple candles form resistance levels, price zones where buying has historically stalled.

For traders measuring volatility, the ATR (Average True Range) indicator uses High, Low, and Close to calculate how much an asset moves per candle. The High also represents the maximum unrealized profit a long position holder could have achieved during that candle, had they sold at the peak.

A note on precision: the candle High is an intra-period high, not an all-time high (ATH). Use "candle high" or "period high" when context requires clarity.

L: Low Price

The Low price is the lowest price at which any trade was executed during the candle's time period. Visually, it appears at the bottom of the lower wick. Low prices across multiple candles form support levels, price zones where selling pressure has historically been absorbed.

ATR uses the Low alongside High and Close. For a long position holder, the candle Low represents the deepest unrealized loss experienced during that period. For a short position holder (one who profits when price falls), the Low represents the maximum unrealized profit reached during the candle.

The candle Low is an intra-period measurement, not an all-time low (ATL) unless the timeframe is long enough to encompass one.

C: Close Price

The Close price is the most important of the 5 OHLCV values.

The Close price is the last traded price before the candle period ends and a new one begins. Three things make it the most significant component:

  1. Direction: Close above Open = bullish candle. Close below Open = bearish candle.
  2. Indicator input: Most technical indicators use Close prices by default. A 20-period simple moving average (SMA) averages the Close prices of the last 20 candles. RSI, MACD, and Bollinger Bands all derive from Close.
  3. PNL calculation: Your exchange calculates unrealized PNL against the current Close price (or mark price for futures).

On a live, uncompleted candle, the Close is the current last traded price. It updates with every tick and only finalizes when the candle period ends. For futures positions, exchanges may use mark price rather than the last traded price for unrealized PNL to prevent manipulation. More on this in the PNL formula section.

Suppose you bought BTC at $65,000 (the Open) and the current Close price is $66,500. Your unrealized PNL = ($66,500 - $65,000) × your quantity.

V: Volume, the Most Overlooked OHLCV Component

Volume is included in OHLCV because price alone does not tell you whether a move has conviction. A price increase on high volume means many traders participated and validated the direction. The same increase on low volume may not hold. Volume is the 5th data point that gives the other four their context: without it, you cannot distinguish a genuine market move from a thin-market anomaly.

Volume is the total number of units traded during the candle's time period. Two volume types appear on exchanges: base volume (the number of BTC or coins traded) and quote volume (the USD value of those trades). Most exchanges display base volume by default, and OHLCV APIs typically return base asset volume unless specified otherwise.

Volume matters for 4 reasons:

  1. Confirms price moves: A price increase on high volume has backing. The same increase on low volume is suspect.
  2. Reveals market participation: High volume means more traders agree on the price at that moment.
  3. Identifies fakeouts: A breakout on low volume is a common precursor to a reversal.
  4. Powers volume-based indicators: OBV (On-Balance Volume) and VWAP (Volume-Weighted Average Price) both derive directly from the Volume field.

Suppose BTC rises $2,000 in a single candle on 5x its average volume. The move has strong confirmation. The same move on below-average volume is suspect.

Volume LevelPrice DirectionSignal StrengthInterpretation
HighRisingStrongConfirmed bullish move
LowRisingWeakPotential fakeout, watch for reversal
HighFallingStrongConfirmed bearish move
LowFallingWeakLow conviction selling, may recover

How to Read OHLCV Data on a Candlestick Chart

Reading an OHLCV candlestick chart is a 6-step process once you know what each data point represents.

  1. Select your timeframe. Choose the candle interval that matches your trading style: 15 minutes for day trading, 4 hours for swing trading, and so on. Each candle represents one complete unit of that period.
  2. Locate the Open price. On a bullish (green) candle, the Open is at the bottom of the candle body. On a bearish (red) candle, the Open is at the top of the body.
  3. Locate the Close price. On a bullish candle, Close is at the top of the body. On a bearish candle, Close is at the bottom. Close above Open confirms bullish direction.
  4. Read the High and Low. The tip of the upper wick is the High, the highest traded price of the period. The tip of the lower wick is the Low, the lowest.
  5. Check the Volume bar. The volume bar appears below the price chart. A tall bar means high trading activity during that candle. A short bar means low activity.
  6. Interpret the full picture. Combine price direction with volume to assess whether the move has strength.

Worked example: Suppose the 1-hour BTC/USD candle shows:

ComponentValueWhat It Tells You
Open$65,000First trade of the hour was at $65,000
High$65,800Buyers pushed as high as $65,800 during the hour
Low$64,500Sellers pushed as low as $64,500 during the hour
Close$65,600Last trade of the hour was at $65,600
Volume1,240 BTC1,240 BTC changed hands during this hour

The candle is bullish (Close $65,600 > Open $65,000). The Close of $65,600 is the value your exchange uses to calculate your PNL if you hold an open BTC position.

What Is PNL in Trading?

PNL stands for Profit and Loss, the net financial result of a trading position. A positive PNL means you are in profit; a negative PNL means you are at a loss. PNL is calculated as: (Exit Price - Entry Price) x Quantity. Until you close your position, your PNL is unrealized and changes with every price movement. You may also see this written as P&L or P/L; all three refer to the same metric.

If you see a PNL number on your Binance, Bybit, or Coinbase dashboard, that number tells you how much your current or closed positions have gained or lost. Tracking your PNL across all positions is the foundation of risk management. It tells you when to cut losses, when to take profits, and how much capital is at risk at any given moment. Your exchange typically displays both per-position PNL and an aggregate portfolio PNL total, so you can see the full picture at a glance.

Two order types directly determine when your PNL moves from unrealized to realized: a stop-loss order (SL) automatically closes your position if the price moves against you by a set amount, locking in a loss; a take-profit order (TP) closes your position when the price reaches your target, locking in a gain. Both convert floating PNL into realized PNL. See how take profit and stop loss orders work in spot trading for the mechanics of setting these orders on a live account.

Beyond individual trades, PNL is the core metric of portfolio management. The aggregate realized and unrealized PNL across all your positions tells you whether your trading portfolio is growing or shrinking over time. This principle applies on decentralized finance (DeFi) platforms as well, where DEX trading interfaces display equivalent data and PNL remains the central measure of performance.

How to Calculate PNL: Formula and Worked Examples

Spot PNL formula:

Spot PNL = (Exit Price - Entry Price) x Quantity

Profitable trade example: Suppose you buy 0.5 BTC at $64,000 (entry price). The price rises to $68,000 and you sell (exit price).

PNL = ($68,000 - $64,000) x 0.5 = +$2,000

This $2,000 is credited to your account balance.

Losing trade example: Suppose you buy 0.5 BTC at $64,000. The price falls to $60,000 and you sell.

PNL = ($60,000 - $64,000) x 0.5 = -$2,000

This $2,000 is deducted from your account balance.

To express PNL as a percentage: PNL% = (PNL / Entry Cost) x 100.

Futures PNL formula:

Futures PNL = (Exit Price - Entry Price) x Quantity x Leverage

For futures positions, exchanges calculate unrealized PNL using mark price, a fair value derived from multiple index sources, rather than the last traded price. Mark price prevents artificial price spikes on a single exchange from triggering liquidations. The PNL number on your futures dashboard reflects the difference between your entry price and the current mark price, multiplied by your position size and leverage factor.

Risk disclosure: Leveraged positions amplify both gains and losses. A 10x leveraged position that moves 10% against you results in 100% loss of your deposited margin, which means liquidation. For perpetual futures stop-loss mechanics, see how take profit and stop loss orders work for perpetual futures contracts. Never trade with leverage you do not fully understand.

How OHLCV Data Powers Your PNL Calculation

OHLCV data is the direct input for your PNL calculation. The specific connection runs through the Close price: when your exchange shows you a PNL number on an open position, it is comparing your entry price against the current Close (or mark price for futures). Every price movement that updates the Close field updates your PNL simultaneously.

Here is the full chain using the candle from the earlier example:

OHLCV candle: Open $65,000 | High $65,800 | Low $64,500 | Close $65,600 | Volume 1,240 BTC

Scenario: You bought 1 BTC at the Open, so your entry price = $65,000.

  • Current unrealized PNL = ($65,600 - $65,000) x 1 = +$600
  • Maximum unrealized profit during this candle = ($65,800 - $65,000) x 1 = +$800 (the High)
  • Maximum unrealized loss during this candle = ($64,500 - $65,000) x 1 = -$500 (the Low)

Volume adds one more layer: the Close of $65,600 on 1,240 BTC volume is a more credible price than the same Close on 200 BTC volume. A thinly traded Close is easier to manipulate and less likely to hold. This is why exchanges use mark price for futures PNL rather than the last traded price alone.

Whether that +$600 shows as real money in your account depends on one more distinction.

Realized vs. Unrealized PNL: What Is the Difference?

Unrealized PNL is the profit or loss on a position you still hold. It changes with every price movement and has not yet been credited to your balance. Realized PNL is the final, locked-in profit or loss after you close a position. This amount is credited to or deducted from your account balance immediately.

Unrealized PNL (also displayed as floating PNL, open PNL, or position PNL depending on your exchange) represents a theoretical outcome. The number on your dashboard can swing from positive to negative and back as price moves. It has no effect on your actual account balance until you close the position.

Realized PNL is the number that matters to your wallet. Once you close a trade, the realized PNL is permanently settled. Price movements no longer affect it.

Different platforms label these differently. Binance Futures separates them on the position dashboard. Bybit shows "Unrealized P&L" for open positions and "Closed P&L" for settled ones. The concept is identical regardless of the label.

AttributeUnrealized PNLRealized PNL
Position statusOpen (not yet closed)Closed
Changes with price?Yes, with every price tickNo, locked in at close
Account balance impactNot credited yetImmediately credited or deducted
Tax event (general)Generally not a taxable eventMay trigger a taxable event

Worked example, unrealized to realized:

Suppose you buy 1 BTC at $60,000. The price rises to $65,000.

  • Unrealized PNL = +$5,000. You have not made $5,000 yet. If the price falls back to $60,000, your unrealized PNL returns to zero.
  • You sell at $65,000. Realized PNL = +$5,000. This amount is now credited to your account balance. Price movements no longer affect it.

Why Is My PNL Negative When the Price Went Up?

Three situations produce this result:

1. You are holding a short position. A short position is a trade where you profit when the price falls. When the price rises, a short position loses value. If the asset you are tracking went up but you are short, your PNL moves in the opposite direction.

2. Futures leverage and liquidation. A highly leveraged futures position can be liquidated before the price recovers. If your position was closed at a loss by the exchange before the price recovered, the realized PNL is locked in as negative regardless of where the price goes afterward.

3. The price is still below your entry point. The price may have risen from a recent low but remains below your entry price. Your PNL is calculated against your entry price, not yesterday's price. A move from $58,000 to $62,000 still produces a loss if you bought at $64,000.

For a detailed breakdown of this scenario, see why your closed P&L can show a loss even when unrealized profit was positive.

How Traders Use OHLCV Data

Every chart you read, every indicator on your screen, and every automated strategy running against an exchange API draws from OHLCV data. Technical analysis is the practice of analyzing past price and volume data (the OHLCV record) to forecast future price movements. Unlike fundamental analysis, which evaluates a project's financials or on-chain metrics, technical analysis relies entirely on the data captured in OHLCV fields.

Price action trading is the practice of making trading decisions based on raw OHLCV candlestick patterns directly, without relying on lagging indicators. Once you understand what each OHLCV component represents, you can read price action: recognizing how candles of different shapes signal shifts in buying and selling pressure.

The same data structure powers systematic trading as well. Every strategy built on technical analysis derives its rules from OHLCV patterns and indicator values, whether that strategy runs on manual chart-reading or an automated execution engine. The format originated in traditional financial markets: forex (foreign exchange), stocks, and commodities all adopted OHLCV as their standard price data structure before it became universal in cryptocurrency markets.

OHLCV and Technical Indicators

Every standard technical indicator is calculated from one or more OHLCV components. Remove OHLCV data and every indicator on your chart ceases to function. The table below shows the exact inputs each common indicator uses.

IndicatorOHLCV Input(s) Used
Simple Moving Average (SMA)Close
RSI (Relative Strength Index)Close
MACDClose (via EMA calculations)
Bollinger BandsClose (center band SMA)
ATR (Average True Range)High, Low, Close
VWAPClose, Volume
OBV (On-Balance Volume)Close, Volume

A 20-period SMA takes the Close prices of the last 20 candles and calculates their average. That single number, displayed as a line on your chart, is derived entirely from 20 OHLCV Close values. Both leading indicators (which attempt to anticipate price direction) and lagging indicators (which confirm trends already underway) draw from this same data structure.

OHLCV Timeframes: Which Candle Interval Should You Use?

OHLCV data is always timeframe-specific. Every candle represents exactly one unit of the chosen time period, and the same BTC/USD pair will show entirely different Open, High, Low, Close, and Volume values on a 5-minute chart versus a 4-hour chart. Choosing the right timeframe depends on your trading style.

API documentation may use "interval," "period," or "resolution" to mean the same concept. The notation "1h" and "60" both refer to 60-minute candles depending on the exchange.

TimeframeCommon NotationTrading StyleCandles Per DayBest For
1 minute1mScalping1,440Very short-term momentum
5 minutes5mShort-term day trading288Intraday entries and exits
15 minutes15mDay trading96Intraday trend confirmation
1 hour1hIntraday / day trading24Standard day trading timeframe
4 hours4hSwing trading6Multi-day position management
1 day1DSwing / position trading1Daily trend analysis
1 week1WPosition / long-term~0.14 (1 per 7 days)Long-term trend context

Most day traders use the 15-minute or 1-hour timeframe. Higher timeframes reduce noise; lower timeframes increase trade frequency. Swing traders typically anchor decisions on the 4-hour or 1-day chart before drilling down to a lower timeframe for entry timing.

OHLCV Data Format: How APIs Deliver Market Data

When exchanges and data providers transmit OHLCV data, they return it as an array of records, each containing 6 fields: timestamp, open, high, low, close, and volume. The structure below is representative of what most REST API endpoints return for a single candle.

[
  {
    "timestamp": 1700000000000,
    "open": 65000.00,
    "high": 65800.00,
    "low": 64500.00,
    "close": 65600.00,
    "volume": 1240.50
  }
]
FieldData TypeDescription
timestampInteger (Unix ms)Start of the candle period
openFloatFirst traded price in the period
highFloatHighest traded price in the period
lowFloatLowest traded price in the period
closeFloatLast traded price in the period
volumeFloatTotal base asset units traded

The CCXT library provides a standardized OHLCV interface across 100+ exchanges, making it the most common starting point for developers building cross-exchange data pipelines.

To calculate unrealized PNL programmatically, extract the close field from the OHLCV record and substitute it for the current price in the formula: PNL = (close - entry_price) x quantity. For futures, query the mark price endpoint instead of using the OHLCV close field directly.

OHLCV aggregates all trades within a period into 6 fields, making it efficient for analysis and storage. Tick data records every individual trade with full precision but is orders of magnitude larger; it suits high-frequency applications where individual execution data matters. Backtesting, which means testing a trading strategy against historical OHLCV data before risking real capital, is one of the primary use cases for OHLCV API data.

Frequently Asked Questions About OHLCV and PNL

What does OHLCV stand for in trading?

OHLCV stands for Open, High, Low, Close, and Volume. These are the 5 data points recorded for every price candle in financial markets. Open is the first traded price, High is the highest, Low is the lowest, Close is the final price, and Volume is the total units traded during that period.

Why is volume included in OHLCV?

Volume is included because price alone does not confirm whether a move has genuine market support. A price increase on high volume means many participants traded at that level, validating the direction. The same increase on low volume may reverse quickly. Volume gives the other four OHLCV components their context.

What is the difference between realized and unrealized PNL?

Unrealized PNL is the profit or loss on a position you still hold. It changes with every price tick and has not been credited to your account. Realized PNL is the final, locked-in result after you close the position. This amount transfers to your account balance immediately. Only realized PNL affects your actual funds.

How do you calculate PNL in trading?

PNL = (Exit Price - Entry Price) x Quantity. Suppose you buy 1 BTC at $60,000 and sell at $65,000. PNL = ($65,000 - $60,000) x 1 = +$5,000. For futures, multiply by your leverage factor: Futures PNL = (Exit Price - Entry Price) x Quantity x Leverage.

How is OHLCV data used in technical analysis?

Every technical indicator is calculated from OHLCV fields. Moving averages use Close prices. RSI and MACD derive from Close. ATR uses High, Low, and Close to measure volatility. VWAP and OBV use both Close and Volume. Technical analysis is the systematic analysis of OHLCV data applied to forecasting price movements.

What does negative PNL mean?

Negative PNL means your position is currently at a loss. For a long position, the current price is below your entry price. For a short position, the price has risen above your entry. Negative unrealized PNL can become positive if price moves in your favor before you close. Negative realized PNL is permanent.

How do you read an OHLCV chart?

Select your timeframe. Each candle body spans from Open to Close: a green body means Close is above Open (bullish); a red body means Close is below Open (bearish). The upper wick extends to the High; the lower wick extends to the Low. The volume bar below the chart shows trading activity for that period.

What is the close price in OHLCV?

The Close price is the last traded price before the candle period ends and a new one begins. It is the most important of the 5 OHLCV values because most technical indicators use it as their primary input, and exchanges use the current Close (or mark price on futures) to calculate your unrealized PNL.

Is PNL the same as profit?

PNL stands for Profit and Loss, so it covers both outcomes. Profit refers to positive PNL, where your exit price exceeds your entry price on a long position. Loss refers to negative PNL. The term PNL is broader and more precise for trading contexts because it explicitly acknowledges both directions.

What is OHLCV data used for in crypto?

OHLCV data powers every candlestick chart on every cryptocurrency exchange. It feeds technical indicators like moving averages, RSI, and MACD. Developers use it to build trading bots, backtesting engines, and portfolio trackers. Exchanges use the Close price from OHLCV records to calculate the PNL shown on your trading dashboard.



This content is for educational purposes only and does not constitute financial advice. All numerical examples are illustrative only and do not represent current market prices or investment recommendations. Trading cryptocurrencies, futures, and other financial instruments involves significant risk of loss. Consult a qualified financial advisor before making any trading decisions.