1. Inputs and Parameters: Fast and Slow Lengths: These define the moving averages used for calculating the MACD. Source: The volume data is used as the primary source. Signal Smoothing: The signal line is smoothed with the specified length. Oscillator and Signal MA Types: The user can select between SMA (Simple Moving Average) and EMA (Exponential Moving Average). 2. MACD Calculation: Fast and Slow MA: The script computes fast and slow moving averages of the volume data using the selected type (SMA or EMA). MACD: The difference between the fast and slow moving averages is calculated, and the RSI of this difference is further modified with a change function. Signal Line: A smoothed version of the MACD using either SMA or EMA. Top Line: The midpoint average between the MACD and the Signal Line. 3. Signal Generation: Long Signals (Green Candles Only): The script identifies potential buy signals when: The MACD, Signal Line, or Top Line crosses above specific thresholds (2, 3, 4, or 5). The candle is green (close price > open price). Short Signals (Red Candles Only): It identifies potential sell signals when: The MACD, Signal Line, or Top Line crosses below specific thresholds (-2, -3, -4, or -5). The candle is red (close price < open price). Each signal is categorized by its strength (M2, M3, M4, M5), depending on the threshold level.
4. Visualization: Long Signals: Represented as upward triangles of different sizes and colors based on their strength. Short Signals: Represented as downward triangles of different sizes and colors based on their strength. 5. Pullback Levels: The script calculates pullback levels based on the low (for long signals) and high (for short signals) of the candles where the signals occur: Long Pullback Level: Updated to the low of the candle when a long signal is detected. Short Pullback Level: Updated to the high of the candle when a short signal is detected. These pullback levels are plotted as step lines: Green Line: Represents the Long Pullback Level. Red Line: Represents the Short Pullback Level. 6. Average Pullback Level (Topk): The average of the Long Pullback Level and the Short Pullback Level is calculated and plotted: Pink Line: Represents the midpoint of the pullback levels, providing an additional reference for market movement. Overall Purpose: This script is designed to identify potential entry and exit points in the market based on volume-based MACD signals, categorized by strength, and complemented with pullback levels for better decision-making and visualization.
Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.