Technical Indicators for MetaTrader 4

Special Offer!

Time Left to Buy:

Up to 25% OFF

Shopping cart

The cart is empty

MetaTrader 4

Top Rated Products MT4

Request a price Boom500 Scalper
Vhutshilo Evidence Masithembi
4.06667 5 15 Product
250 $188 $ KTS poverty killer robot
Thato Modiba
3.85714 5 7 Product
5 500 $4 125 $ Bonnitta EA MT5
Ugochukwu Mobi
4 5 3 Product

LocaltimeVS1

localtimevs1-logo-200x200-8033
Request a price

Free updates are included

We accept crypto: BTC, ETH, BCH and more...

30-Day Money Back Guarantee
100% Guarantee of Originality

Information

Indicators
MetaTrader 4
hcy3511
1.1
5

Overview

这段代码是一个用于 MetaTrader 4 (MT4) 平台的MQL4指标脚本,主要功能是在图表上实时显示以下信息:

  1. 当前K线的剩余时间(格式为  X分Y秒 )。

  2. 本地时间(格式为  HH:MM:SS )。

代码的主要组成部分包括:

  1. 初始化函数  OnInit

    • 创建文本对象用于显示时间和剩余时间。

    • 计算并打印本地时间与服务器时间的差异。

    • 初始化定时器,每1秒触发一次  OnTimer 。

  2. 反初始化函数  OnDeinit

    • 删除文本对象。

    • 销毁定时器。

  3. 计算函数  OnCalculate

    • 计算当前K线的剩余时间。

    • 获取本地时间并格式化。

    • 更新文本对象的内容和位置,确保显示信息实时更新。

  4. 定时器函数  OnTimer

    • 每1秒调用一次  OnCalculate ,强制更新时间显示。

  5. 辅助函数  FormatRemainingTime

    • 将剩余时间(秒)格式化为  X分Y秒  的字符串。



Recently Viewed

100 $75 $ Weis Wave Scouter
Jean Carlos Martins Roso
99 $74 $ Macd Pro System
Magdalena Estefania Colonna
50 $38 $ Ping
Vagif Shabanov
Request a price ARFX Quantum Wave
Ricky Andreas
Results 1 - 4 of 4

30-Day Money Back Guarantee

If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: support@fx-market.pro.
Refund requests received more than 30 days after purchase will be rejected.

Email Us Now! Support is available 24/7
by Email: support@fx-market.pro

Do You Need Help?
Click Here To Start Live Chat

Contact Us

Image

Search