How can I add Broker's Time (GMT) ?

 

Hello

I want to use the GMT Hour of my Broker in my custom indi. Please somebody help me how can I ge that information.


million thanks


mithetnme

 
mithetnme:

Hello

I want to use the GMT Hour of my Broker in my custom indi. Please somebody help me how can I ge that information.


million thanks


mithetnme


Hi mithetnme,


Maybe will be helpfull for you:

your broker server time: TimeToStr(TimeCurrent(), TIME_DATE | TIME_SECONDS)

your computer local time: TimeToStr(TimeLocal(), TIME_DATE | TIME_SECONDS)


You can use Hour() under TimeCurrent(Hour())-+YOUR GMT TIME ZONE


Regards,
 
puncher:


Hi mithetnme,


Maybe will be helpfull for you:

your broker server time: TimeToStr(TimeCurrent(), TIME_DATE | TIME_SECONDS)

your computer local time: TimeToStr(TimeLocal(), TIME_DATE | TIME_SECONDS)


You can use Hour() under TimeCurrent(Hour())-+YOUR GMT TIME ZONE


Regards,


Hello puncher

Really thanks for your help. I tried TimeCurrent(Hour()) it shows error. But I got an idea from your advice and I used " TimeHour(TimeCurrent()) " and " TimeMinute(TimeCurrent()) " . Now its I got the result what I want.


Thank you again

mithetnme

Reason: