在Forex Tester中,用户需要修改策略参数,例如,该策略应该在哪种货币上起作用,或者它应该对订单使用什么止损等。
可以使用以下8种类型参数:
ot_Longword - unsigned integer, 0..4294967295
ot_Integer - signed integer, -2147483648..2147483647
ot_Double - double, 5.0 x 10^-324 .. 1.7 x 10^308
ot_String - text string
ot_Boolean - true/false
ot_EnumType - you can define list of strings for this parameter, internal value will be position in this list 0...N-1
ot_Timeframe - this parameter represents available timeframes PERIOD_M1..PERIOD_W1
ot_Currency - this parameter contains currency name and will allow you to choose currency from currency list in dialog
在初始化函数InitStrategy中我们就应该定义参数,可以分为以下5步:
RegOption - 创建新参数
AddSeparator - 添加参数分隔符(可以理解一组参数的小标题 )
Ad

本文介绍如何在ForexTester中定义和配置交易策略参数,包括使用不同类型的参数如整数、双精度浮点数、布尔值等,并展示了如何设置参数范围及小数位数。
最低0.47元/天 解锁文章
2377

被折叠的 条评论
为什么被折叠?



