{"schema": "pine-lint-rules/v1", "service": "pine-script-lint-v1", "count": 37, "rules": [{"code": "P001", "severity": "error", "title": "missing //@version annotation as the first statement"}, {"code": "P002", "severity": "warning", "title": "Pine version below 6 (v6 is current; v5 still supported)"}, {"code": "P003", "severity": "error", "title": "missing indicator()/strategy()/library() declaration"}, {"code": "P004", "severity": "error", "title": "unbalanced parentheses, brackets or braces"}, {"code": "P005", "severity": "error", "title": "unterminated string literal"}, {"code": "P006", "severity": "warning", "title": "':=' reassigns a name that was never declared with '=' or 'var'"}, {"code": "P007", "severity": "warning", "title": "request.security() without lookahead=barmerge.lookahead_off (repaint risk) or with lookahead_on"}, {"code": "P008", "severity": "error", "title": "plot-family calls exceed the 64 limit"}, {"code": "P009", "severity": "error", "title": "request.security() calls exceed the 40 limit"}, {"code": "P010", "severity": "warning", "title": "unknown namespace before '.' (possible typo)"}, {"code": "P011", "severity": "warning", "title": "mixed tab and space indentation"}, {"code": "P012", "severity": "info", "title": "alertcondition() with a literal condition"}, {"code": "P013", "severity": "info", "title": "ta.* length argument is an expression (must be simple int at compile time)"}, {"code": "P014", "severity": "info", "title": "division whose denominator is a bare identifier with no zero guard on the line"}, {"code": "P015", "severity": "info", "title": "declaration is missing overlay= (defaults to false)"}, {"code": "P020", "severity": "info", "title": "naming convention (opt-in): inputs cfg_*, raw data raw_*, features feat_*, signals sig_*, plots plot_*"}, {"code": "P201", "severity": "error", "title": "future data: request.security with lookahead_on and no historical offset on the expression"}, {"code": "P202", "severity": "warning", "title": "higher-timeframe value used unconfirmed (no [1] offset): realtime bar differs from history"}, {"code": "P203", "severity": "warning", "title": "plot-family call with a negative offset draws the signal on past bars"}, {"code": "P204", "severity": "info", "title": "drawing anchored to a past bar (bar_index - n)"}, {"code": "P205", "severity": "info", "title": "ta.pivothigh/pivotlow: confirmed only after rightbars, so signals appear late in history but not late on the pivot bar"}, {"code": "P206", "severity": "warning", "title": "barstate.isrealtime/islast/isnew in signal logic: history and realtime execute differently"}, {"code": "P207", "severity": "warning", "title": "timenow in script logic differs between historical and realtime bars"}, {"code": "P208", "severity": "info", "title": "varip keeps intrabar state that a backtest cannot reproduce"}, {"code": "P209", "severity": "warning", "title": "strategy(calc_on_every_tick=true): fills on intrabar ticks that history does not have"}, {"code": "P210", "severity": "info", "title": "strategy() without commission_value / slippage: cost-free backtest"}, {"code": "P211", "severity": "info", "title": "alert/alertcondition on an unconfirmed bar (no barstate.isconfirmed guard in file)"}, {"code": "P212", "severity": "warning", "title": "strategy(process_orders_on_close=true) or calc_on_order_fills=true: same-bar execution assumptions"}, {"code": "P101", "severity": "error", "title": "study() is v4; use indicator() in v5/v6"}, {"code": "P102", "severity": "error", "title": "bare security() is v4; use request.security()"}, {"code": "P103", "severity": "error", "title": "transp= was removed in v5; use color.new(color, transparency)"}, {"code": "P104", "severity": "error", "title": "bare TA function is v4; use ta.<name>()"}, {"code": "P105", "severity": "error", "title": "tostring() is v4; use str.tostring()"}, {"code": "P106", "severity": "error", "title": "input(type=...) is v4; use input.int/float/bool/string"}, {"code": "P107", "severity": "error", "title": "input.resolution is v4; use input.timeframe"}, {"code": "P108", "severity": "warning", "title": "iff() is deprecated; use the ternary operator"}, {"code": "P109", "severity": "error", "title": "tickerid is v4; use syminfo.tickerid"}]}