Trading Indicators Plugin for Claude Code
A Claude Code plugin for AI-powered trading indicator development across TradingView (Pine Script), NinjaTrader (NinjaScript), and Tradovate (JavaScript).
Version: 1.0.0 | Author: Luther Barnum
Overview
This plugin provides 33 specialized commands, 10 AI agents, and 3 pattern libraries for developing trading indicators across three major platforms:
| Platform | Language | Commands |
|---|
| TradingView | Pine Script v5/v6 | 11 |
| NinjaTrader 8 | NinjaScript (C#) | 11 |
| Tradovate | JavaScript | 11 |
Key Features
- Create new indicators with proper structure and conventions
- Convert indicators between platforms automatically
- Validate syntax against official documentation
- Debug runtime errors with platform-specific guidance
- Refactor code for better organization and performance
- Document indicators with auto-generated README files
Installation
Option 1: Clone and Install
# Clone the repository
git clone https://github.com/lgbarn/trading-indicator-plugins.git
# Add to Claude Code plugins
claude plugins add ./trading-indicator-plugins
Option 2: Direct Install from GitHub
claude plugins add github:lgbarn/trading-indicator-plugins
Verify Installation
claude plugins list
You should see trading-indicators in the list.
Quick Start
Create a New Pine Script Indicator
/trading-indicators:pine:new-indicator MyVWAP --v6
Convert Pine Script to NinjaScript
/trading-indicators:pine:convert LB_MyVWAP.pine --to ninja
Add Features to an Existing Indicator
/trading-indicators:ninja:add-feature MyVWAPLB.cs "VWAP bands with 2SD"
Validate Indicator Syntax
/trading-indicators:tradovate:validate MyIndicatorLB.js
Commands Reference
All three platforms share the same 11 commands. Invoke them using:
/trading-indicators:<platform>:<command> [arguments]
Where <platform> is pine, ninja, or tradovate.
Command Summary
| Command | Arguments | Description |
|---|
new-indicator | <name> [--v5|--v6] | Create a new indicator from scratch |
add-feature | <file> <feature> | Add functionality to existing indicator |
validate | <file> | Check syntax against official docs |
test | <file> [--validate|--logic] | Validate structure and calculation logic |
debug | <file> [--error <msg>] | Troubleshoot runtime errors |
explain | <file> | Analyze and explain what indicator does |
convert | <file> --to <platform> | Translate to another platform |
compare | <file1> <file2> | Compare indicators or versions |
refactor | <file> [--organize|--optimize] | Improve code organization |
cleanup | <file> | Remove unused code, fix formatting |
document | <file> [--format md|inline] | Generate documentation |
Detailed Command Reference
new-indicator - Create New Indicator
Creates a new indicator with proper file structure, headers, and organization.
Pine Script:
/trading-indicators:pine:new-indicator SessionVWAP --v6
Creates LB_SessionVWAP.pine with Pine Script v6 structure.
NinjaScript:
/trading-indicators:ninja:new-indicator SessionVWAP
Creates SessionVWAPLB.cs with proper C# namespace and lifecycle methods.
Tradovate:
/trading-indicators:tradovate:new-indicator SessionVWAP
Creates SessionVWAPLB.js with proper exports and class structure.
add-feature - Enhance Existing Indicator
Adds new functionality to an existing indicator file.
Supported Features:
- Price levels: VWAP bands, Initial Balance extensions, Pivot Points
- Visual elements: Labels, background shading, candle coloring
- Calculations: TWAP, standard deviation bands, session detection
- Interactivity: Alert conditions, feature toggles, theme switching
Example:
/trading-indicators:pine:add-feature LB_MyVWAP.pine "2SD and 3SD bands"
convert - Cross-Platform Translation
Converts an indicator from one platform to another.
Example - Pine to NinjaScript:
/trading-indicators:pine:convert LB_MyVWAP.pine --to ninja
Example - NinjaScript to Tradovate:
/trading-indicators:ninja:convert MyVWAPLB.cs --to tradovate
Automatic Mappings:
| Concept | Pine Script | NinjaScript | Tradovate |
|---|
| Close price | close | Close[0] | d.close() |
| Previous close | close[1] | Close[1] | history.prior().close() |
| SMA | ta.sma(src, len) | SMA(src, len)[0] | SMA(len)(value) |
| New session | ta.change(time("D")) | Bars.IsFirstBarOfSession | d.tradeDate() !== lastDate |
validate - Syntax Validation
Checks indicator code against official platform documentation.
/trading-indicators:pine:validate LB_MyVWAP.pine