PROTECTED SOURCE SCRIPT

Axis

77
Axis Indicator: Dynamic Trend Lines & Support/Resistance with Trading Mode Presets

Overview

The Axis indicator is a powerful, all-in-one tool for traders, designed to identify key trend lines and support/resistance (S&R) levels across various trading strategies. With 11 predefined trading modes—Scalping, Day Trading, Swing Trading, Long-Term, Position Trading, Breakout Trading, Mean Reversion, Trend Following, Range Trading, Volatility Trading, and Counter-Trend Trading—Axis adapts to your trading style by automatically adjusting parameters like volume Moving Average (MA) periods, fractal lookbacks, and alert proximity. Built-in timeframe validation ensures you’re using the optimal chart timeframe for your selected mode, with a warning label displayed if the timeframe is unsuitable. Whether you’re a scalper chasing quick moves or a position trader eyeing long-term trends, Axis provides precise, volume-filtered signals to enhance your trading decisions.

How It Works

Axis plots two sets of trend lines (A and B) and two sets of S&R levels (A and B) on your chart, each tailored to the selected trading mode:

Trend Lines (A & B): Identifies uptrend and downtrend lines using pivot highs/lows with mode-specific lookback periods. Lines are drawn only when volume exceeds the mode’s volume MA, ensuring high-probability signals.
Support/Resistance (A & B): Plots horizontal S&R levels based on pivot highs/lows, filtered by volume to highlight significant price levels.
Volume MA: Uses a mode-specific MA type (SMA, EMA, WMA, HMA, or VWMA) to validate pivots. MA periods are scaled by timeframe (e.g., 1m, 1h, Daily) and capped at 5,000 candles to prevent errors.
Timeframe Validation: Checks if the chart’s timeframe matches the mode’s recommended range (e.g., 5m–1h for Volatility Trading). If not, a yellow warning label appears (e.g., “Timeframe may not suit Scalping”).
Alerts: Triggers alerts for new trend lines, S&R levels, and price crosses, allowing real-time trade monitoring.
Trading Modes & Recommended Timeframes

Each mode is preconfigured with optimized settings for specific strategies and timeframes:

Scalping (1m–15m): Fast signals with short lookbacks (1–3 bars) and tight alerts (0.2%) for intraday scalps.
Day Trading (15m–1h): Intraday focus with moderate lookbacks (2–4 bars) and 0.3% alert proximity.
Swing Trading (1h–4h): Multi-day/week trades with balanced settings (2–5 bars, 0.5% alerts).
Long-Term (Daily–Weekly): Major trends with longer lookbacks (3–7 bars, 1.0% alerts).
Position Trading (Weekly–Monthly): Long-term moves with robust settings (4–20 bars, 1.5% alerts).
Breakout Trading (30m–4h): Detects breakouts with sensitive settings (1–4 bars, 0.25% alerts).
Mean Reversion (1h–Daily): Targets reversals with moderate settings (3–8 bars, 0.7% alerts).
Trend Following (4h–Weekly): Captures trends with longer lookbacks (4–18 bars, 1.2% alerts).
Range Trading (1h–4h): Optimized for consolidation with balanced settings (2–6 bars, 0.4% alerts).
Volatility Trading (5m–1h): High-volatility markets with ultra-sensitive settings (1–2 bars, 0.15% alerts).
Counter-Trend Trading (4h–Daily): Contrarian reversals with robust settings (3–9 bars, 0.9% alerts).
Key Features

11 Trading Modes: Preconfigured settings for diverse strategies, eliminating manual tuning.
Dynamic Volume MA: Supports SMA, EMA, WMA, HMA, and VWMA, scaled by timeframe for accuracy.
Timeframe Validation: Warns if the chart timeframe doesn’t suit the mode, preventing suboptimal setups.
Customizable Visuals: Adjust line widths and colors for trend lines and S&R levels.
Comprehensive Alerts: Alerts for new trend lines, S&R levels, and price crosses, integrable with TradingView’s alert system.
Performance Optimized: MA periods capped at 5,000 candles to avoid errors and ensure smooth operation.
How to Use

Add to Chart: Apply the Axis indicator to your TradingView chart.
Select Trading Mode: Choose a mode from the “Trading Mode” dropdown in the indicator settings (e.g., Volatility Trading for crypto on 5m).
Check Timeframe: Ensure your chart’s timeframe matches the mode’s recommended range (e.g., 5m–1h for Volatility Trading). A yellow warning label appears if the timeframe is unsuitable.
Customize Visuals: Adjust line widths and colors for trend lines (A & B) and S&R (A & B) in the settings.
Set Alerts: Create alerts for new trend lines, S&R levels, or price crosses via TradingView’s alert menu.
Trade Signals:
Trend Lines: Use uptrend/downtrend lines for trend confirmation or breakout setups.
S&R Levels: Trade bounces or breaks at support/resistance, confirmed by volume.
Alerts: Act on price cross alerts for entries/exits based on your strategy.
Tips for Best Results

Match Timeframe to Mode: Stick to recommended timeframes (e.g., 1h–4h for Swing Trading) to maximize signal accuracy. Heed warning labels for timeframe mismatches.
Test Across Assets: Volatility Trading shines in crypto during news events, while Range Trading suits forex/stocks in consolidation.
Backtest Strategies: Convert Axis to a strategy (e.g., enter on S&R cross, exit after X bars) to validate performance.
Optimize for Performance: If lag occurs on low timeframes, reduce the MA cap to 2,500 (edit math.min(..., 2500) in the code).
Combine with Other Tools: Pair Axis with indicators like RSI or MACD for confluence.
Why Choose Axis?

Axis simplifies technical analysis by offering a single indicator that adapts to your trading style. Its mode-based presets, volume-filtered signals, and timeframe validation make it ideal for traders of all levels, from scalpers to long-term investors. Whether you’re trading crypto, forex, or stocks, Axis delivers actionable insights with minimal setup.

Feedback & Support

If you have questions, suggestions, or need help customizing Axis, feel free to comment or contact me via TradingView. Your feedback helps improve the indicator for the community!

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.