VaultCharts

Can I Create Custom Indicators?

VaultCharts supports JavaScript-based custom indicators that run locally and are fully private. Create indicators using standard JavaScript with access to historical OHLCV data and built-in technical analysis utilities.

IndicatorsCustom IndicatorsJavaScript IndicatorsTechnical AnalysisIndicator Development

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:

  1. Line Series: Single or multiple lines
  2. Overlays: Displayed on price chart
  3. Boxes: Rectangular regions
  4. 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

  1. Open indicators panel
  2. Click "Create Custom Indicator"
  3. Name your indicator
  4. Choose output type

Step 2: Write Your Logic

  1. Access OHLCV data
  2. Implement calculations
  3. Handle edge cases
  4. Optimize performance

Step 3: Configure Display

  1. Choose colors
  2. Set line styles
  3. Configure overlays
  4. Set visibility options

Step 4: Test Indicator

  1. Add to chart
  2. Verify calculations
  3. Check performance
  4. Test edge cases

Step 5: Save and Use

  1. Save indicator
  2. Add to favorites
  3. Share (optional)
  4. 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

FeatureCustom IndicatorsPredefined Indicators
FlexibilityMaximumLimited
Setup timeHighLow
MaintenanceManualAutomatic
Best forUnique needsStandard analysis

Related Articles

Related Articles