找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
首页论坛EAHub 外汇论坛
查看: 25|回复: 0

MQL4威廉指标函数调用及其参数

[复制链接]

4万

主题

54

回帖

4万

积分

管理员

积分
45954
发表于 2026-8-27 23:13:00 | 显示全部楼层 |阅读模式
威廉指标(%R)威廉指标(%R)用于确定市场是否超买/超卖。http://ta.mql4.com/indicators/oscillators/williams_percent 函数原型:double iWPR( string symbol, int timeframe, int period, int shift)

参数:交易品种 – 定义应该用于技术指标值计算的金融证券(货币对)。如果你需要当前(活动)的证券(图表),则使用 NULL(或 0)。时间范围 – 定义应该使用指标的时间范围(时长)。对当前时期使用 0 或以下常量之一(PERIOD_M1、PERIOD_M5、PERIOD_M15、PERIOD_M30、PERIOD_H1、PERIOD_H4、PERIOD_D1、PERIOD_W1、PERIOD_MN1)。period – 柱的数量,用于获取平均值。shift – 定义应该使用指标的柱。

使用示例:



double wpr; wpr=iWPR(0,0,14,1);
// overbought: the last but one bar on the active chart and period.// Use 14 bars to get the mean value.
wpr=iWPR("USDCHF",PERIOD_D1,9,0);
// overbought: The last bar on a daily chart USDCHF.// Use 9 bars to get the mean value.
wpr=iWPR("GBPJPY",PERIOD_H1,23,1);
// overbought: the last but one bar on an hour chart GBPJPY.// Use 23 bars to get the mean value.复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|EAHub外汇论坛

GMT+8, 2026-10-9 16:14 , Processed in 0.107021 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表