用lua语言写技术指标

xiaoxiao2021-02-28  29

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, 

转载请注明原文地址: https://www.6miu.com/read-2249959.html

最新回复(0)