PINE LIBRARY

NormalizedIndicators

57
NormalizedIndicators Library - Comprehensive Trend Normalization & Pre-Calibrated Systems
Overview

The NormalizedIndicators Library is an advanced Pine Script™ collection that provides normalized trend-following indicators, calculation functions, and pre-calibrated consensus systems for technical analysis. This library extends beyond simple indicator normalization by offering battle-tested, optimized parameter sets for specific assets and timeframes.
The main advantage lies in its dual functionality:

Individual normalized indicators with standardized outputs (1 = bullish, -1 = bearish, 0 = neutral)
Pre-calibrated consensus functions that combine multiple indicators with asset-specific optimizations

This enables traders to either build custom strategies using individual indicators or leverage pre-optimized systems designed for specific markets.

📊 Library Structure
The library is organized into three main sections:
1. Trend-Following Indicators
Individual indicators normalized to standard output format
2. Calculation Indicators
Statistical and mathematical analysis functions
3. Pre-Calibrated Systems ⭐ NEW
Asset-specific consensus configurations with optimized parameters

🔄 Trend-Following Indicators
Stationary Indicators
These oscillate around a fixed value and are not bound to price.
TSI() - True Strength Index ⭐ NEW

Source: TradingView
Parameters:

price: Price source
long: Long smoothing period
short: Short smoothing period
signal: Signal line period


Logic: Double-smoothed momentum oscillator comparing TSI to its signal line
Signal:

1 (bullish): TSI ≥ TSI EMA
0 (bearish): TSI < TSI EMA


Use Case: Momentum confirmation with trend direction

SMI() - Stochastic Momentum Index ⭐ NEW

Source: TradingView
Parameters:

src: Price source
lengthK: Stochastic period
lengthD: Smoothing period
lengthEMA: Signal line period


Logic: Enhanced stochastic that measures price position relative to midpoint of high/low range
Signal:

1 (bullish): SMI ≥ SMI EMA
0 (bearish): SMI < SMI EMA


Use Case: Overbought/oversold with momentum direction

BBPct() - Bollinger Bands Percent

Source: Algoalpha X Sushiboi77
Parameters:

Length: Period for Bollinger Bands
Factor: Standard deviation multiplier
Source: Price source (typical: close)


Logic: Calculates the position of price within the Bollinger Bands as a percentage
Signal:

1 (bullish): when positionBetweenBands > 50
-1 (bearish): when positionBetweenBands ≤ 50


Special Feature: Uses an array to store historical standard deviations for additional analysis

RSI() - Relative Strength Index

Source: TradingView
Parameters:

len: RSI period
src: Price source
smaLen: Smoothing period for RSI


Logic: Classic RSI with additional SMA smoothing
Signal:

1 (bullish): RSI-SMA > 50
-1 (bearish): RSI-SMA < 50
0 (neutral): RSI-SMA = 50




Non-Stationary Indicators
These follow price movement and have no fixed boundaries.
NorosTrendRibbonSMA() & NorosTrendRibbonEMA()

Source: ROBO_Trading
Parameters:

Length: Moving average and channel period
Source: Price source


Logic: Creates a price channel based on the highest/lowest MA value over a specified period
Signal:

1 (bullish): Price breaks above upper band
-1 (bearish): Price breaks below lower band
0 (neutral): Price within channel (maintains last state)


Difference: SMA version uses simple moving averages, EMA version uses exponential

TrendBands()

Source: starlord_xrp
Parameters: src (price source)
Logic: Uses 12 EMAs (9-30 period) and checks if all are rising or falling simultaneously
Signal:

1 (bullish): All 12 EMAs are rising
-1 (bearish): All 12 EMAs are falling
0 (neutral): Mixed signals


Special Feature: Very strict conditions - extremely strong trend filter

Vidya() - Variable Index Dynamic Average

Source: loxx
Parameters:

source: Price source
length: Main period
histLength: Historical period for volatility calculation


Logic: Adaptive moving average that adjusts to volatility
Signal:

1 (bullish): VIDYA is rising
-1 (bearish): VIDYA is falling



VZO() - Volume Zone Oscillator

Parameters:

source: Price source
length: Smoothing period
volumesource: Volume data source


Logic: Combines price and volume direction, calculates the ratio of directional volume to total volume
Signal:

1 (bullish): VZO > 14.9
-1 (bearish): VZO < -14.9
0 (neutral): VZO between -14.9 and 14.9



TrendContinuation()

Source: AlgoAlpha
Parameters:

malen: First HMA period
malen1: Second HMA period
theclose: Price source


Logic: Uses two Hull Moving Averages for trend assessment with neutrality detection
Signal:

1 (bullish): Uptrend without divergence
-1 (bearish): Downtrend without divergence
0 (neutral): Trend and longer MA diverge



LeonidasTrendFollowingSystem()

Source: LeonidasCrypto
Parameters:

src: Price source
shortlen: Short EMA period
keylen: Long EMA period


Logic: Simple dual EMA crossover system
Signal:

1 (bullish): Short EMA < Key EMA
-1 (bearish): Short EMA ≥ Key EMA



ysanturtrendfollower()

Source: ysantur
Parameters:

src: Price source
depth: Depth of Fibonacci weighting
smooth: Smoothing period
bias: Percentage bias adjustment


Logic: Complex system with Fibonacci-weighted moving averages and bias bands
Signal:

1 (bullish): Weighted MA > smoothed MA (with upward bias)
-1 (bearish): Weighted MA < smoothed MA (with downward bias)
0 (neutral): Within bias zone



TRAMA() - Trend Regularity Adaptive Moving Average

Source: LuxAlgo
Parameters:

src: Price source
length: Adaptation period


Logic: Adapts to trend regularity - accelerates in stable trends, slows in consolidations
Signal:

1 (bullish): Price > TRAMA
-1 (bearish): Price < TRAMA
0 (neutral): Price = TRAMA



HullSuite()

Source: InSilico
Parameters:

_length: Base period
src: Price source
_lengthMult: Length multiplier


Logic: Uses Hull Moving Average with lagged comparisons for trend determination
Signal:

1 (bullish): Current Hull > Hull 2 bars ago
-1 (bearish): Current Hull < Hull 2 bars ago
0 (neutral): No change



STC() - Schaff Trend Cycle

Source: shayankm (described as "Better MACD")
Parameters:

length: Cycle period
fastLength: Fast MACD period
slowLength: Slow MACD period
src: Price source


Logic: Combines MACD concepts with stochastic normalization for early trend signals
Signal:

1 (bullish): STC is rising
-1 (bearish): STC is falling




🧮 Calculation Indicators
These functions provide specialized mathematical calculations for advanced analysis.
LCorrelation() - Long-term Correlation

Creator: unicorpusstocks
Parameters:

Input: First time series
Compare: Second time series


Logic: Calculates the average of correlations across 6 different periods (30, 60, 90, 120, 150, 180)
Returns: Correlation value between -1 and 1
Application: Long-term relationship analysis between assets, markets, or indicators

MCorrelation() - Medium-term Correlation

Creator: unicorpusstocks
Parameters:

Input: First time series
Compare: Second time series


Logic: Calculates the average of correlations across 6 different periods (15, 30, 45, 60, 75, 90)
Returns: Correlation value between -1 and 1
Application: Medium-term relationship analysis with higher sensitivity

assetBeta() - Beta Coefficient

Creator: unicorpusstocks
Parameters:

measuredSymbol: The asset to be measured
baseSymbol: The reference asset (e.g., market index)


Logic:

Calculates Beta across 4 different time horizons (50, 100, 150, 200 periods)
Beta = Correlation × (Asset Standard Deviation / Market Standard Deviation)
Returns the average of all 4 Beta values


Returns: Beta value (typically 0-2, can be higher/lower)
Interpretation:

Beta = 1: Asset moves in sync with the market
Beta > 1: Asset more volatile than market
Beta < 1: Asset less volatile than market
Beta < 0: Asset moves inversely to the market




🎯 Pre-Calibrated Systems ⭐ NEW FEATURE
These are ready-to-use consensus functions with optimized parameters for specific assets and timeframes. Each calibration has been fine-tuned through extensive backtesting to provide optimal performance for its target market.
Universal Calibrations
virtual_4d_cal(src) - Virtual/General 4-Day Timeframe

Use Case: General purpose 4-day chart analysis
Optimized For: Broad crypto market on 4D timeframe
Indicators Used: BBPct, Noro's, RSI, VIDYA, HullSuite, TrendContinuation, Leonidas, TRAMA
Characteristics: Balanced sensitivity for swing trading

virtual_1d_cal(src) - Virtual/General 1-Day Timeframe

Use Case: General purpose daily chart analysis
Optimized For: Broad crypto market on 1D timeframe
Indicators Used: BBPct, Noro's, RSI, VIDYA, HullSuite, TrendContinuation, Leonidas, TRAMA
Characteristics: Standard daily trading parameters


Cryptocurrency Specific
sui_cal(src) - SUI Ecosystem Tokens

Use Case: Tokens in the SUI blockchain ecosystem
Timeframe: 1D
Characteristics: Fast-response parameters for high volatility projects

deep_1d_cal(src) - DEEP Token Daily

Use Case: Deepbook (DEEP) token analysis
Timeframe: 1D
Characteristics: Tuned for liquidity protocol token behavior

wal_1d_cal(src) - WAL Token Daily

Use Case: Specific for WAL token
Timeframe: 1D
Characteristics: Mid-range sensitivity parameters

sns_1d_cal(src) - SNS Token Daily

Use Case: Specific for SNS token
Timeframe: 1D
Characteristics: Balanced parameters for DeFi tokens

meme_cal(src) - Meme Coin Calibration

Use Case: Highly volatile meme coins
Timeframe: Various
Characteristics: Wider parameters to handle extreme volatility
Warning: Meme coins carry extreme risk

base_cal(src) - BASE Ecosystem Tokens

Use Case: Tokens on the BASE blockchain
Timeframe: Various
Characteristics: Optimized for L2 ecosystem tokens


Solana Ecosystem
sol_4d_cal(src) - Solana 4-Day

Use Case: SOL token on 4-day charts
Characteristics: Responsive parameters for major L1 blockchain

sol_meme_4d_cal(src) - Solana Meme Coins 4-Day

Use Case: Meme coins on Solana blockchain
Timeframe: 4D
Characteristics: Handles high volatility of Solana meme sector


Ethereum Ecosystem
eth_4d_cal(src) - Ethereum 4-Day

Use Case: ETH and major ERC-20 tokens
Timeframe: 4D
Indicators Used: BBPct, Noro's, RSI, TSI, HullSuite, TrendContinuation, Leonidas, SMI
Special: Uses TSI and SMI instead of VIDYA and TRAMA
Characteristics: Tuned for Ethereum's market cycles


Bitcoin
btc_4d_cal(src) - Bitcoin 4-Day

Use Case: Bitcoin on 4-day charts
Timeframe: 4D
Characteristics: Slower, smoother parameters for the most established crypto asset
Notes: Conservative parameters suitable for position trading


Traditional Markets
qqq_4d_cal(src) - QQQ (Nasdaq-100 ETF) 4-Day

Use Case: QQQ ETF and tech-heavy indices
Timeframe: 4D
Characteristics: Largest parameter sets reflecting lower volatility of traditional markets
Notes: Can be adapted for similar large-cap tech indices


💡 Usage Examples
Example 1: Using Pre-Calibrated System
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

// Simple one-line implementation for Bitcoin
btcSignal = lib.btc_4d_cal(close)

// Trading logic
longCondition = btcSignal > 0.5
shortCondition = btcSignal < -0.5

// Plot
plot(btcSignal, "BTC 4D Consensus", color.orange)
Example 2: Custom Multi-Indicator Consensus
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

// Build your own combination
signal1 = lib.BBPct(20, 2.0, close)
signal2 = lib.RSI(14, close, 5)
signal3 = lib.TRAMA(close, 50)
signal4 = lib.TSI(close, 25, 13, 13)

// Custom consensus
customConsensus = math.avg(signal1, signal2, signal3, signal4)
plot(customConsensus, "Custom Consensus", color.blue)
Example 3: Asset-Specific Strategy Switching
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

// Automatically use the right calibration
signal = switch syminfo.ticker
"BTCUSD" => lib.btc_4d_cal(close)
"ETHUSD" => lib.eth_4d_cal(close)
"SOLUSD" => lib.sol_4d_cal(close)
"QQQ" => lib.qqq_4d_cal(close)
=> lib.virtual_4d_cal(close) // Default

plot(signal, "Auto-Calibrated Signal", color.orange)
Example 4: Correlation-Filtered Trading
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

// Only trade when strong correlation with market exists
spy = request.security("SPY", timeframe.period, close)
correlation = lib.MCorrelation(close, spy)

trendSignal = lib.virtual_1d_cal(close)

// Only signals with positive market correlation
tradeBuy = trendSignal > 0.5 and correlation > 0.5
tradeSell = trendSignal < -0.5 and correlation > 0.5
Example 5: Beta-Adjusted Position Sizing
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

spy = request.security("SPY", timeframe.period, close)
beta = lib.assetBeta(close, spy)

// Adjust position size based on Beta
basePositionSize = 100
adjustedSize = basePositionSize / beta // Less size with high Beta

// Use with calibrated signal
signal = lib.qqq_4d_cal(close)

🎯 Choosing the Right Calibration
Decision Tree
1. What asset are you trading?

Bitcoin → btc_4d_cal()
Ethereum/ERC-20 → eth_4d_cal()
Solana → sol_4d_cal()
Solana memes → sol_meme_4d_cal()
SUI ecosystem → sui_cal()
BASE ecosystem → base_cal()
Meme coins (any chain) → meme_cal()
QQQ/Tech indices → qqq_4d_cal()
Other/General → virtual_4d_cal() or virtual_1d_cal()

2. What timeframe?

Most calibrations are optimized for 4D (4-day) or 1D (daily)
For other timeframes, start with virtual calibrations and adjust

3. What's the asset's volatility?

High volatility (memes, new tokens) → Use meme_cal() or similar
Medium volatility (established alts) → Use specific calibrations
Low volatility (BTC, major indices) → Use btc_4d_cal() or qqq_4d_cal()


⚙️ Technical Details
Normalization Standard

Bullish: 1
Bearish: -1
Neutral: 0 (only for selected indicators)

Calibration Methodology
Pre-calibrated functions were optimized using:

Historical backtesting on target assets
Parameter optimization for maximum Sharpe ratio
Validation on out-of-sample data
Real-time forward testing
Iterative refinement based on market conditions

Advantages of Pre-Calibrations

Instant Deployment: No parameter tuning needed
Asset-Optimized: Tailored to specific market characteristics
Tested Performance: Validated through extensive backtesting
Consistent Framework: All use the same 8-indicator structure
Easy Comparison: Compare different assets using same methodology

Performance Considerations

All functions are optimized for Pine Script v5
Proper use of var for state management
Efficient array operations where needed
Minimal recursive calls
Pre-calibrations add negligible computational overhead


📋 License
This code is subject to the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/

🔧 Installation
pinescriptimport unicorpusstocks/NormalizedIndicators/1
Then use functions with your chosen alias:
pinescript// Individual indicators
lib.BBPct(20, 2.0, close)
lib.RSI(14, close, 5)
lib.TSI(close, 25, 13, 13)

// Pre-calibrated systems
lib.btc_4d_cal(close)
lib.eth_4d_cal(close)
lib.meme_cal(close)

⚠️ Important Notes
General Usage

All indicators are lagging, as is typical for trend-following indicators
Signals should be combined with additional analysis (volume, support/resistance, etc.)
Backtesting is recommended before starting live trading with these signals
Different assets and timeframes may require different parameter optimizations

Pre-Calibrated Systems

Calibrations are optimized for specific timeframes - using them on different timeframes may reduce effectiveness
Market conditions change - what worked historically may need adjustment
Pre-calibrations are starting points, not guaranteed solutions
Always validate performance on your specific use case
Consider current market regime (trending vs. ranging)

Risk Management

Meme coin calibrations are designed for extremely volatile assets - use appropriate position sizing
Pre-calibrated systems do not eliminate risk
Always use stop losses and proper risk management
Past performance does not guarantee future results

Customization

Pre-calibrations can serve as templates for your own optimizations
Feel free to adjust individual parameters within calibration functions
Test modifications thoroughly before live deployment


🎓 Advanced Use Cases
Multi-Asset Portfolio Dashboard
Create a dashboard showing consensus across different assets:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

btc = request.security("BTCUSD", "4D", close)
eth = request.security("ETHUSD", "4D", close)
sol = request.security("SOLUSD", "4D", close)

btcSignal = lib.btc_4d_cal(btc)
ethSignal = lib.eth_4d_cal(eth)
solSignal = lib.sol_4d_cal(sol)

// Plot all three for comparison
plot(btcSignal, "BTC", color.orange)
plot(ethSignal, "ETH", color.blue)
plot(solSignal, "SOL", color.purple)
Regime Detection
Use correlation and calibrations together:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

// Detect market regime
btc = request.security("BTCUSD", timeframe.period, close)
correlation = lib.MCorrelation(close, btc)

// Choose strategy based on correlation
signal = correlation > 0.7 ? lib.btc_4d_cal(close) : lib.virtual_4d_cal(close)
Comparative Analysis
Compare asset-specific vs. general calibrations:
pinescriptimport unicorpusstocks/NormalizedIndicators/1 as lib

specificSignal = lib.btc_4d_cal(close) // BTC-specific
generalSignal = lib.virtual_4d_cal(close) // General

divergence = specificSignal - generalSignal
plot(divergence, "Calibration Divergence", color.yellow)

🚀 Quick Start Guide
For Beginners

Identify Your Asset: What are you trading?
Find the Calibration: Use the decision tree above
One-Line Implementation: signal = lib.btc_4d_cal(close)
Set Thresholds: Buy when > 0.5, sell when < -0.5
Add Risk Management: Always use stops

For Advanced Users

Start with Pre-Calibration: Use as baseline
Analyze Performance: Backtest on your specific market
Fine-Tune Parameters: Adjust individual indicators if needed
Combine with Other Signals: Volume, market structure, etc.
Create Custom Calibrations: Build your own based on library structure

For Developers

Import Library: Access all functions
Mix and Match: Combine indicators creatively
Build Custom Logic: Use indicators as building blocks
Create New Calibrations: Follow the established pattern
Share and Iterate: Contribute to the trading community


🎯 Key Takeaways
✅ 10 normalized indicators - Consistent interpretation across all
✅ 16+ pre-calibrated systems - Ready-to-use for specific assets
✅ Asset-optimized parameters - No guesswork required
✅ Calculation functions - Advanced correlation and beta analysis
✅ Universal framework - Works across crypto, stocks, forex
✅ Professional-grade - Built on proven technical analysis principles
✅ Flexible architecture - Use pre-calibrations or build your own
✅ Battle-tested - Validated through extensive backtesting

NormalizedIndicators Library transforms complex multi-indicator analysis into actionable signals through both customizable individual indicators and pre-optimized consensus systems. Whether you're a beginner looking for plug-and-play solutions or an advanced trader building sophisticated strategies, this library provides the foundation for data-driven trading decisions.WiederholenClaude kann Fehler machen. Bitte überprüfen Sie die Antworten. Sonnet 4.5

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.