搜索
产品
社区
市场
新闻
经纪商
更多
CN
开始
社区
/
脚本
/
Custom ADX with HMA Synchronization
OPEN-SOURCE SCRIPT
Custom ADX with HMA Synchronization
由AzizoTrader提供
关注
关注
20小时前
0
添加到收藏
添加到收藏
20小时前
//
version
=5
indicator("Custom ADX with HMA Synchronization", overlay=false)
// إعدادات طول HMA الذي يجب أن يتماشى معه مؤشر ADX
hmaLength = input.int(7, title="HMA Length (for consistency)")
// حساب True Range و قيم DI+ و DI-
tr = ta.tr
plusDM = ta.change(high) > ta.change(low) ? math.max(ta.change(high), 0) : 0
minusDM = ta.change(low) > ta.change(high) ? math.max(ta.change(low), 0) : 0
// حساب قيم DI+ و DI- كمتوسط
smoothPlusDM = ta.rma(plusDM, hmaLength)
smoothMinusDM = ta.rma(minusDM, hmaLength)
smoothTR = ta.rma(tr, hmaLength)
// حساب قيم +DI و -DI
plusDI = (smoothPlusDM / smoothTR) * 100
minusDI = (smoothMinusDM / smoothTR) * 100
// حساب مؤشر DX
dx = 100 * math.abs(plusDI - minusDI) / (plusDI + minusDI)
// حساب ADX باستخدام متوسط الحركة الأسية
adxValue = ta.rma(dx, hmaLength)
// عرض قيمة ADX على الرسم البياني
plot(adxValue, title="ADX", color=color.orange, linewidth=2)
// إضافة مستوى 25 لتوضيح مستوى التوجه القوي
hline(25, "Level 25", color=color.gray, linestyle=hline.style_dotted)
educational
开源脚本
本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受
网站规则
约束。 您可以收藏它以在图表上使用。
想在图表上使用此脚本?
添加到收藏
AzizoTrader
关注
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在
使用条款
阅读更多信息。