PROTECTED SOURCE SCRIPT

BanShen MACD Basic[SpeculationLab]

179
This is the basic version of the BanShen MACD indicator.
It includes only two core features: MACD divergence detection and ATR-based stop-loss plotting.
Ideal for users who prefer a clean chart and minimal system load.

⭕️ MACD Divergence Detection
To achieve higher accuracy, three key conditions are used:

The peaks and troughs must be clearly shaped.
The two divergence points should show a significant difference.
The divergence must be consecutive, with no interruptions.
The peak size factor filters out weak signals — by default, the peak must exceed 0.1× the histogram’s standard deviation.

The peak size ratio defines the minimum size difference between two peaks. Divergences with insufficient contrast are automatically filtered.

The noise threshold can be adjusted to ignore minor histogram fluctuations. This setting varies by instrument and defaults to 0 (no filtering).

If two or more consecutive divergences occur, this may indicate a strong mid- to long-term setup. These signals are rare but often high-probability. When enabled, a small arrow will mark the signal on the chart.

⭕️ ATR-Based Dynamic Stop Loss Finder
Assists in visualizing adaptive stop-loss levels.
All parameters, including colors, are fully customizable.

This version is designed for lightweight use and does **not** include additional modules such as RSI/OBV/FVG or Vegas Tunnel.
For the full version, search for “BanShen MACD Ultimate”.

⚠️Disclaimer⚠️
This script is for educational and informational purposes only.
It does not constitute financial advice. Use at your own risk.

这是 BanShen MACD 指标的基础版本。
该版本仅包含两个核心功能:MACD 背离识别 和 基于 ATR 的止损绘制。
适合追求图表简洁、系统资源占用低的用户。

⭕️ MACD 背离识别
为了提高识别准确率,系统采用以下三项条件进行判断:

波峰与波谷的形状需清晰明确;
两个背离点之间必须存在明显的高度差;
背离必须是连续的,中间不能被其他波峰干扰。
参数 peak size factor 用于过滤较弱的信号 —— 默认要求峰值大于 MACD 柱状图标准差的 0.1 倍。

参数 peak size ratio 控制两个波峰之间的最小比例差,若差距不足,则该背离将被自动过滤。

你还可以通过 noise threshold 来忽略柱状图中的轻微噪音。该值与柱状图的高度相关,不同品种之间差异较大,默认设置为 0,表示不过滤任何噪音。

如果系统识别到两次或以上的连续背离,通常代表一个较强的中长线机会。虽然这类信号很少见,但胜率通常较高。启用该功能后,图表上将出现一个小箭头标记提示。

⭕️ 基于 ATR 的动态止损绘制
用于辅助展示动态止损位置。
所有相关参数(包括颜色)均可自由调整。

该版本为轻量化设计,不包含 RSI / OBV / FVG 背离模块及 Vegas 隧道过滤器 等附加功能。
如需完整版本,请搜索 “BanShen MACD Ultimate”。

⚠️免责声明⚠️
本脚本仅供学习与参考使用,不构成任何投资建议。
交易有风险,使用前请自行评估,风险自负。

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.