Pine Script Pitfalls That Waste Sessions
Posted: Sat Sep 05, 2026 1:31 pm
### Pitfalls that have wasted *my* sessions (and others')
1. **Repainting** — future leaks via non-confirmed bar logic; magical right edge → be suspicious.
2. **`calc_on_every_tick` surprises** — differs from bar-close alerts. Confuses people for days.
3. **Timezone sloppiness** — `time` vs exchange TZ; your OR is wrong by an hour and you call it a strategy problem. Done that. Felt bright.
4. **`request.security` lookahead** — classic foot-gun.
5. **Strategy tester fills** without commission/slippage — fantasy curves.
6. **Too many plots** — HUD lag on a thin laptop at the open.
7. **Alert JSON drift** — you changed fields, Python still expects `schema_v1`.
8. **`strategy.netprofit` as truth** for live stocks with different routing.
### Hygiene habits I tick
### Rule
If a Pine script pays you only when you stare at it, it is a dashboard. Label it that way and sleep better. Dashboards are fine. Lying about them is not.
Which Pine foot-gun has cost you the most hours?
Do you develop bar-close first, then carefully enable tick logic — or the other way around?
Anyone keep a changelog in the script header religiously?
Replay checks on 3 dates — part of your release ritual?
1. **Repainting** — future leaks via non-confirmed bar logic; magical right edge → be suspicious.
2. **`calc_on_every_tick` surprises** — differs from bar-close alerts. Confuses people for days.
3. **Timezone sloppiness** — `time` vs exchange TZ; your OR is wrong by an hour and you call it a strategy problem. Done that. Felt bright.
4. **`request.security` lookahead** — classic foot-gun.
5. **Strategy tester fills** without commission/slippage — fantasy curves.
6. **Too many plots** — HUD lag on a thin laptop at the open.
7. **Alert JSON drift** — you changed fields, Python still expects `schema_v1`.
8. **`strategy.netprofit` as truth** for live stocks with different routing.
### Hygiene habits I tick
Code: Select all
[ ] Version comment at top
[ ] Inputs documented
[ ] Alert schema versioned
[ ] Bar magnifier / replay check on 3 dates
[ ] Compare bar-close vs tick assumptions explicitly
If a Pine script pays you only when you stare at it, it is a dashboard. Label it that way and sleep better. Dashboards are fine. Lying about them is not.
Which Pine foot-gun has cost you the most hours?
Do you develop bar-close first, then carefully enable tick logic — or the other way around?
Anyone keep a changelog in the script header religiously?
Replay checks on 3 dates — part of your release ritual?