PineScript Reference¶
This section covers the PineScript v6 indicators in the RQF-ML system.
Current Indicators¶
| Indicator | Version | Status | File |
|---|---|---|---|
| STRAT_02: RQF | v12.0 | Active | strategies/pine_v6/STRAT_02.pine |
| STRAT_01: Session | v9.1 | Paused | strategies/pine_v6/STRAT_01.pine |
| STRAT_03: Advanced | v1.0 | Development | strategies/pine_v6/STRAT_03.pine |
Documentation¶
-
STRAT_02 Reference
Complete reference for the RQF Range System
-
Non-Repaint Compliance
Critical patterns for reliable signals
-
Alert Webhooks
JSON format for automation
-
Pattern Library
Reusable code snippets
Quick Reference¶
Standard Declaration¶
//@version=6
indicator("STRAT_XX: Name", "Short", overlay=true,
max_lines_count=500, max_labels_count=500, max_boxes_count=500)
Input Groups¶
grp_core = "Core Settings"
grp_display = "Display"
grp_colors = "Colors"
grp_alerts = "Trade Alerts (Webhook)"
Non-Repaint Pattern¶
// ALWAYS check barstate.isconfirmed for signals
if barstate.isconfirmed and myCondition
// Signal logic here
// NEVER use lookahead
htfData = request.security(sym, tf, close, lookahead=barmerge.lookahead_off)
Alert Format¶
{
"event": "LONG_ENTRY",
"strategy": "STRAT_02",
"symbol": "{{ticker}}",
"timeframe": "{{interval}}",
"price": {{close}},
"time": "{{time}}"
}
Development Workflow¶
graph LR
A[Spec] --> B[Generate]
B --> C[Analyze]
C --> D[Debug]
D --> E[Test]
E --> F[Deploy]
B -.-> G[/pine-generate]
C -.-> H[/pine-analyze]
D -.-> I[/pine-debug] - Spec: Define requirements in a spec file
- Generate: Use
/pine-generateto create initial code - Analyze: Use
/pine-analyzeto check quality - Debug: Use
/pine-debugto fix errors - Test: Run on TradingView with bar replay
- Deploy: Add to chart for live trading
Skills for PineScript¶
| Skill | Purpose |
|---|---|
/pine-generate | Create indicator from spec |
/pine-analyze | Quality and compliance check |
/pine-debug | Fix errors |
/pine-patterns | Get code snippets |
/pine-learn | Interactive learning |
/pine-to-python | Convert for backtesting |