简体   繁体   English

如何在过去的MQL4中从蜡烛获得GMT偏移

[英]How to get GMT offset from candle in the past MQL4

It is actually an MQL4 question. 这实际上是一个MQL4问题。

What I actually need to code is an indicator, which draws a vertical line on the day the timezone of the broker has been changed. 我实际需要编写的是一个指标,该指标在经纪人的时区已更改的日期绘制了一条垂直线。 This is happening once on every 6 month. 每6个月发生一次。

Any idea how to get the GMT offset of a candle in the past or anything similar ? 任何想法如何获得过去的蜡烛的GMT偏移量或类似的东西?

Thanks for your help guys! 感谢您的帮助!

int TimeGMTOffset()datetime TimeGMT()在MQL4中可用,但是您不知道什么时候是GMT偏移,因为TimeGMT()对于任何柱都返回相同的值。

Long story short: 长话短说:

Based on what was available in 2017Q3, there is the only chance for MQL4-code to ask an external process. 根据2017年第三季度的可用数据,MQL4代码唯一有机会询问外部流程。

Doable: 可行的:

The external process ( be it a python, tz -equipped, code or other ) must be informed not only of the Bar's "indicated"-time, from iTime(...) , but it must also have gotten be configured, where is the Trading-Server located ( the Broker-specific setup ) + whether all the Broker-Servers keep their geo-located-TimeZone or still keep some Broker's administrative-centre "united" TimeZone-location, even if not physically present in such administratively-given-TimeZone location. 不仅必须从iTime(...)告知外部流程(无论是python,配备tz代码还是其他代码iTime(...) ,而且还必须对其进行配置,其中所定位的交易服务器(特定于经纪人的设置)+所有经纪人服务器是否保留其地理定位的时区,还是仍然保留某些经纪人的管理中心“统一”的时区位置,即使实际上不在该管理位置中,给定的TimeZone位置。

Ie London access-point may present itself to be in UTC +0000 geo-location zone, but yet may follow UTC { +0300 | 即伦敦访问点可能位于UTC +0000地理位置区域,但可能遵循UTC {+0300 | +0400 }-administratively-enforced-TimeZone location(s). +0400}-行政强制实施的时区位置。

The same applies for what rules do actually enforce the Broker's Server DLS-Time { On | 同样的规则适用于实际执行代理服务器DLS时间的规则。 Off }-to happen in reality. }-在现实中发生。 US geo-located Broker's Servers may yet be subordinated for non-US DLS-Time shift dates. 美国地理位置经纪人服务器可能尚未服从于非美国DLS时间转换日期。

So, indeed, not an easy or any straightforward step to ask today, what was the actual geolocated time in some far moment of time in the past. 因此,实际上,今天要问过去过去很长一段时间里的实际地理位置时间不是一个简单或简单的步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM