fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Display time (hh:mm:ss) using comment

    Questions & Answers
    2
    3
    785
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dscoles last edited by

      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

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        MetaTrader 4 or MetaTrader 5?

        Try with Value -> Time

        1 Reply Last reply Reply Quote 0
        • D
          dscoles last edited by

          😆
          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/7fjlee

          The 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)+"");
          
          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          A
          E

          9
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors