Short Answer
Yes — VaultCharts supports JavaScript-based custom indicators that run locally on your device. You can use standard JavaScript to access historical OHLCV data, utilize built-in technical indicator utilities, and create indicators that overlay on price or display in separate panes. All custom indicators are fully private and never leave your device.
Detailed Explanation
Why Custom Indicators Matter
While VaultCharts includes comprehensive predefined indicators, custom indicators enable:
- Unique strategies: Implement proprietary trading logic
- Research tools: Create indicators for quantitative analysis
- Combination indicators: Merge multiple concepts
- Specialized analysis: Tools for specific market conditions
- Learning: Understand indicator mechanics
What You Can Build
1. Price-Based Indicators
Create indicators that analyze:
- Price action patterns
- Support and resistance levels
- Price relationships
- Custom price calculations
2. Volume-Based Indicators
Develop tools that use:
- Volume analysis
- Volume-price relationships
- Volume patterns
- Custom volume metrics
3. Multi-Factor Indicators
Combine:
- Multiple timeframes
- Different data sources
- Various calculations
- Complex logic
4. Visual Indicators
Create:
- Custom overlays
- Boxes and regions
- Lines and curves
- Filled areas
Development Environment
JavaScript Support
VaultCharts supports:
- Standard JavaScript: ES6+ features
- Modern syntax: Arrow functions, async/await, etc.
- Built-in utilities: Math, Date, Array methods
- No external libraries: Self-contained environment
Data Access
Your indicators have access to:
- Historical OHLCV data: All available price data
- Current candle: Real-time price updates
- Multiple timeframes: Access different timeframe data
- Volume data: Volume information for analysis
Built-In Utilities
Use provided functions for:
- Technical calculations: Moving averages, standard deviation, etc.
- Mathematical operations: Common statistical functions
- Data manipulation: Array operations, filtering
- Time handling: Date and time utilities
Indicator Structure
Basic Template
function calculate(data) {
// Access OHLCV data
const closes = data.map(candle => candle.close);
const highs = data.map(candle => candle.high);
const lows = data.map(candle => candle.low);
const volumes = data.map(candle => candle.volume);
// Your calculation logic
const result = [];
// Return indicator values
return result;
}
Output Types
Indicators can return:
- Line Series: Single or multiple lines
- Overlays: Displayed on price chart
- Boxes: Rectangular regions
- Filled Regions: Colored areas
Common Indicator Types
Moving Average Variants
Create custom moving averages:
- Weighted moving averages
- Adaptive moving averages
- Fractal moving averages
- Custom smoothing algorithms
Oscillators
Develop oscillators for:
- Momentum analysis
- Overbought/oversold conditions
- Divergence detection
- Custom momentum metrics
Volume Indicators
Build volume-based tools:
- Volume-weighted calculations
- Volume patterns
- Volume-price relationships
- Custom volume metrics
Pattern Indicators
Detect and visualize:
- Chart patterns
- Price structures
- Support/resistance
- Custom patterns
Step-by-Step Creation
Step 1: Open Indicator Editor
- Open indicators panel
- Click "Create Custom Indicator"
- Name your indicator
- Choose output type
Step 2: Write Your Logic
- Access OHLCV data
- Implement calculations
- Handle edge cases
- Optimize performance
Step 3: Configure Display
- Choose colors
- Set line styles
- Configure overlays
- Set visibility options
Step 4: Test Indicator
- Add to chart
- Verify calculations
- Check performance
- Test edge cases
Step 5: Save and Use
- Save indicator
- Add to favorites
- Share (optional)
- Use in analysis
Advanced Features
Multi-Timeframe Access
Access data from:
- Current timeframe
- Higher timeframes
- Lower timeframes
- Multiple timeframes simultaneously
Real-Time Updates
Indicators update:
- With each new candle
- On price changes
- In real-time
- Automatically
Performance Optimization
Optimize for:
- Fast calculations
- Efficient memory use
- Smooth rendering
- Responsive updates
Use Cases
1. Proprietary Strategies
Implement:
- Unique trading logic
- Proprietary calculations
- Custom analysis methods
- Research tools
2. Combination Indicators
Create indicators that:
- Combine multiple concepts
- Merge different indicators
- Create composite tools
- Simplify analysis
3. Research and Development
Use for:
- Strategy testing
- Indicator development
- Market research
- Quantitative analysis
4. Educational
Learn by:
- Understanding calculations
- Experimenting with logic
- Testing concepts
- Building skills
Best Practices
1. Start Simple
- Begin with basic calculations
- Test incrementally
- Add complexity gradually
- Verify at each step
2. Handle Edge Cases
- Check for empty data
- Handle insufficient history
- Validate calculations
- Manage errors gracefully
3. Optimize Performance
- Minimize calculations
- Cache results when possible
- Use efficient algorithms
- Profile performance
4. Document Code
- Add comments
- Explain logic
- Document parameters
- Note assumptions
5. Test Thoroughly
- Test with different symbols
- Verify across timeframes
- Check edge cases
- Validate results
Privacy and Security
Local Execution
- All code runs locally
- No data leaves your device
- No external connections
- Complete privacy
Security
- Sandboxed execution
- No file system access
- Limited network access
- Safe environment
Limitations
JavaScript Only
- No external libraries
- No Node.js modules
- Standard JavaScript only
- Built-in utilities provided
Performance
- Consider calculation complexity
- Optimize for speed
- Test with large datasets
- Monitor performance
Data Access
- OHLCV data only
- No external data sources
- Limited to available data
- Timeframe constraints
Comparison: Custom vs. Predefined
| Feature | Custom Indicators | Predefined Indicators |
|---|---|---|
| Flexibility | Maximum | Limited |
| Setup time | High | Low |
| Maintenance | Manual | Automatic |
| Best for | Unique needs | Standard analysis |