Skip to content
All library documents

Building a Monthly Performance Table for TradingView Strategies

Article Strategy library · Author: ChaoZhang

Summary

This document presents a reusable TradingView script framework for displaying monthly strategy performance, with an example long-only pullback strategy. In the example, a long entry requires price to be above a long-term moving average but below a short-term average. The position exits when price rises above the shorter average, optionally with a lower-close condition, or when a percentage-based loss threshold is exceeded. Date filters, moving-average lengths, and the stop parameter are configurable.

The supplied excerpt ends as the monthly table section begins, so it does not show the table’s calculations, layout, or handling of returns. It provides no strategy performance results. The example is explicitly replaceable demonstration logic, not evidence that the sample strategy is profitable. Users would need to inspect the omitted table code and verify how it treats closed trades, partial periods, costs, and reporting conventions before relying on its monthly figures.

Key ideas

  • The script is intended to add a monthly performance table to a TradingView strategy.
  • Its example enters long when price is between a long-term and short-term moving average.
  • Exits use a short-term average condition and a percentage loss threshold.
  • Date filters and strategy parameters can be adjusted by the user.
  • The excerpt omits the table implementation and provides no performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.