OPEN-SOURCE SCRIPT

[blackcat] L1 Trend Swing Oscillator

1 647
█ OVERVIEW

L1 Trend Swing Oscillator (L1-TSO) is a cyberpunk-styled technical analysis indicator that identifies swing trading opportunities and buy/sell signals based on price fluctuation analysis and moving average convergence. The indicator combines multiple analytical layers including weighted price calculations, adaptive moving averages, and trend line analysis to generate visual signals for potential market entry and exit points.

█ CONCEPTS

This indicator utilizes a multi-layered analysis approach to identify trend conditions and potential reversal points:

Core Principles
 • Weighted Price Analysis: Calculates a weighted price using (2×close + high + low + open) / 5 for more representative price action
 • Adaptive Moving Average System: Dynamically switches between short-term (MA3) and long-term (MA21) averages based on trend alignment
 • Ratio Differential Analysis: Measures the balance between upper and lower price ratios within a 21-bar range
 • Trend Line Oscillation: Normalizes price position within 25-bar high and 11-bar low range, smoothed with EMA

█ HOW TO USE

1 — Add the indicator to your chart from the TradingView indicators library
2 — Observe the histogram signals and trend line for market condition assessment
3 — Look for 🚀 BUY or ⚡ STRONG BUY labels for potential entry opportunities
4 — Monitor 💀 SELL labels for potential exit or shorting opportunities
5 — Use the real-time status table in the top-right corner for quick signal verification

Input Parameters
 • EMA Length (default: 10): Controls the smoothing period for weighted price comparison
 • Short MA Length (default: 3): Sets the fast moving average period for adaptive MA calculation
 • Long MA Length (default: 21): Sets the slow moving average period for trend identification
 • Trend EMA Length (default: 8): Controls the smoothing of the main trend line oscillator
 • Trend High Lookback (default: 5): Lookback period for detecting trend line highs
 • Trend Low Lookback (default: 5): Lookback period for detecting trend line lows
 • Price Extremes Lookback (default: 10): Period for identifying price extremes
 • Trend High Threshold (default: 34.0): Overbought level for the trend oscillator
 • Trend Low Threshold (default: 3.0): Oversold level for the trend oscillator
 • Ratio Diff Threshold (default: -45.0): Threshold for triggering strong buy signals

█ SIGNALS

Histogram Signals
 • Neon Pink Histogram: Appears when weighted price is above its EMA, indicating bullish momentum
 • Neon Yellow Histogram: Appears when adaptive MA is rising and aligns with MA21, indicating trend confirmation
 • Neon Cyan Histogram: Appears during strong buy conditions, indicating high-probability entry points

Trend Line Colors
 • Neon Magenta: Trend line is above the overbought threshold (34) - exercise caution
 • Neon Green: Trend line is below the oversold threshold (3) - potential buying opportunity
 • Neon Cyan: Trend line is in neutral territory - wait for confirmation

Label Signals
 • 🚀 BUY: Appears when trend line reaches its lowest point in 5 bars below threshold 3 and price is at a local low
 • ⚡ STRONG BUY ⚡: Appears when the smoothed ratio differential drops below -45, indicating extreme oversold conditions
 • 💀 SELL: Appears when trend line reaches its highest point in 5 bars above threshold 34 and price is at a local high

Reference Lines
 • OVERBOUGHT (34): Dashed magenta line indicating potential overbought conditions
 • OVERSOLD (3): Dashed green line indicating potential oversold conditions
 • ZERO (0): Dotted purple center line for orientation

█ STATUS TABLE

The indicator includes a real-time cyberpunk-styled status table displaying:
 • Current trend line value with visual progress bar
 • Active buy/sell signal status with on/off indicators
 • Overall market zone summary (BUY ZONE / SELL ZONE / NEUTRAL)

█ ALERTS

The indicator supports four alert conditions:
 • Buy Signal Alert: Triggers on any buy signal (regular or strong)
 • Sell Signal Alert: Triggers when sell conditions are met
 • Buy Dot Alert: Triggers specifically on regular buy signals
 • Strong Buy Alert: Triggers specifically on strong buy signals

█ LIMITATIONS

• Best suited for swing trading on medium timeframes (15m to 4H recommended)
• May produce false signals during strong trending markets without pullbacks
• Signal accuracy depends on proper threshold calibration for each instrument
• Not recommended for very low timeframes (< 5 min) due to noise
• Past signals do not guarantee future performance

█ NOTES

• This indicator uses a cyberpunk color theme with customizable neon colors
• All signals are generated on bar close to prevent repainting
• The indicator includes glow effects on histograms for enhanced visibility
• For best results, combine with other confirmation tools such as volume analysis, support/resistance levels, and market structure

════════════════════════════════════════════════════════════════════════
For questions or feedback, please use the comments section below.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。