简体   繁体   English

如何在不同的时间范围内获得 Time[0]?

[英]How can I get the Time[0] in different timeframes?

How can I get the Time[0] in different timeframe?如何在不同的时间范围内获得 Time[0]? I am only using one chart, Thank you in advance for helping.我只使用一张图表,在此先感谢您的帮助。

for example, my current open chart is in 1H timeframe, I want to get the candle open time in 1H timeframe, in 30M timeframe and 15min timeframe, without changing the timeframe of current open chart.例如,我当前打开的图表在 1H 时间范围内,我想在 1H 时间范围内、30M 时间范围内和 15 分钟时间范围内获取蜡烛打开时间,而不更改当前打开图表的时间范围。

To get Time value for the bar of specified timeframe use iTime() function.要获取指定时间范围柱的时间值,请使用iTime() function。

Example (both alerts have same results):示例(两个警报具有相同的结果):

Alert("Time[0]: ", Time[0]);
Alert("iTime[0]: ", iTime(Symbol(), PERIOD_CURRENT, 0));

For specified timeframe use enum timeframes .对于指定的时间范围,请使用enum timeframes

Check also iTime docs .还要检查iTime 文档

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

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