Skip to main content

PnL Calendar & Chart

The PnL Calendar & Chart feature in XeroLite provides a visual representation of your realized profit and loss (PnL) over the last 30 days, organized by alert name (strategy). This tool helps you track daily trading performance and analyze accumulated PnL trends.

Overview

The PnL Calendar & Chart feature includes:

  • 30-Day Realized PNL Calendar: Visual calendar showing daily realized PnL
  • Accumulated PNL Chart: Interactive chart showing cumulative PnL over time
  • Strategy Filtering: Filter PnL data by alert name/strategy
  • Color-Coded Visualization: Easy-to-read profit/loss indicators

Accessing PnL Calendar & Chart

The PnL Calendar is located in the left sidebar of the XeroLite interface:

  1. Log in to XeroLite
  2. Look at the left sidebar (if collapsed, click to expand)
  3. Find the PnL Calendar section below the Broker Health indicator
  4. The calendar will display automatically when an alert name is selected

Understanding the PnL Calendar

Calendar View

The calendar displays a 30-day rolling view of your realized PnL:

  • Week Layout: Organized by weeks (Monday through Sunday)
  • Daily PnL Values: Each day shows the realized PnL for that specific day
  • Color Coding:
    • Green shades: Profit days (darker green = higher profit)
    • Red/Orange shades: Loss days (darker red = larger loss)
    • Gray: No trading activity or zero PnL

Calendar Controls

  1. Strategy Selector: Dropdown to select an alert name/strategy

    • Select a specific strategy to view its PnL
    • Select "--" to clear the selection
  2. Refresh Button (🔄): Manually refresh PnL data

    • Click to update the calendar with the latest data
    • Button shows a spinning icon while loading
  3. Chart Button: Opens the detailed PnL chart in a modal

    • Click "Chart" to view the accumulated PnL chart
    • Displays interactive chart with moving averages

Viewing the Accumulated PnL Chart

Opening the Chart

  1. Select an alert name from the strategy selector
  2. Click the "Chart" button in the calendar header
  3. A modal window will open showing the detailed chart

Chart Features

The accumulated PnL chart displays:

  • Accumulated PnL Line: Blue line showing cumulative realized PnL over 30 days
  • Daily PnL Bars: Histogram bars showing daily realized PnL (green for profit, red for loss)
  • Moving Averages:
    • 7-Day Moving Average (MA7) - Orange line
    • 14-Day Moving Average (MA14) - Green line
  • Interactive Tooltips: Hover over data points to see:
    • Date
    • Accumulated PnL value
    • Daily PnL change

Chart Interactions

  • Zoom: Scroll to zoom in/out
  • Pan: Click and drag to navigate through the chart
  • Tooltip: Hover over any point to see detailed values
  • Time Scale: X-axis shows dates with month and day labels

How PnL is Calculated

Realized PnL

Realized PnL is calculated based on completed trades (filled orders) for each alert name:

  • Daily Realized PnL: Sum of all realized profits/losses from filled orders on that day
  • Accumulated PnL: Running total of daily realized PnL over the 30-day period

Alert Name Grouping

All orders with the same alert name (name field in alert requests) are grouped together:

  • Orders from the same strategy share the same PnL calculation
  • This allows you to track performance by trading strategy
  • Different alert names have separate PnL tracking

Important Notes

  • Only Realized PnL: The calendar shows only realized PnL (from filled orders), not unrealized PnL
  • 30-Day Window: Only the last 30 days of data are displayed
  • Time Zone: PnL is calculated based on your system's time zone
  • Data Source: PnL is calculated from transaction data in the Transactions tab

Using the PnL Calendar

Step-by-Step Usage

  1. Select a Strategy:

    • Click the strategy selector dropdown
    • Choose an alert name from the list
    • The calendar will automatically update
  2. View Daily Performance:

    • Review the calendar to see daily PnL values
    • Identify profitable and loss days
    • Look for patterns in trading performance
  3. Open the Chart:

    • Click the "Chart" button
    • Review the accumulated PnL trend
    • Analyze moving averages for trend direction
  4. Refresh Data:

    • Click the refresh button (🔄) to update with latest data
    • Useful after placing new orders or when checking for updates

Best Practices

  • Regular Monitoring: Check the PnL calendar regularly to track strategy performance
  • Strategy Comparison: Switch between different alert names to compare strategies
  • Trend Analysis: Use the chart to identify long-term trends and patterns
  • Performance Review: Review weekly/monthly patterns to optimize trading strategies

Troubleshooting

No Data Displayed

Problem: Calendar shows no data or all gray days

Solutions:

  • Ensure you have selected an alert name from the dropdown
  • Verify that you have filled orders for the selected alert name
  • Check that orders were placed within the last 30 days
  • Click the refresh button to reload data

Chart Not Loading

Problem: Chart modal opens but shows no data

Solutions:

  • Ensure an alert name is selected before opening the chart
  • Check your internet connection
  • Try refreshing the page and selecting the strategy again
  • Verify that you have transaction data for the selected strategy

Incorrect PnL Values

Problem: PnL values don't match expected amounts

Solutions:

  • Verify that all orders for the alert name are properly filled
  • Check the Transactions tab to confirm order execution
  • Ensure alert names are consistent across related orders
  • Review transaction details for any discrepancies

Summary

The PnL Calendar & Chart feature provides powerful insights into your trading performance:

  • ✅ Visual 30-day calendar of daily realized PnL
  • ✅ Interactive accumulated PnL chart with moving averages
  • ✅ Strategy-based filtering by alert name
  • ✅ Color-coded visualization for quick performance assessment
  • ✅ Real-time data refresh capability

Use this tool to track performance, identify trends, and optimize your trading strategies.