# Trading Journal

### Overview

The Trading Journal is an automated, comprehensive logging and analytics tool that syncs trades in real time from all connected broker accounts. Every trade is automatically categorized by its execution source (manual, automation, or copy trading) and enriched with deep analytics. By eliminating the need for manual data entry, the journal allows traders to focus entirely on reviewing performance, managing setups, and leveraging AI-powered insights to improve their strategies.

### Overview Tab

The Overview Tab serves as the central command center for your trading performance, providing a high-level summary of your metrics and equity curve.

#### KPI Cards

The dashboard features six primary Key Performance Indicator (KPI) cards:

| Card              | Description                                                                                               |
| ----------------- | --------------------------------------------------------------------------------------------------------- |
| **Total Trades**  | Displays the total trade count alongside a 7-day frequency sparkline.                                     |
| **Win Rate**      | Shows the winning percentage with a circular progress indicator and a raw win/loss count.                 |
| **Profit Factor** | Calculates gross profit divided by gross loss, visualized with a gauge (breakeven is 1.0).                |
| **Total P\&L**    | The sum of all profits and losses, featuring a 14-day equity sparkline.                                   |
| **Avg Win/Loss**  | The difference between the average winning trade and the average losing trade, displayed via a split bar. |
| **Long vs Short** | A breakdown of P\&L split by trade direction.                                                             |

Additionally, users can expand the view to see secondary metrics including Net P\&L, Expectancy, Day Win %, Largest Win, Largest Loss, Avg Hold Time, Max Drawdown, Max Consecutive Wins, Max Consecutive Losses, and Commissions.

#### Lune Score

The Lune Score provides a visual representation of your overall trading health using a triangular radar chart scored from 0 to 100 across three axes:

* **Win Rate Score:** Based on the actual win rate percentage.
* **Profit Factor Score:** Calculated as Profit Factor multiplied by 50 (capped at 100).
* **Risk/Reward Score:** Calculated as Average Win divided by Average Loss multiplied by 50 (capped at 100).
* **Overall Score:** The average of all three axes, categorized into Excellent (80+), Strong (70+), Average (50+), Below Avg (30+), and Needs Work (<30).

#### Visualizations

* **Charts:** Includes an Equity Curve (cumulative P\&L over time), a Daily P\&L green/red bar chart, and a Win/Loss Streak Timeline showing the last 120 trades.
* **Calendar View:** A monthly calendar with color-coded daily performance (green for a winning day, red for a losing day, and a blue dot indicating an existing journal entry). Clicking any day opens the Daily Journal Modal.
* **Breakdowns:** Tabbed data groupings by Symbol, Long vs Short, Day of Week, and Hour of Day.
* **Trades Table:** A chronological list of trades displaying Date, Account, Symbol, Side, Quantity, Entry, Exit, P\&L, and assigned Tags.

### Trade Detail Modal

Clicking on any specific trade opens the Trade Detail Modal, which is divided into three sections:

1. **Summary:** Displays core trade details (Symbol, Side, Quantity, P\&L) and attached screenshots (up to 5 per trade).
2. **Journal:** Allows users to assign a 1-5 star rating, write detailed notes (up to 10,000 characters), assign comma-separated tags, and upload image files.
3. **Analysis:** Enables users to link the trade to a specific Playbook Setup, toggle whether the trading plan was followed, log initial risk and Reward Ratio (R:R), and select driving emotions or execution mistakes from a predefined list.

### Daily Journal Modal

Accessible via the Calendar View, the Daily Journal Modal helps traders log their routine and mindset for a specific session. It includes:

* **Text Sections:** Dedicated rich text areas for a Pre-Trade Plan, Daily Reflection, and Lessons Learned (up to 50,000 characters each).
* **Metrics:** A selectable Daily Grade (A, B, C, D, F) and Mood tracking.
* **Checklist:** Interactive checkboxes imported from your Playbooks to ensure pre-trade routines are followed.

### Playbook Tab

The Playbook allows users to create and manage specific trading setups and strategies. Each playbook acts as a template that can be linked to individual trades for performance tracking.

Playbook Fields:

* **Title & Color:** A required name and a preset color for visual identification.
* **Description:** A detailed explanation of the strategy.
* **Symbols & Timeframes:** The specific assets and chart timeframes the setup applies to.
* **Rules & Checklist:** Clearly defined Entry, Exit, and Management rules, alongside a Pre-Trade Checklist.

Each playbook card automatically calculates and displays the linked trade statistics, including total trades, win/loss ratio, P\&L, and win rate. Users can maintain up to 50 playbooks per account.

### Reports Tab

The Reports Tab offers deep analytical breakdowns of your trading data across five distinct categories:

* **Time Analysis:** A 24x7 heatmap highlighting the best hours and days ranked by P\&L or Win Rate.
* **Duration:** Groups trades by hold time brackets (e.g., <1min, 1-5min, 4h+) to identify the most profitable time horizons.
* **P\&L Distribution:** A histogram showing the distribution of trade P\&L with mean and median lines.
* **Setups:** Compares the performance of your custom Playbook setups against each other.
* **Behavior:** Analyzes the financial impact of logged emotions, common mistakes, and plan compliance.

### AI Insights

The AI Insights feature utilizes client-side analysis to generate actionable feedback based on your trade annotations and data (requires a minimum of 5 logged trades).

* **Categorized Insights:** Automatically identifies Strengths (high win rates, best setups), Weaknesses (losing patterns, costly mistakes), Patterns (revenge trading, directional bias), and Tips (optimal trading hours, emotional state optimization).
* **Journal Chat:** An integrated AI analyst that users can converse with directly regarding their trading data, supporting streaming responses and markdown formatting.

### Data Management & Filtering

* **Manage Data:** Users can fetch historical trades directly from their broker using the "Backfill Trades" feature (spanning 1 to 365+ days) or use "Recalculate Trades" to update P\&L using the latest contract specifications.
* **Filters:** All journal data can be filtered by Period (Today, This Week, This Month, This Year, All Time) and by specific connected Accounts.

#### System Limits

To ensure optimal performance, the Trading Journal enforces the following limits:

* Maximum 50 playbooks per user.
* Maximum 50 tags per trade.
* Maximum 100 rules per playbook.
* Maximum 5 screenshots per trade (5MB each).
* Maximum 1GB total image storage per user.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lunefi.com/lune-platform/trading-journal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
