OPEN-SOURCE SCRIPT

VolumeMACD M5 Devis'So

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.
Trend AnalysisVolatilityVolume

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


更多:

免责声明