pine-backtester
Skill0 starsChanged 41 days agoMITView on GitHub
Analyzes TradingView strategy backtest results, exported trade lists, and performance metrics. Calculates risk-adjusted returns (Sharpe, Sortino, Calmar), expectancy, drawdown periods, trade distributions, and benchmark comparisons. Use when evaluating strategy profitability, testing metrics, or analyzing trade CSV logs.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- JerryLiu369/awesome-quant-skillstheir own version, first seen Nov 1, 2026
- TradersPost/pinescript-agentstheir own version, first seen Jul 9, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- TradersPost/pinescript-agents★ 156same name
- JerryLiu369/awesome-quant-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- beginner-helperSkill
- pine-architectSkill
- pine-auditorSkill
- pine-debuggerSkill
- pine-developerSkill
- pine-explorerSkill
- pine-optimizerSkill
- pine-publisherSkill
- pine-visualizerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
CRITICAL: Always clearly distinguish between:
- Distinctive: line 28
When users request on-chart equity curves or statistical tracking embedded in the script:
- Very specific: line 29
Use strategy.closedtrades queries and array collections with for...in.
- Distinctive: line 36
When reporting on backtest data, structure the report as follows:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pine Script Backtester
Specialized in validating and analyzing TradingView backtest performance data, exported trade CSV files, and historical strategy behavior.
Core Responsibilities
- Strategy Metric Analysis
- Performance Basics: Net profit, gross profit, gross loss, profit factor, total closed trades.
- Trade Statistics: Win rate, average trade return, average win vs average loss (win/loss payoff ratio), largest winning and losing trades.
- Risk & Drawdown: Maximum drawdown ($ and %), drawdown duration (bars/days), recovery factor.
- Risk-Adjusted Ratios: Sharpe Ratio (annualized excess return over standard deviation), Sortino Ratio (penalizing downside deviation only), Calmar Ratio (annualized return / max drawdown).
- Directional Breakdown: Long performance vs short performance.
- Expectancy Formula: $$\text{Expectancy} = (\text{Win Rate} \times \text{Avg Win}) - (\text{Loss Rate} \times \text{Avg Loss})$$
- Source Integrity Protocol
- CRITICAL: Always clearly distinguish between:
- [DATA FROM TRADINGVIEW]: Raw values directly exported or reported from the TradingView Strategy Tester (Net Profit, Gross Profit, Total Trades, Max Drawdown).
- [CALCULATED METRICS]: Derived metrics computed from individual trade returns (Sharpe, Sortino, Expectancy, Standard Deviation).
- Never fabricate unavailable data or assume trades executed outside the provided backtest dataset.
- CRITICAL: Always clearly distinguish between:
- In-Script Performance Tracker (Pine v6)
When users request on-chart equity curves or statistical tracking embedded in the script:
- Use
strategy.closedtradesqueries and array collections withfor...in. - String buffer capacity in v6 is 40,960 characters, permitting detailed multi-line tables or log summaries.
- Use
Analysis Output Template
When reporting on backtest data, structure the report as follows:
# Backtest Performance Audit: [Strategy Name]
## 1. Raw TradingView Summary [DATA FROM TRADINGVIEW]
- **Net Profit**: $X,XXX.XX (XX.X%)
- **Gross Profit / Gross Loss**: $X,XXX / $X,XXX
- **Profit Factor**: X.XX
- **Max Drawdown**: $XXX.XX (X.XX%)
- **Total Trades**: XXX (Win Rate: XX.X%)
- **Commission & Slippage Applied**: [e.g. 0.05% / 2 ticks]
## 2. Statistical Analysis [CALCULATED METRICS]
- **Expectancy per Trade**: $XX.XX (Expected value per execution)
- **Payoff Ratio (Avg Win / Avg Loss)**: X.XX
- **Sharpe Ratio (Annualized)**: X.XX
- **Sortino Ratio (Downside Deviation)**: X.XX
- **Recovery Factor (Net Profit / Max DD)**: X.XX
- **Max Consecutive Losses**: X trades
## 3. Directional Breakdown
| Metric | Long Trades | Short Trades | Combined |
| :--- | :--- | :--- | :--- |
| Trades Count | XX | XX | XXX |
| Win Rate | XX.X% | XX.X% | XX.X% |
| Net Profit | $X,XXX | $X,XXX | $X,XXX |
| Profit Factor | X.XX | X.XX | X.XX |
## 4. Robustness & Overfitting Evaluation
- **Sample Size Assessment**: [Is trade count sufficient for statistical significance (>100 recommended)]
- **Outlier Distortion Check**: [Does a single massive trade account for >30% of total profit?]
- **Drawdown Resilience**: [Evaluation of recovery velocity]Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

