Adaptive Freedom Machine w/labels

Overview
The Adaptive Freedom Machine w/ Labels is a versatile Pine Script indicator designed to assist traders in identifying buy and sell opportunities across various market conditions (trending, ranging, or volatile). It combines Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Average True Range (ATR), and customizable time filters to generate actionable signals. The indicator overlays on the price chart, displaying EMAs, a dynamic cloud, scaled RSI levels, buy/sell signals, and market condition labels, making it suitable for swing trading, day trading, or scalping.
What It Does
This indicator generates buy and sell signals based on the interaction of two EMAs, filtered by RSI thresholds, ATR-based volatility, and user-defined time windows. It adapts to the selected market condition by adjusting EMA lengths, RSI thresholds, and trading hours. A dynamic cloud highlights trend direction or neutral zones, and candlestick bodies are colored in neutral conditions for clarity. A table displays real-time trend and volatility status.
How It Works
The indicator uses the following components:
EMAs: Two EMAs (short and long) are calculated on a user-selected timeframe (1, 5, 15, 30, or 60 minutes). Their crossover or crossunder generates potential buy/sell signals, with lengths adjusted based on the market condition (e.g., longer EMAs for trending markets, shorter for ranging).
Dynamic Cloud: The area between the EMAs forms a cloud, colored green for uptrends, red for downtrends, or a user-defined color (default yellow) for neutral zones (when EMAs are close, determined by an ATR-based threshold). Users can widen the cloud for visibility.
RSI Filter: RSI is scaled to price levels and plotted on the chart (optional). Signals are filtered to ensure RSI is within user-defined buy/sell thresholds and not in overbought/oversold zones, with thresholds tailored to the market condition.
ATR Volatility Filter: An optional filter ensures signals occur during sufficient volatility (ATR(14) > SMA(ATR, 20)).
Time Filter: Signals are restricted to a user-defined or market-specific time window (e.g., 10:00–15:00 UTC for volatile markets), with an option for custom hours.
Visual Aids: Buy/sell signals appear as green triangles (buy) or red triangles (sell). Candlesticks in neutral zones are colored (default yellow). A table in the top-right corner shows the current trend (Uptrend, Downtrend, Neutral) and volatility (High or Low).
The indicator ensures compatibility with standard chart types (e.g., candlestick charts) to produce realistic signals, avoiding non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Timeframe: Choose a timeframe (1, 5, 15, 30, or 60 minutes) to align with your trading style.
Market Condition: Select one market condition (Trending, Ranging, or Volatile). Volatile is the default if none is selected. Only one condition can be active.
Filters:
Enable/disable the ATR volatility filter to trade only in high-volatility periods.
Enable the time filter and choose default hours (specific to the market condition) or set custom UTC hours.
Cloud Settings: Adjust the cloud width, neutral zone threshold, and color. Enable/disable the neutral cloud.
RSI Display: Toggle the scaled RSI and its thresholds on the chart.
Interpret Signals:
Buy Signal: A green triangle below the bar indicates a potential long entry (EMA crossover, RSI above buy threshold, within time window, and passing volatility filter).
Sell Signal: A red triangle above the bar indicates a potential short entry (EMA crossunder, RSI below sell threshold, within time window, and passing volatility filter).
Neutral Zone: Yellow candlesticks and cloud (if enabled) suggest a lack of clear trend; avoid trading or use for range-bound strategies.
Monitor the Table: Check the top-right table for real-time trend (Uptrend, Downtrend, Neutral) and volatility (High or Low) to confirm market context.
Unique Features
Adaptive Parameters: Automatically adjusts EMA lengths, RSI thresholds, and trading hours based on the selected market condition, reducing manual tweaking.
Neutral Zone Detection: Uses an ATR-based threshold to identify low-trend periods, helping traders avoid choppy markets.
Scaled RSI Visualization: Plots RSI and thresholds directly on the price chart, making it easier to assess momentum relative to price action.
Flexible Time Filtering: Supports both default and custom UTC-based trading windows, ideal for day traders targeting specific sessions.
Dynamic Cloud: Enhances trend visualization with customizable width and neutral zone coloring, improving readability.
Notes
Use on standard candlestick or bar charts to ensure realistic signals.
Test the indicator on a demo account to understand its behavior in your chosen market and timeframe.
Adjust settings to match your trading strategy, but avoid over-optimizing for past data.
The indicator is not a standalone system; combine it with other analysis (e.g., support/resistance, news events) for better results.
Limitations
Signals may lag in fast-moving markets due to EMA-based calculations.
Neutral zone detection may vary in extremely volatile or illiquid markets.
Time filters are UTC-based; ensure your platform’s timezone settings align.
This indicator is designed for traders seeking a customizable, trend-following tool that adapts to different market environments while providing clear visual cues and robust filtering.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.