---
title: "#backtesting articles | Hashnode"
description: "Explore 89 articles tagged #backtesting on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/backtesting"
---

Tag

# #backtesting

89 posts · 3 followers

[Lei Chen](https://hashnode.com/@leichenbuilds) · [1d ago](https://hashnode.com/posts/it-drew-238-lines-and-the-csv-is-empty-what-366-drawing-only-pine-scripts-taught-me/6af6f43fe3f6d18f5694752a)

### [It Drew 238 Lines and the CSV Is Empty: What 366 Drawing-Only Pine Scripts Taught Me](https://leichenbuilds.hashnode.dev/it-drew-238-lines-and-the-csv-is-empty-what-366-drawing-only-pine-scripts-taught-me?utm_source=hashnode&utm_medium=feed)

It Drew 238 Lines and the CSV Is Empty: What 366 Drawing-Only Pine Scripts Taught Me Your Pine script draws 238 lines, 486 labels, 360 boxes. The Python port runs without errors. The output file is 0

12 min read · [leichenbuilds.hashnode.dev](https://leichenbuilds.hashnode.dev/it-drew-238-lines-and-the-csv-is-empty-what-366-drawing-only-pine-scripts-taught-me?utm_source=hashnode&utm_medium=feed)

[Lei Chen](https://hashnode.com/@leichenbuilds) · [2d ago](https://hashnode.com/posts/it-ran-fine-it-produced-nothing-what-196-silent-pine-scripts-taught-me/6af5a09e1aa18b883857a4b8)

### [It Ran Fine. It Produced Nothing: What 196 Silent Pine Scripts Taught Me](https://leichenbuilds.hashnode.dev/it-ran-fine-it-produced-nothing-what-196-silent-pine-scripts-taught-me?utm_source=hashnode&utm_medium=feed)

It Ran Fine. It Produced Nothing: What 196 Silent Pine Scripts Taught Me Your Pine script compiles. Your Python port runs without errors. The output file is empty. "It ran" and "it works" are differe

10 min read · [leichenbuilds.hashnode.dev](https://leichenbuilds.hashnode.dev/it-ran-fine-it-produced-nothing-what-196-silent-pine-scripts-taught-me?utm_source=hashnode&utm_medium=feed)

[Lei Chen](https://hashnode.com/@leichenbuilds) · [3d ago](https://hashnode.com/posts/i-fixed-the-exit-bracket-my-last-post-got-wrong-the-strategy-got-worse/6af44f41c8b16fcb4349bdec)

### [I Fixed the Exit Bracket My Last Post Got Wrong. The Strategy Got Worse.](https://leichenbuilds.hashnode.dev/i-fixed-the-exit-bracket-my-last-post-got-wrong-the-strategy-got-worse?utm_source=hashnode&utm_medium=feed)

In my last post I proved my own post #2 was wrong: the "ATR bracket" in that RSI strategy was never an ATR bracket. strategy.exit's profit and loss are distances in ticks, not price points, so on the

9 min read · [leichenbuilds.hashnode.dev](https://leichenbuilds.hashnode.dev/i-fixed-the-exit-bracket-my-last-post-got-wrong-the-strategy-got-worse?utm_source=hashnode&utm_medium=feed)

[Lei Chen](https://hashnode.com/@leichenbuilds) · [4d ago](https://hashnode.com/posts/same-pine-script-two-backtests-opposite-results-here-s-the-exact-bar-where-they-diverge/6af2ffbde232b972b4263f15)

### [Same Pine Script, Two Backtests, Opposite Results — Here's the Exact Bar Where They Diverge](https://leichenbuilds.hashnode.dev/same-pine-script-two-backtests-opposite-results-here-s-the-exact-bar-where-they-diverge?utm_source=hashnode&utm_medium=feed)

One script. One dataset. Two backtests. One says the strategy loses 13.5%. The other says it makes money. Neither backtest is lying — they disagree about three things the script never says out loud: w

9 min read · [leichenbuilds.hashnode.dev](https://leichenbuilds.hashnode.dev/same-pine-script-two-backtests-opposite-results-here-s-the-exact-bar-where-they-diverge?utm_source=hashnode&utm_medium=feed)

[Lei Chen](https://hashnode.com/@leichenbuilds) · [6d ago](https://hashnode.com/posts/i-ran-1-909-real-pine-scripts-through-a-translator-here-s-what-actually-breaks/6af05a64079da3eb380e852b)

### [I Ran 1,909 Real Pine Scripts Through a Translator. Here's What Actually Breaks](https://leichenbuilds.hashnode.dev/i-ran-1-909-real-pine-scripts-through-a-translator-here-s-what-actually-breaks?utm_source=hashnode&utm_medium=feed)

Your Pine script compiles. Your Python port runs. And the backtest still disagrees with TradingView. I spent the last few months finding out exactly where that gap lives — not by arguing about it, but

10 min read · [leichenbuilds.hashnode.dev](https://leichenbuilds.hashnode.dev/i-ran-1-909-real-pine-scripts-through-a-translator-here-s-what-actually-breaks?utm_source=hashnode&utm_medium=feed)

[Lei Chen](https://hashnode.com/@leichenbuilds) · [Nov 7](https://hashnode.com/posts/i-converted-an-rsi-mean-reversion-strategy-from-pine-script-to-python-and-the-exit-bracket-is-where-it-gets-tricky/6aef13370bb9b9ee8a4b2f7d)

### [I Converted an RSI Mean-Reversion Strategy from Pine Script to Python — and the Exit Bracket Is Where It Gets Tricky](https://leichenbuilds.hashnode.dev/i-converted-an-rsi-mean-reversion-strategy-from-pine-script-to-python-and-the-exit-bracket-is-where-it-gets-tricky?utm_source=hashnode&utm_medium=feed)

Every Pine Script developer hits the same wall eventually. Your strategy works on TradingView, but you want more: a ten-year backtest on your own data, a parameter sweep over 200 symbols, or a walk-fo

7 min read · [leichenbuilds.hashnode.dev](https://leichenbuilds.hashnode.dev/i-converted-an-rsi-mean-reversion-strategy-from-pine-script-to-python-and-the-exit-bracket-is-where-it-gets-tricky?utm_source=hashnode&utm_medium=feed)

[Lei Chen](https://hashnode.com/@leichenbuilds) · [Nov 7](https://hashnode.com/posts/i-converted-a-classic-ema-crossover-strategy-from-pine-script-to-python-line-by-line/6aeef184852290ead6228e53)

### [I Converted a Classic EMA Crossover Strategy from Pine Script to Python — Line by Line](https://leichenbuilds.hashnode.dev/i-converted-a-classic-ema-crossover-strategy-from-pine-script-to-python-line-by-line?utm_source=hashnode&utm_medium=feed)

Every Pine Script developer hits the same wall eventually. Your strategy works on TradingView, but you want more: a ten-year backtest on your own data, a parameter sweep over 200 symbols, or a walk-fo

6 min read · [leichenbuilds.hashnode.dev](https://leichenbuilds.hashnode.dev/i-converted-a-classic-ema-crossover-strategy-from-pine-script-to-python-line-by-line?utm_source=hashnode&utm_medium=feed)

[2](https://hashnode.com/posts/i-converted-a-classic-ema-crossover-strategy-from-pine-script-to-python-line-by-line/6aeef184852290ead6228e53)

[Arnold Holm](https://hashnode.com/@stratcorealpha) · [Oct 30](https://hashnode.com/posts/can-a-clean-backtest-still-leave-you-with-no-trading-edge/6ae495286f3679e53eb13566)

### [Can a clean backtest still leave you with no trading edge?](https://stratcorealpha.hashnode.dev/can-a-clean-backtest-still-leave-you-with-no-trading-edge?utm_source=hashnode&utm_medium=feed)

Can a clean backtest still leave you with no trading edge? If you check a report before you trust it, start with one ratio. Recorded profits divided by recorded losses tells you if gains kept more tha

4 min read · [stratcorealpha.hashnode.dev](https://stratcorealpha.hashnode.dev/can-a-clean-backtest-still-leave-you-with-no-trading-edge?utm_source=hashnode&utm_medium=feed)

[Arnold Holm](https://hashnode.com/@stratcorealpha) · [Oct 29](https://hashnode.com/posts/a-weekly-strategy-still-has-a-worst-day-9/6ae30a1880d8d5573074ff25)

### [A weekly strategy still has a worst day: -9%](https://stratcorealpha.hashnode.dev/a-weekly-strategy-still-has-a-worst-day-9?utm_source=hashnode&utm_medium=feed)

Does a weekly basket rebuild keep you safe against a daily loss rule? If you run a challenge basket, that question matters more than the weekly plan. An illustrative $50,000 basket losing 9% ends at $

4 min read · [stratcorealpha.hashnode.dev](https://stratcorealpha.hashnode.dev/a-weekly-strategy-still-has-a-worst-day-9?utm_source=hashnode&utm_medium=feed)

[Sergei B](https://hashnode.com/@pelagiquant) · [Oct 27](https://hashnode.com/posts/the-backtest-used-a-0-06-fee-what-was-my-account-actually-paying/6ae044e80130645d01b33b13)

### [The backtest used a 0.06% fee. What was my account actually paying?](https://sergeialgo.hashnode.dev/the-backtest-used-a-0-06-fee-what-was-my-account-actually-paying?utm_source=hashnode&utm_medium=feed)

I develop trading bots. Our historical tests used a fee of 0.06% per side. When I checked the executions from one of my live accounts, though, the volume-weighted fee rate actually paid was about 0.08

6 min read · [sergeialgo.hashnode.dev](https://sergeialgo.hashnode.dev/the-backtest-used-a-0-06-fee-what-was-my-account-actually-paying?utm_source=hashnode&utm_medium=feed)

[2](https://hashnode.com/posts/the-backtest-used-a-0-06-fee-what-was-my-account-actually-paying/6ae044e80130645d01b33b13)
