Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check if the time is in Asian trading hours

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

    Check if the time is in Asian trading hours

    is it possible to use a particular exchange, eg Tokyo exchange and then check when i am running a strategy on MES (which I am running in 24-7 mode) if I am in Asian session?

    In general, I would love to leverage the different session times you have set up.

    Thanks for pointing me in the right direction

    #2
    Hello crystalet,

    Thank you for the post.

    Yes you can configure a specific default exchange for an instrument. You can set a default in the instrument manager. https://ninjatrader.com/support/help...GeneralSection

    The most simple way to do something within a specific timeframe would be to make a time condition. If the session you want to use is always going to be the same and you know the specific times you could hard code the values like the sample here: https://ninjatrader.com/support/help...ightsub=totime

    I look forward to being of further assistance.

    Comment


      #3
      I guess what i am asking if I can have an instrument, which has specific trading hours, but still access the information of another instrument on another exchange. Let me give a simplified example:

      Imagine that I want to know if Tokyo opens and the S&P mini is up in the first 5mins of Tokyo, then I want to go long SP and close when Tokyo closes, how would I access this information in my custom strategy in ninjascript?

      Comment


        #4
        Hello crystalet,

        I guess what i am asking if I can have an instrument, which has specific trading hours, but still access the information of another instrument on another exchange.
        That would be a multi instrument strategy. Each instrument would have its own trading hours and exchange defined in its instrument definition. For each series the script adds OnBarUpdate is called while each instrument is in session.

        To do the actions you are asking would also involve using time conditions because OnBarUpdate would not be called for the second instrument when it was out of session, the bar closes when the first tick of the new session is seen. The instrument which is in session could use time conditions to know the bar/tick after Tokyo closed to use the last values from the second series.

        This would require manual coding, you can find some information on this topic in the following guide: https://ninjatrader.com/support/help...lightsub=multi

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X