Display time (hh:mm:ss) using comment
-
Is it possible to include the time on the screen by having it be part of a comment block? (I would like it to be grouped together with other information)
I attempted to use a "text" type and put this in the "source" field: TimeToStr(Time[2],TIME_SECONDS)
I then tried to put TimeToStr(Time[2],TIME_SECONDS) into a text variable and then use the text variable in the comment block.
Nothing doing. With the first one, I just get "TimeToStr(Time[2],TIME_SECONDS)" displaying on the screen. With the second one, I get a blank on the screen following the prompt.
Thanks,
Dwight
-
MetaTrader 4 or MetaTrader 5?
Try with Value -> Time
-

Well there I am again blind as a bat... Thank you. Yes, value -> time.In case anyone else wants to know how to use a string result of a function, here is what I did:
I put the following into a string: ""+TimeToStr(Time[2],TIME_SECONDS)+""
Notice the double quotes and the concatination on both ends of the function call...
http://prntscr.com/7fjleeThe resulting code works, so I assume it would work with other string generating functions.. This is what FXDREEMA generated (in MT4 code):
tmpstr=_text(""+TimeToStr(Time[0],TIME_SECONDS)+"");