MT4 Series array

这篇博客探讨了MT4平台中时间序列的概念,详细介绍了Time[]系列数组的使用,包括其元素如何以反向索引存储,从当前条目(索引0)到最旧条目(索引 Bars-1)。内容还涵盖了动态数组、静态分布数组、内存分配操作,以及如何通过ArraySetAsSeries()改变数组索引方向。同时,讨论了在指标中接收价格数据、异步访问、数据存储以及确保终端和服务器数据同步的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

时间序列

datetime Time[]


Series array that contains open time of each bar of the current chart. Data like datetime represent time, in seconds, that has passed since 00:00 a.m. of 1 January, 1970.

Series array elements are indexed in the reverse order, i.e., from the last one to the first one. The current bar which is the last in the array is indexed as 0. the oldest bar, the first in the chart, is indexed as Bars-1.


Access to Timeseries and Indicator Data

dynamic arrays

An indicator buffer is a dynamic array of type double, whose size is managed by the client terminals

statically distributed arrays

operations of memory allocations

indexing direction in Arrays, Buffers and Timeseries

The default indexing of all arrays and indicator buffers is left to right. The index of the first element is always equal to zero.

changing the indexing direction: ArraySetAsSeries()

Receiving Price Data in indicators

asynchronous access

Organizing Data Access

Receiving data from a trade server

packed blocks of minute bars

Storing intermediate data

unpack

Synchronization of the terminal data and server data

Obtaining data on a necessary timeframe out of intermediate data

Symbol Properties

MarketInfo(_Symbol, MODE_DIGITS);

SymbolInfoInteger(_Symbol, );

SymbolInfoDouble();

SymbolInfoString();

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值