Announcement

Collapse
No announcement yet.

isInSession()

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

  • isInSession()

    Hi,

    I try to use isInSession() with ES & SPX and it always returns true. Is there a trick to it?

    Thanks

  • #2
    Is there any documentation on isInSession()? Nothing showed up in the Help file or a search of this forum.

    Comment


    • #3
      Check this link

      isInSession( )


      Takes the current time and determines if that time is within the session of the symbol being charted. Returns true or false.

      Example:

      var bInSession = isInSession(); //based on current time, are we in session?


      isDWM()
      isDaily()
      isIntraday()
      isMonthly()
      isWeekly()
      isTick()
      isRawTick()

      Comment


      • #4
        I am with balligil. What is the trick? I tried several symbols many that I know are closed and it always returns true. I also tried inserting a symbol - e.g. isInSession("IBM").

        Is this akin to FunctionParameter.BOOLEAN? Nice idea, but doesn't work.

        Comment


        • #5
          Hello Gavishti,

          FYI, I've put in message to development to find out if this function is currently working properly. Logically, I would expect this function to be returning false right now (1:40pm PST) on IBM, for example. What I'm noticing is that if you set your time template to the symbols regular trading hours, isInSession() will return false. If however, your time template is set to 24-hour, the function is returning true. I'll let you know what I find out.

          FYI, that link Steve pointed out is to Chris Kryza's Help File tool, which has the most current EFS reference material. I recommend downloading the .chm version. I use it every day. I've also put a request into our web team to have our reference material updated in the EFS Help Center.
          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


          • #6
            Hello Gavishti and balligil,

            I just heard back from development on this. isInSession() looks at your current clock time and compares it to the start and end time of the chart's time template. If your current clock time is within this range the function returns true, otherwise it will return false.
            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


            • #7
              Jason,

              This makes sense, but it is poorly named.

              I didn't understand how it could do what the name implied. After all the exchanges don't send out any signals to indicate that they are in session or not in session. Therefore the only way to determine if something is in session would be to set up a data base based on symbol/exchange and what their regular trading hours are, and somehow make sure that the data was provided correctly for each TZ...and even then it wouldn't take into account special days.

              Garth
              Garth

              Comment


              • #8
                They somehow do it in the Quote Window. Something is signaling the c and s.

                However, the naming of the current function should be something closer to isChartActive() than isInSession.

                Comment

                Working...
                X