Announcement

Collapse
No announcement yet.

local time of a market on a chart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • local time of a market on a chart

    Is there a way to to display the local time of a market on a chart. I happen to live in Europe and follow the US markets. I would like to see the US time on the bottom of my chart. Changing my computer time is not what I'm looking for.

    Regards,
    Bart

  • #2
    Bart
    Not in the application itself however it could be done with an efs that writes the bar time with offset at the bottom of the chart and/or in the Cursor Window.
    You may want to send a suggestion to [email protected]
    Alex

    Comment


    • #3
      Alex, thanks for your reply. I've sent in a request at [email protected].
      Bart

      Comment


      • #4
        Hi,
        I've adapted a study that Alexis originally posted which will display the time zone at the bottom of the adv chart window.

        Paul
        Attached Files

        Comment


        • #5
          US EST + 5 Hours
          Attached Files

          Comment


          • #6
            - 5 Hours = US EST if your on London GMT

            To change the Time Zone simply add/subtract the hours in the study coding (displayed as +500 in coding below):

            drawTextRelative(0,0,((getHour()*100)+500)+getMinu te(),Color.blue,null,Text.RELATIVETOBOTTOM,"Arial" ,10,"Time2"+Cntr);


            Paul
            Attached Files

            Comment


            • #7
              I've made a couple of slight appearance changes.

              Paul
              Attached Files

              Comment


              • #8
                Hi all,
                Alex has created a new Time Marker study with the following enhancements (available via the EDIT STUDIES menu):

                1) OFFSET = can add or subtract time to obtain the desired time zone (eg: +5 or -5);

                2) CURSOR WINDOW DISPLAY = the time zone is now displayed in the Cursor Window for EACH bar;

                3) LINES = you can choose to display or remove the vertical lines.

                Thanks,
                Paul
                Attached Files

                Comment


                • #9
                  View of Alex's new study:
                  Attached Files

                  Comment


                  • #10
                    Paul informed me that there was a problem in the script ie that if the chart time plus/minus the Offset was greater than 24:00 the time displayed would show as 25:00, 26:00, etc
                    The attached revision of the efs should now take care of this issue.
                    Alex
                    Attached Files

                    Comment


                    • #11
                      The attached revision adds the option to switch on/off also the Time display at the bottom of the chart (previously was always on).
                      Alex
                      Attached Files

                      Comment


                      • #12
                        Alex,
                        Isn't possible to modify the code in such a way that the local time of the market you're following is retrieved automatically? I was thinking something like this:

                        PHP Code:
                        var time = new Date();
                        var 
                        timeAmsterdam time.getTimezoneOffset();
                        var 
                        timeNY time.getTimezoneOffset(x);//x is the unknown parameter for Eastern Timezone US; 
                        var timeDif timeAmsterdam timeNY
                        The only problem is the missing parameter x.
                        Bart

                        Comment


                        • #13
                          Bart
                          I do not know if that type of information is available to efs so I am not able to tell you whether it is possible or not. Someone from eSignal will be in a better position to reply to your question.
                          Alex

                          Comment


                          • #14
                            Hello Bart,

                            The formula below should help you. Please note that the .getTimezoneOffset() method of the date object does not adjust for Day Light Savings time, so the adjustment needs to be done within the formula. See function DayLightSavings(). For those countries that don't use Day Light Savings time remove the nDayLightSavings adjustment on line 29.

                            NewYorkTime.efs
                            Jason K.
                            Project Manager
                            eSignal - an Interactive Data company

                            EFS KnowledgeBase
                            JavaScript for EFS Video Series
                            EFS Beginner Tutorial Series
                            EFS Glossary
                            Custom EFS Development Policy

                            New User Orientation

                            Comment

                            Working...
                            X