-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
106 lines (78 loc) · 4.21 KB
/
notes.txt
File metadata and controls
106 lines (78 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
hat TradingView error almost always means: you ended a line in the middle of an expression, and Pine doesn’t allow implicit “line continuation” the way Python/JS do.
In your snippet there are three separate problems:
Leading indentation
Pine is picky: if you indent a line without it being inside a block that expects indentation, you can get “end of line” weirdness. Your first line has a leading space.
Breaking a boolean expression across lines without wrapping
This is the big one. In Pine, if you want to split a long boolean across lines, you generally need to wrap the whole expression in parentheses (or keep it on one line).
A typo from copy/paste corruption
pivoerror$0tLowPrice is not a valid identifier. That alone will error (maybe not this specific message, but it’s definitely broken). It should presumably be pivotLowPrice.
Fix (keep it strict: one-line-per-expression, plain ASCII)
bool sufficientData = bar_index >= pivotLookbackInput * 2
bool bullishRegular = sufficientData and not na(pivotLowPrice) and not na(lastPivotLow) and pivotLowPrice > lastPivotLow and rsiPivotLow < lastRsiPivotLow
bool bearishRegular = sufficientData and not na(pivotHighPrice) and not na(lastPivotHigh)
That will eliminate the “end of line without line continuation” class of error immediately.
If you really want multi-line (safe version)
bool bullishRegular = (
sufficientData
and not na(pivotLowPrice)
and not na(lastPivotLow)
and pivotLowPrice > lastPivotLow
and rsiPivotLow < lastRsiPivotLow
)
===============================================================================
PINE SCRIPT VERSION POLICY - 2026-01-08
===============================================================================
CHANGE: Both Pine Script v5 and v6 are now fully accepted (no warnings for v5)
CODE REVIEW:
✅ v5: PASS (accepted)
✅ v6: PASS (accepted)
❌ Missing version: CRITICAL (must declare version)
QUICKFIX:
- No longer auto-upgrades v5 to v6
- If version missing, adds //@version=5
- Preserves existing v5 or v6 declarations
===============================================================================
CODE FIXING BUTTONS DISABLED - 2026-01-08
===============================================================================
USER REQUEST: "Disable all code fixing buttons - distracting from strategy analysis"
CHANGES:
- Quick Fix button: DISABLED (commented out in index.html line 147)
- Smart Fix (LLM) button: DISABLED (commented out in index.html line 150)
- Auto-Fix All button: DISABLED (commented out in index.html line 153)
STILL ENABLED:
✅ Code Review button (informational only, doesn't modify code)
✅ Edit button (manual editing)
✅ Copy Code button
✅ Export PDF button
TO RE-ENABLE:
Uncomment the button sections in web/index.html (lines 147-156)
===============================================================================
COPY REVIEW TO CLIPBOARD - 2026-01-08
===============================================================================
USER REQUEST: "Include a copy to clipboard of reported issues for LLM prompts"
ADDED FEATURE:
✅ "Copy Report" button added next to Export PDF
✅ Formats review as clean text report
✅ Perfect for pasting into LLM prompts for analysis
REPORT FORMAT:
- Script name and version
- Summary counts (Critical, High, Warnings, Passed)
- Detailed listing of all issues by severity
- Line numbers and code snippets
- Recommendations section
USE CASE:
Click "Copy Report" → Paste into ChatGPT/Claude → Get strategy analysis
Perfect for discussing code quality with LLMs without manual formatting!
===============================================================================
GRID SORT ORDER - 2026-01-08
===============================================================================
USER REQUEST: "Update grid sort order to date descending (most recent on top)"
CHANGES:
✅ Default sort changed to "Last Modified" (descending)
✅ Most recently modified scripts now appear at top of grid
✅ Sort dropdown pre-selected to "Last Modified"
✅ Sort order maintained after filtering/searching
TECHNICAL:
- index.html: Added "selected" attribute to dateModified option (line 58)
- app.js: Added sortScripts() call in loadScripts() (line 18)
- Sort function already existed with correct descending logic