fxDreema

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

    show time in comment

    Questions & Answers
    3
    12
    2795
    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.
    • E
      elninobrown last edited by

      Hi, is it possible to show time like 08:31 in comment on the chart?
      I have to show:

      "once an hour" -> formula: "Value/Time/Time Mode: Now" + "Value/Time/Time Mode: Time Stamp: 00:00" = timeperhour

      I go into comments and insert the formula "timeperhour" but i only see numbers on the chart!

      Thx for your help

      1 Reply Last reply Reply Quote 0
      • E
        elninobrown last edited by

        08:31 is a stupid mistake- It have to be shown as 08:00 for example 😉

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

          Which project is this?

          Low level, but there is a function to convert the time into a normal text in whatever format you want: http://docs.mql4.com/convert/timetostring

          1 Reply Last reply Reply Quote 0
          • E
            elninobrown last edited by

            I use fxdreema local. I think you can't see the project. Comment on chart is very helpful to check the conditions and formulas. So I thought, why don't use it for some time stuff...

            I want to use time for close time of a trade. I know I can use Expiration Mode with specified time like 30 minutes. But I want to use the result from a formula block. For example the formula block result 08:31. If the trade open 07:12 it have to close at 08:31 (like the formula block result). But if I put the Custom-Formula result in Expiration Mode, nothing happens. I don't know how I can test the formula block.... thats the problem!

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

              I don't know what kind of value do you have from your formula block, but normally the time is in this universal format: http://www.epochconverter.com/

              As you can see, the time is the number of seconds since 1 Jan 1970. All the default options for "Expiration mode" are everything, but this time format. Whatever you enter, it is converted to this format. But you can also use this format as well - Expiration Mode -> Custom -> Value -> Numeric -> put the variable here and add some seconds to it (30 minutes are 1800 seconds).

              1 Reply Last reply Reply Quote 0
              • E
                elninobrown last edited by

                OK! I understand!

                I test it:
                Formula block: Value->Time->Timestamp-> "08:00" + Value -> Numberic-> "1800" = result: "test"
                Condition block: If Value->Time-> Now "test" == Formula result: "test", then draw a vertical line

                This works! There is a vertical Line in the chart at 08:30! perfect! BUT why I can't put in the formula block a Value -> Time->Components -> 30 minutes? Isn't it the same like Numeric -> 1800?

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

                  No, it's not. The result will be 00:30 at the current day 🙂

                  "Components" is the widest option, where you can write exact moment of time - year, month, day... You can get the Unix time of your birthday. If you have parameters where the value is empty, then the current value is used, from the current time. You see that Year is empty by default, which means that the Year will be 2015 (or older year if you backtest). If you write 1992 there, it will send you back in time 🙂

                  1 Reply Last reply Reply Quote 0
                  • E
                    elninobrown last edited by

                    ok- I understand!
                    Two questions about this topic:

                    1. How can I get the result of 30 Minutes If I have 08:00 and 07:30 ??? I want to know how long the distance is. To put it in formula like:
                      Formula: candelone (08:00) - candeltwo (07:30) does not work because the Score is 00:30 I think and thats a real time stamp. Isn't it?

                    ("candelone" and "candeltwo" are two scores from other formulas!

                    1. You write down, that I convert the numeric into a time on chart comments. HOW???? I never used this bevor or put a code into a EA manualy ❓

                    realy realy thax for your help!

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

                      The EA inside does not work with values like 08:00, it works with values like 1420809893 - the number of seconds since 1.1.1970.

                      Condition -> Value -> Time - these options here are convertors. You choose how you want to enter the time, and then this is converted into something like 1420809893.

                      Why 1420809893? Because it is one and only format, it is universal, this is normal integer value that holds everything in it and can be stored easily in every database.

                      The difference between 07:30 and 08:00 is 30 minutes, which is 30*60 seconds, which is 1800 seconds.

                      It's a little bit complex with the comment 🙂 Because the block treats all values as they are, it does not know whether the values are time integers or not. I will see if I can do something about this.

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

                        Is it possible to show an example of a couple of ways of using comments?

                        I see that there is Line1, Value1, Line2 has Value2. Is there a way to have the line have more than one value in a logical phrase such as "MACD Val1 = " + MACD_Val1?

                        Thanks,

                        Dwight

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

                          There are multiple pairs of Labels and Values. Label = the name of the thing, the title which does not change. Value = it's value.

                          In your case:
                          Label => MACD Val1
                          Value => MACD_Val1

                          Just try it!
                          Recently I added brand new block for comments and I renamed the old one to Comment (ugly).

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

                            Thank you. I will try it.

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            Online Users

                            E
                            T
                            S
                            A
                            I
                            A
                            E
                            S
                            E

                            21
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors