Clock Indicator For MT5
Table Of Contents:
- Clock Indicator For MT5
- 安装Clock Indicator For MT5
- Clock Indicator For MT5参数
- Clock Indicator For MT5缓冲区
- 守则主要部分
Clock Indicator For MT5显示3个相关时间。您将根据计算机的设置查看当地时间。您将看到实际的GMT时间,并且会看到MT5经纪人的时间。
安装Clock Indicator For MT5
通过上面的表格下载指标后,您需要解压缩zip文件。然后,您需要将文件clock.mq5复制到MT5安装的文件夹MQL5Indicators中。之后,请重启MT5,然后您将能够在指标列表中看到该指标。
Clock Indicator For MT5参数
Clock Indicator For MT5具有要配置的9 参数。
input color Color1=clrBlue;//color of local time input color Color2=clrMagenta;//color of server time input color Color3=clrTeal;//color of GMT time input int FontSize=11; //font size input type_font FontType=Font14; //font type input ENUM_BASE_CORNER WhatCorner=CORNER_LEFT_LOWER; //location corner input uint Y_=20; //vertical location input uint X_=5; //horizontal location input string LableSirname="Clock 1";
Clock Indicator For MT5缓冲区
Clock Indicator For MT5提供0 缓冲区。
守则主要部分
int OnCalculate( const int rates_total, // amount of history in bars at the current tick const int prev_calculated,// amount of history in bars at the previous tick const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[] ) { //---- string sTime1,sTime2,sTime3; sTime1=TimeToString(TimeLocal(),TIME_SECONDS); sTime2=TimeToString(TimeCurrent(),TIME_SECONDS); sTime3=TimeToString(TimeGMT(),TIME_SECONDS); //---- SetTLabel(0,Lable1,0,WhatCorner,ENUM_ANCHOR_POINT(2*WhatCorner),X1,shift_1,"Local Time: ",Color1,sFontType,FontSize); SetTLabel(0,Lable1_,0,WhatCorner,ENUM_ANCHOR_POINT(2*WhatCorner),X2,shift_1,sTime1,Color1,sFontType,FontSize); SetTLabel(0,Lable2,0,WhatCorner,ENUM_ANCHOR_POINT(2*WhatCorner),X1,shift_2,"Brokers Time: ",Color2,sFontType,FontSize); SetTLabel(0,Lable2_,0,WhatCorner,ENUM_ANCHOR_POINT(2*WhatCorner),X2,shift_2,sTime2,Color2,sFontType,FontSize); SetTLabel(0,Lable3,0,WhatCorner,ENUM_ANCHOR_POINT(2*WhatCorner),X1,shift_3,"GMT: ",Color3,sFontType,FontSize); SetTLabel(0,Lable3_,0,WhatCorner,ENUM_ANCHOR_POINT(2*WhatCorner),X2,shift_3,sTime3,Color3,sFontType,FontSize); //---- ChartRedraw(0); //---- return(rates_total); } //+------------------------------------------------------------------+