Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting Trade Price on Tick Data

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

    Getting Trade Price on Tick Data

    Hi All:

    Is there a way to get last trade price on tick data? Specifically I have CalculateOnBarClose = false & I would like to have the current trade price at 6:30am. If this works on Market Replay Data that would be even better.

    Any help would be appreciated.

    #2
    Hello Geekodude,

    Thank you for your note.

    You can use Close[0] to receive the last traded price from the tick data.
    http://www.ninjatrader.com/support/h...html?close.htm
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply. But what is the logic to get the trade EXACTLY at 6:30am. This is what I have that does not work.

      if(ToTime(Time[0]) = 63000)

      Do something....

      I believe ToTime only works when the bar is closed. Is there a way to get a trade at a certain time when CalculateOnBarClose = false? Or is there some way to use multiple session templates to achieve this?

      Comment


        #4
        Geekodude,

        DateTime.Now would work for getting the most recent time from the Tick coming in.

        ToTime(DateTime.Now)
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          OK great. ToTime(DateTime.Now) works relative to the computer clock in real-time so to speak. Now the ideal situation is to also have code logic that works with market replay tick data. What would be the equivalent to parse market replay tick data to see what price trade occurred at 6:30am in market replay data? I guess what I am really asking for is there an equivalent call that gives the time relative to the CHART?
          Last edited by geekodude; 05-07-2014, 02:28 PM.

          Comment


            #6
            Geekodude,

            Yes, however this is unsupported so I don't have documentation on it.

            Bars.MarketData.Connection.Now

            That will work for both Market Replay and Live
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            160 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            308 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X