Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer - added time frame session template

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

    Market Analyzer - added time frame session template

    Scenario:
    I have market analyzer window. It has one custom indicator column that adds a secondary time frame and sends an alert. I have specified an RTH template for the market Analyzer.

    Issue:
    It still fires outside the rth hours. Is this because it is an added timeframe and does not use the market analyzer session template but uses the default session template for the instrument?

    #2
    Hello,

    Thank you for the post.

    By default, the AddDataSeries method should use the selected trading ours of the Primary instrument unless you specifically use the syntax that includes TradingHours.

    Could you provide a sample of the indicator and how you are currently adding the data series? Also could you provide a sample of the logic from OnBarUpdate?

    This could help determine what is happening.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Jesse

      I am using Ninja 7 so I can't specify a session template on my Add. I have "Add(PeriodType.Tick, 1);" and yes it fires for every tick. I added some debug info on my alert which includes the session template. It shows it is using the correct session but is firing outside that session time range. I am using the ninja supplied " CME FX Futures RTH" which is 7:20am to 2:00pm central time. It is currently 6:40PM Central US time but is still firing now. In the market analyzer window the instrument flashes yellow background on the instrument number when a tick hits but I would think it shouldn't even do that outside of the session hours even without an indicator column.

      Comment


        #4
        Jesse

        As a test I created a new market analyzer. I specified " CME FX Futures RTH" but is firing outside of that range. I set the market analyzer default session template before I added the instruments.

        I can filter out the session data myself but shouldn't have to.

        I added session end and session begin to my debug data.
        DateTime sessionEnd;
        DateTime sessionBegin;
        Bars.Session.GetNextBeginEnd(BarsArray[BarsInProgress], 0, out sessionBegin, out sessionEnd);

        My local computer time zone is set to New Zealand. I get session begin correctly as NZ time 2:20:00AM 02/24/2117 time and an end time of NZ 9:00:00am 02/24/2017 NZ time.

        The begin and end time is correct but it is firing outside that range.
        Last edited by ct; 02-23-2017, 07:33 PM.

        Comment


          #5
          Jessie

          The plot thickens. Below is a partial copy from the output window where I logged the data from the Market Analyzer.
          Print("Include " + Times[BarsInProgress][0] + " " + Instrument.MasterInstrument.Name+ " - " + BarsInProgress);


          As you can see my 1 tick added time frame (BarsInProgress = 1) has the correct time but Bars In Progress = 0 all have a time = 9:00am which is the current RTH session end time.

          At least I now know why it is firing but can you tell me why it is doing this? or is this an undocumented feature that stamps anything out of range to the end of session time? I can work around it but sure didn't expect this.

          Any clue on this one? It blew my mind.

          --------------------------------------------------------------

          Include 2/24/2017 9:00:00 AM 6N - 0
          Include 2/24/2017 7:13:41 PM 6N - 1
          Include 2/24/2017 9:00:00 AM 6N - 0
          Include 2/24/2017 7:13:41 PM 6N - 1
          Include 2/24/2017 9:00:00 AM 6N - 0
          Include 2/24/2017 7:13:41 PM 6N - 1
          Include 2/24/2017 9:00:00 AM 6E - 0
          Include 2/24/2017 7:13:41 PM 6E - 1
          Include 2/24/2017 9:00:00 AM 6E - 0
          Include 2/24/2017 7:13:41 PM 6E - 1
          Include 2/24/2017 9:00:00 AM 6E - 0
          Include 2/24/2017 7:13:41 PM 6E - 1
          Include 2/24/2017 9:00:00 AM 6E - 0
          Include 2/24/2017 7:13:41 PM 6E - 1
          Include 2/24/2017 9:00:00 AM 6E - 0
          Include 2/24/2017 7:13:41 PM 6E - 1
          Include 2/24/2017 9:00:00 AM 6E - 0
          Include 2/24/2017 7:13:41 PM 6E - 1
          Include 2/24/2017 9:00:00 AM 6J - 0
          Include 2/24/2017 7:13:41 PM 6J - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Include 2/24/2017 9:00:00 AM 6A - 0
          Include 2/24/2017 7:13:41 PM 6A - 1
          Last edited by ct; 02-24-2017, 09:08 AM.

          Comment


            #6
            Hello,

            Thank you for the reply, please ensure to post items in the appropriate forums going forward. I have moved this to the NT7 forums.

            I do see that you are selecting the template from the MA window, this does appear that the indicator will keep running in this case. I do see that selecting the template in the Instrument manager instead does prevent the item from running past the session end. I would like to note you still see the MA flash for updates, only the logic of the indicator would be prevented past the session end time.

            Could you try to change the session for the instrument in the instrument manager, and then restart the platform and retest? On my end, I am able to see this working to prevent the indicator running past the end of the session.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            41 views
            0 likes
            Last Post alifarahani  
            Working...
            X