Displaying Backtest Performance Statistics on Trading Charts
Summary
This document describes a Pine Script display panel intended to show strategy backtest statistics directly on a chart. It is designed as a reusable addition to other strategies, including for viewing results on devices without a native backtest interface. The panel uses a table to report items such as closed trades and win rate, and the author says it also adds maximum run-up and average win and loss per trade. A simple moving-average-based mean-reversion example supplies the strategy being measured, with a profit target and a time-based exit.
The document provides implementation code but no reported backtest results or evidence that the example is profitable. Its purpose is reporting convenience, not a trading method. The displayed metrics inherit the assumptions and limitations of the underlying strategy and backtest, and the visible excerpt does not establish how every metric is calculated or validated. Users should therefore treat the panel as a presentation aid and assess the strategy, costs, and metric definitions separately.
Key ideas
- A chart table can make selected backtest statistics visible alongside a strategy.
- The panel is presented as reusable code that can be added to other scripts.
- Reported measures include trade count, win rate, maximum run-up, and average winning and losing trades.
- A simple moving-average example demonstrates the display but does not establish strategy performance.
- Backtest metrics depend on the tested strategy and its modeling assumptions.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.