Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Zen-Fire time data questions?

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

    Zen-Fire time data questions?

    I need some help understanding how time is used in building chart bars.

    1. Does the Zen-Fire data get sent with a time stamp of when the trades were executed?
    2. If # 1 is true then is the time stamp portion of the data accessible?
    3. Are the chart bars built based upon the "market" time stamp or are they built upon my computer time?

    Basically,what I would like to do is have the chart start building bars beginning at 8:30:00 a.m. CME time. I can try and synchronize my computer clock as closely as possible but it is never quite exactly the same as CME time. When I set my session begin/end times is it using my computer time or exchange time? Thanks.

    #2
    1. Yes
    2. Yes
    3. The Zen-Fire time stamps are used but converted to local PC time
    RayNinjaTrader Customer Service

    Comment


      #3
      Perfect!!!! - I think. Thank you.
      Last edited by higler; 07-08-2008, 02:18 PM.

      Comment


        #4
        For my clarification I would like to give the following example:

        I am in Mountain Time (Longmont, CO) time. Assume that my computer is one minute off and shows 7:29:05 a.m. MT while the correct time is really 7:30:05 a.m. MT and 8:30:05 a.m. Central Time (CME).

        I have set my session setting to open at 7:30:00 a.m. When the Zen-Fire data comes accross to my computer then what is the time converted to? If a trade comes accross Zen-Fire time stamped at 8:30:05 CT (CME time) does it get "corrected" to the correct trade time of 7:30:05 a.m. my time or does it get "corrupted" based upon my one minute clock error? Hope this makes sense.

        Comment


          #5
          - Tick time stamps come from Zen-Fire and are converted to Mountain Time Zone --> There is no shifting of the time, just conversion from Central to Mountain.
          - Session times are based on your local PC clock
          - If your PC clock is slow by 1 minute, you will then lose 1 minute of data for building bars.
          RayNinjaTrader Customer Service

          Comment


            #6
            Thank you. Is there a way that I can start building the bars on my chart based upon the first time stamp that comes from the CME at 8:30:00 a.m Central Time Zone or thereafter so that I don't have to be precisely "synched" with my computer time?
            Last edited by higler; 07-08-2008, 02:39 PM.

            Comment


              #7
              No, its best to ensure your PC is in sync.
              RayNinjaTrader Customer Service

              Comment


                #8
                Thank you. I will do my best. I was wondering if this might be a feature that could be considered for a future upgrade so that I could accumulate and plot the data based upon the Zen-Fire exchange trade times. Perhaps a setting on the Session begin/end times that allows you to choose "based upon local computer time" or "based upon exchange data time". I compare my charts frequently with another trader and we sometimes have some small discrepancies because, try as we may, we don't get our computer times "synched" exactly even though we both try to synch to NIST. If we were able to base the Session begin/end times based on the Zen-Fire trade time stamps then it seems like we should both be able to plot exactly the same charts. e.g. All data with Zen-Fire trade time stamp >= 8:30:00 a.m. CT (7:30:00 a.m. MT) etc., gets built into bars. Same with session close. Thanks.

                Comment


                  #9
                  Will add to our list for future consideration.
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by higler View Post
                    I need some help understanding how time is used in building chart bars.

                    1. Does the Zen-Fire data get sent with a time stamp of when the trades were executed?
                    2. If # 1 is true then is the time stamp portion of the data accessible?
                    Originally posted by NinjaTrader_Ray View Post
                    1. Yes
                    2. Yes
                    Ok, so if questions 1 and 2 are answered with a Yes, can you give some sample code to use for a strategy/indicator to access the time stamps for the ticks sent by Zen-Fire. Not trying to start building bars from the time data, but would rather like to get the price data from the very first tick issued at a certain time.

                    For example: What would I use to access the price data of the very first tick that Zen-Fire has time stamped for 7:30:00am(mst)? Of course I am asking for the Zen-Fire time stamp on the tick price. Totally non-dependant from what my PC says the time is.

                    Originally posted by higler View Post
                    I was wondering if this might be a feature that could be considered for a future upgrade so that I could accumulate and plot the data based upon the Zen-Fire exchange trade times. Perhaps a setting on the Session begin/end times that allows you to choose "based upon local computer time" or "based upon exchange data time".
                    Or even an option to "Sync PC time w/Exchange upon connection: True/False" and/or "Sync PC time w/Exchange every -- minutes"

                    Originally posted by NinjaTrader_Ray View Post
                    Will add to our list for future consideration.
                    I, and I believe many others, after thinking about it, would think that this feature would be very valuable and appreciated.

                    Thanks,
                    insomniac

                    Comment


                      #11
                      Please check out the OnMarketData() method.

                      http://www.ninjatrader-support.com/H...arketData.html
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_Ray View Post
                        Please check out the OnMarketData() method.

                        http://www.ninjatrader-support.com/H...arketData.html
                        Yes, I have looked into this before. I started my own thread in regards to these questions, but it looks as though it was deleted. I don't really want to hijack this thread because the questions will end up different. But here goes.

                        Please correct me if I am wrong but it is my impression that even with CalculateOnBarClose = false, the Time[0] is still based on the current bar that is being formed, not the time of that tick. Am I wrong. The Time[0] is also going to give me the time based on my PC too. I want to utilize the time stamp that is sent by Zen-Fire.

                        So if I need to utilize the Price of the very first tick that comes in at Market Open, which is 7:30am(mst) for me, but my PC says it is 7:29:58am, I miss the actual open tick price. I would rather grab the very first tick price based on the first tick that Zen-Fire has time stamped for 7:30:00am.

                        Is this doable, without relying on my PC time?

                        insomniac

                        Comment


                          #13
                          Your understanding is correct however -

                          - You would need to run a chart where the sesison start time was earlier than 7:30 since OnMarketData() will still be filtered for start/end time. The time stamp of the tick is a server side time stamp --> But it is converted to local time zone.
                          RayNinjaTrader Customer Service

                          Comment


                            #14
                            Ok, so you say my understanidng is correct, but I need to know how to use the OnMarketData() in a strategy to have it give me the price of the very first tick that comes in at exactly 7:30:00am.

                            I have written many different strategies for myself, but I am certainly not a skilled C# programmer. I am however very good at trial and error and can usually figure this stuff out by modifying samples. However, this one has me confused.

                            I don't exactly know what the most efficient and correct coding will be to take the e.Time value that is time stamped at 7:30:00am by Zen-Fire, make sure it is the first tick that arrived at exactly 7:30:00am, and then grab the price value from that first tick using e.Price and return it to OnBarUpdate() for me to utilize.

                            insomniac

                            Comment


                              #15
                              Programming against OnMarketData() we consider advanced programming. I believe we even state that in the Help Guide. I can provide you some guidance but you are really on your own since the questions you ask are outside of NinjaScript and deal with basic programming.

                              Also, why not just make sure your PC clock in in sync?

                              What you will want to do is create a variable that you set to true once you see the first tick at your desired time. In OnBarUpdate() check to see if this is true. To determine if a tick has met your desired time requirements, you will need to do some comparisons on the e.Time property which is a DateTime structure which has a number of methods that you can use to do what you need. You will need to read up on it here http://msdn.microsoft.com/en-us/libr...me(VS.71).aspx.
                              RayNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              608 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              355 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              560 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              561 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X