Custom Sources
Custom Sources in the Lorentzian Classification indicator enable you to integrate external or specialized data streams—beyond standard price, volume, and built-in technical indicators—directly into the machine learning model. By doing so, you expand the "feature space" available to the Lorentzian Classification algorithm, potentially increasing its ability to capture complex market behavior across different market regimes (ranging, trending, volatile, or quiet).
In essence, a "Custom Source" is any numeric series available in your TradingView chart environment. You might choose a data series from a proprietary script, a specialized volume indicator, a fundamental metric, or anything else that outputs a numerical value each bar. These optional inputs can then be combined and normalized to act as additional features for the Lorentzian Classification model.
Interactive Settings Explorer
Below is an interactive exploration of the Custom Sources interface. Click any setting to instantly view its detailed documentation, default value, and purpose:
🎛️ DEFINE CUSTOM SOURCES (OPTIONAL)
Setting Help
Why Custom Sources Matter
-
Expanded Dimensionality
Originally, Lorentzian Classification was constrained by a limited set of built-in indicators (e.g., RSI, ADX). The ability to add custom data streams broadens the number of features from a handful to as many as ten. This additional dimensionality enhances the model's capacity to capture nuanced patterns that might otherwise go unnoticed. -
Tailored Analysis
Traders often have personal theories or preferred indicators for specific market conditions, such as using WaveTrend 3D for multi-timeframe oscillations or a specialized volume metric for capitulation events. Custom Sources allow you to weave these exact data streams into the classification process, creating a model better aligned with your trading style or hypotheses about market behavior. -
Adaptability
Markets evolve; what works in one environment can become less effective in another. By letting you insert and remove data series at will, Custom Sources facilitate rapid experimentation. If you suspect a new indicator might capture emerging market conditions, you can test it quickly without rewriting the entire code base. This flexible design encourages continuous iteration and refinement of your trading model. -
Diverse Thematic Focus
One user might want to concentrate on momentum (via multiple oscillators), another might want to incorporate macro-level data or order-flow metrics. The "theme" of your Lorentzian Classification system can shift in response to your research or changing market dynamics. With Custom Sources, you can design a specialized system—e.g., a volatility- and volume-focused approach—simply by piping in the relevant series.
Configuration Guide
Custom Source Settings
You can configure up to 10 custom sources, each with identical configuration options. The settings below apply uniformly to all custom sources, allowing you to build a comprehensive feature set for your analysis.
Custom Source 1-10
close
Purpose
Select custom sources with a specific analytical objective in mind to maximize the effectiveness of nearest-neighbor analysis.
Impact
Focused, thematic feature selection helps the model identify more meaningful patterns within your chosen domain of analysis.
Recommendations
- For volume analysis: combine volume, OBV, VWAP, and volume-weighted metrics
- For volatility: group ATR, standard deviation, and price range indicators
- For momentum: combine RSI, ROC, and other velocity-based metrics
- For price action: use various price levels and their derivatives
When configuring multiple custom sources:
- Start with your most reliable data source in Custom Source 1
- Add complementary sources in subsequent slots (2-10)
- Avoid highly correlated sources across slots
- Monitor performance impact as you add more sources
Normalization Options
Normalize Source
false
Purpose
Standardizes input data to a common scale, ensuring fair comparison between different types of data.
Impact
Prevents any single source from dominating the model's decisions due to differences in scale.
Recommendations
- Enable when combining sources with different numerical ranges
- Particularly important for mixing price-based and oscillator data
- Consider leaving disabled for sources that should maintain their natural scale
- Use consistently across related sources for balanced analysis
Use normalization to ensure all features contribute equally to the model's decisions, preventing any single feature from dominating the analysis.
Example Use Cases
WaveTrend 3D Integration
- Scenario: You have a multi-timeframe WaveTrend 3D script that outputs three oscillators, each for a different timeframe (e.g., 12-hour, 1-day, 2-day).
- Implementation: Select each oscillator from the Custom Source drop-downs. Optionally, enable normalization to align them with price-based features.
Volume-Weighted Confluence
- Scenario: Your trading relies heavily on volume spikes and a custom "Volume Heatmap" script.
- Implementation: Load the volume script on the chart, pick the relevant output fields (heatmap, on-balance volume, or custom volume ratio) as a custom series, and normalize if necessary.
Multi-Factor System
- Scenario: You want to combine multiple types of market analysis by incorporating both momentum and volatility factors.
- Implementation:
- Use "Custom Source 1" for a momentum indicator (like RSI or MACD)
- Use "Custom Source 2" for a volatility metric (like ATR or Bollinger Band Width)
- The Lorentzian Classification model can then identify patterns where both momentum and volatility conditions align for potential trade setups
Implementation Tips
Setting Up Custom Sources
- Pro Tip: Before assigning a slot, load the external indicator(s) you wish to reference on the chart. This ensures that the new data series appear in the drop-down list for selection.
Using Normalization
- When to Enable: Enable normalization when combining sources with widely different scales (e.g., volume in millions vs. oscillator from 0-100)
- When to Disable: Consider leaving normalization off for sources that should maintain their natural scale relationships
Key Takeaways
- Plan Your Inputs: Before adding custom sources, clarify what you want to test or emphasize
- Normalize Wisely: If your chosen series vary greatly in scale, enabling normalization maintains balance across features
- Experiment Responsibly: More features can mean richer insights but also increased complexity
- Adapt Over Time: As the market changes or new data sources arise, revisit your custom inputs
Since custom sources reference data series that are already pre-computed in other indicators on your chart, there's very minimal computational overhead when using them. You're essentially just piping in existing calculations, making custom sources more efficient than built-in sources. Feel free to experiment with as many custom sources as you'd like—they won't incur the same performance impact as adding additional built-in sources.
Example Configurations
Multi-Timeframe Analysis Setup:
- Custom Source 1: WaveTrend 3D (12-hour timeframe, Normalize: Enabled) - Reasoning: Captures slower, higher timeframe momentum.
- Custom Source 2: WaveTrend 3D (1-day timeframe, Normalize: Enabled) - Reasoning: Provides intermediate timeframe momentum context.
- Custom Source 3: WaveTrend 3D (2-day timeframe, Normalize: Enabled) - Reasoning: Offers broader, long-term momentum perspective.
- All other custom sources: Disabled - Reasoning: Focuses exclusively on multi-timeframe WaveTrend 3D data for a time-synchronized analysis. This configuration is tailored for users who want to perform multi-timeframe analysis using WaveTrend 3D. By integrating three different timeframes of WaveTrend 3D as custom sources, the model can capture oscillations and momentum shifts across multiple time horizons, providing a more comprehensive view of market dynamics. Normalization is enabled to ensure that the different WaveTrend 3D oscillators contribute equally to the model, despite potential scale differences.
Volume-Focused Strategy:
- Custom Source 1: Volume Heatmap (Heatmap Output, Normalize: Enabled) - Reasoning: Captures localized volume concentrations and order flow dynamics.
- Custom Source 2: On Balance Volume (Normalize: Enabled) - Reasoning: Measures cumulative buying and selling pressure over time.
- All other custom sources: Disabled - Reasoning: Concentrates solely on volume-based features to emphasize volume confirmation in signals. This configuration is designed for users whose strategies heavily rely on volume analysis. By using Volume Heatmap and On Balance Volume as custom sources, the model is optimized to identify patterns where volume confirms price movements. Volume Heatmap provides insights into localized volume concentrations, while On Balance Volume offers a broader view of buying and selling pressure. Disabling other custom sources ensures that the model's predictions are primarily driven by volume-based features.
Enhanced Momentum System:
- Custom Source 1: RSI (Normalize: Enabled) - Reasoning: Standard RSI for baseline momentum measurement.
- Custom Source 2: MACD (Normalize: Enabled) - Reasoning: MACD for trend and momentum confirmation.
- Custom Source 3: Stochastic Oscillator (Normalize: Enabled) - Reasoning: Stochastic Oscillator for overbought/oversold conditions and short-term momentum.
- All other custom sources: Disabled - Reasoning: Focuses on a combination of momentum indicators for a comprehensive momentum-based strategy. This configuration is geared towards users who want to build a robust momentum-based trading strategy. By combining RSI, MACD, and Stochastic Oscillator as custom sources, the model benefits from multiple perspectives on momentum. RSI provides a general measure of momentum, MACD offers trend and momentum confirmation, and Stochastic Oscillator captures short-term momentum shifts and overbought/oversold conditions. Normalization ensures that these diverse momentum indicators contribute equally to the model's predictions.