Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sessions

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

    Sessions

    Hello

    NT8
    I need filter data by session time. Will OnMarketData() trigger for data events outside selected Trading hours in Data series settings? As I can see answer is 'no'. Correct?

    #2
    Hello ren37,

    Thank you for your post.

    OnMarketData() can still trigger outside of the selected session template for the chart. This is because only OnBarUpdate() is restricted to the bars on the chart. OnMarketData() is fed by the market updates from your data feed provider.

    Comment


      #3
      Ty

      I checked and found that OnMarketData() triggers only inside session time.
      This data are from OnMarketData() stored in volume profiles with CME US Index RTH session template applied for data serie.
      Begin - is the first tick of session time
      End - is the last tick of session time

      PHP Code:
      Total: 1638178, POC: 2160,25, Begin/End: 30.09.2016 8:30:00-30.09.2016 15:14:59, Range 2168,25-2150,5
      Total: 2111927, POC: 2146, Begin/End: 29.09.2016 8:30:00-29.09.2016 15:14:59, Range 2165,75-2137,25 
      
      code, NT8 RC1

      PHP Code:
              protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
              {
                  if (marketDataUpdate.MarketDataType == MarketDataType.Last)
                  {
                      ...
      
                      //if (SessionIterator != null && SessionIterator.IsInSession(marketDataUpdate.Time, true, true))
                      {
                          profiles[0].AddVolume(marketDataUpdate.Price, marketDataUpdate.Volume, marketDataUpdate.Time);
                      }
                  }
              } 
      
      Last edited by ren37; 10-04-2016, 05:34 AM.

      Comment


        #4
        Can anybody advise?

        Comment


          #5
          Will anybody from Ninja support respond me?

          Comment


            #6
            Hello ren37,

            Thank you for your response.

            Where are your prints? Are they inside OnBarUpdate() or OnMarketData()?
            What are you attempting to achieve that started these tests?

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              Hello ren37,

              Thank you for your response.

              Where are your prints? Are they inside OnBarUpdate() or OnMarketData()?
              What are you attempting to achieve that started these tests?
              Patrick
              Yes, data collected inside OnMarketData().
              Actually this is not a test but some indicator with debug output.
              This shows that OnMarketData() triggers only inside session. And this is not what is in your answer on my first question.
              Last edited by ren37; 10-05-2016, 12:48 PM.

              Comment


                #8
                ren37,

                What session template (Trading Hours) is selected on the chart?

                Comment


                  #9
                  CME US Index RTH

                  Comment


                    #10
                    Thank you, ren37.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    579 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    334 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
                    554 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    551 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X