FarewellOC 发表于 2020-8-19 20:43:18

MQL4 随机震荡指标函数调用及其参数

随机震荡指标随机震荡指标用于确定买卖信号。http://ta.mql4.com/indicators/oscillators/stochastic 函数原型:double iStochastic( string symbol, int timeframe, int %Kperiod,                     int %Dperiod, int slowing, int method,                     int price_field, int mode, int shift)
参数:
[*]交易品种 – 定义应该用于技术指标值计算的金融证券(货币对)。如果你需要当前(活动)的证券(图表),则使用 NULL(或 0)。
[*]时间范围 – 定义应该使用指标的时间范围(时长)。对当前时期使用 0 或以下常量之一(PERIOD_M1、PERIOD_M5、PERIOD_M15、PERIOD_M30、PERIOD_H1、PERIOD_H4、PERIOD_D1、PERIOD_W1、PERIOD_MN1)。
[*]%K period - 柱的数量,用于生成 %K 线。
[*]%D period - 柱的数量,用于生成 %D 线。
[*]slowing - 滚动值。
[*]method - 定义一种用于获取平均值的方法。选择一种方法有以下预定义的常量:


[*]MODE_SMA - 简单移动平均线
[*]MODE_EMA - 指数移动平均线
[*]MODE_SMMA - 平滑移动平均线
[*]MODE_LWMA - 线性加权移动平均线

[*]price_field – 定义什么价格应该用于计算。价格选择有以下预定义的值:


[*]0 - 最低价/最高价
[*]1 - 收盘价/收盘价

[*]mode - 定义要寻找的值。要进行选择,使用以下常量之一:


[*]MODE_MAIN - 主线
[*]MODE_SIGNAL- 信号线

[*]shift – 定义应该使用指标的柱。

使用 mode 参数,定义应返回的内容:使用示例:
double s; s=iStochastic(0,0,10,6,6,MODE_SMA,0,MODE_MAIN,0);
// value of the main line for the last bar on the current chart and period. // Bars used to calculate lines %K, %D and slowing // accordingly: 10, 6 and 6. Method of averaging: simple moving average. // Use prices: Low/High.

s=iStochastic("EURUSD",PERIOD_M1,6,3,3,MODE_SMMA,1,MODE_SIGNAL,1);
// value of the signal line for the last but one bar on a minute chart EURUSD.// Bars used to calculate lines %K, %D and slowing // accordingly: 6, 3 and 3. Method of averaging: smoothed moving average. // Use prices: Close/Close.

s=iStochastic("EURGBP",PERIOD_M5,9,7,7,MODE_EMA,0,MODE_MAIN,0);// value of the main line for the last bar on 5-minute chart EURGBP.
// Bars used to calculate lines %K, %D and slowing // accordingly: 9, 7 and 7. Method of averaging: exponential moving average.// Use prices: Low/High.

latage 发表于 2021-5-23 13:20:53

谢谢分享

fxbienhild 发表于 2021-5-24 11:46:24

看起来很不错的策略

升龙 发表于 2021-5-24 15:10:02

感谢分享

qwe11 发表于 2021-5-25 15:39:22

谢谢分享

巴比伦雄鹰 发表于 2021-5-26 00:06:02

谢谢分享

tyo00 发表于 2021-7-15 11:20:26

谢谢分享

ss860830 发表于 2021-7-16 08:51:25

谢谢分享

巴比伦雄鹰 发表于 2021-7-16 09:26:28

关注

kenlee1628 发表于 2021-7-20 03:00:40

感谢分享

tyo00 发表于 2021-7-20 05:10:21

谢谢分享

jongjongyoshen 发表于 2022-1-4 18:55:21

感謝分享

neeo 发表于 2022-1-23 16:54:01

感謝分享

gjhgxc 发表于 2022-1-24 08:20:08

谢谢分享

紫竹青荷 发表于 2022-5-19 15:13:51

感谢楼主分享

khs230 发表于 2022-5-19 15:33:39

谢谢分享!赞!....

ea1209 发表于 2022-5-19 15:56:04

谢谢分享

pengjhl 发表于 2022-5-19 16:51:47

路过看看

gesoros 发表于 2022-5-19 18:06:23

路过。。了解一下。。。。

nanaliu 发表于 2022-5-19 18:28:57

看看。。感谢楼主分享。。。。
页: [1] 2
查看完整版本: MQL4 随机震荡指标函数调用及其参数