Forex Tester 交易策略 - 定义外部参数

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

在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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

tmlige

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值