用lua语言写技术指标

FXCM 技术指标可以自动生成大部分代码


主要包括 Parameters 和 streams block两部分


indicator:name("RSB");
indicator:description("");
indicator:requiredSource(core.Tick);
indicator:type(core.Indicator);

indicaotor.parameters 根据其类型包括5个参数Unique Identifier, Displayable Name, Description, type, Default


其中 Type 有很多选项(integer, double, boolean, color, line style, string, date, date/time, file, sound file, Email, Price, Bid/Ask, Allow Trade, Account, )

软件会根据你的type类型加方法, 比如addInteger, addColor, 


每个stream包括两个变量 Unique, Type


addStream()


设置好以后,系统会自动生成两个变量 first, source

source = instance.source;

first = source:first();


其他方法:

addGroup("Calculation")

addGroup("Style")

setFlag()


关于core

core handles synchronization, 在update()之前,core extends/reduces indicator output using extent parameter

core.crosses(stream, 0, p)

core.sum(stream, 


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值