Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Can someone explain this?

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

    Can someone explain this?

    Hi,

    I cannot understand this at all. I connect NT to Sim Data Feed, and point it to the ES 09-07 product. NT provided this data. I did not set this up.

    I then set up a tick chart, for a two tick bar, to display the data. I also wrote an indicator that was to pick up every tick, create a record of each one, and write the record out to a csv file. The last four fields of the tick record are based on this:
    • strMsg.Append(DateTime.Now.ToString()) // the local date time
    • strMsg.Append(",");
    • strMsg.Append(Bars.Period.Id.ToString()); //period id
    • strMsg.Append(",");
    • strMsg.Append(FirstTickOfBar.ToString()); //First tick of bar
    • strMsg.Append(",");
    • strMsg.Append(Bars.TickCount.ToString()); // Tick Count
    This is what I see in the first four records (only last four fields shown):
    • 2/09/2007 12:45:36 AM,Tick,True,1
    • 2/09/2007 12:45:36 AM,Tick,True,1
    • 2/09/2007 12:45:36 AM,Tick,True,1
    • 2/09/2007 12:45:36 AM,Tick,True,1
    Rather than the above, I am expecting something like this:
    • 2/09/2007 12:45:36 AM,Tick,True,1
    • 2/09/2007 12:45:36 AM,Tick,False,2
    • 2/09/2007 12:45:36 AM,Tick,True,1
    • 2/09/2007 12:45:36 AM,Tick,False,2

    Tell me NT is not dropping ticks.

    I wish I could export the data feed so that I can take a look at the data, but I can't. So I am hoping someone can tell me why I seem not to get two ticks to a bar in some records.

    Other records come out as expected, though.


    TIA

    #2
    Could the fact that you're doing this on a saturday night at 12:45 AM have something to do with it?

    You might want to check your time templates to make sure that it's not ignoring the weekends too.

    Comment


      #3
      Works as expected.

      Print(CurrentBar.ToString() + " " + FirstTickOfBar + " " + Bars.TickCount);

      on a 2 tick ES chart I get the following output.

      81772 True 1
      81772 False 2
      81773 True 1
      81773 False 2
      81774 True 1
      81774 False 2
      81775 True 1
      81775 False 2
      81776 True 1
      81776 False 2
      81777 True 1
      81777 False 2
      81778 True 1
      81778 False 2
      81779 True 1
      81779 False 2
      81780 True 1
      81780 False 2
      RayNinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Ray View Post
        Works as expected.

        Print(CurrentBar.ToString() + " " + FirstTickOfBar + " " + Bars.TickCount);

        on a 2 tick ES chart I get the following output.

        81772 True 1
        81772 False 2
        81773 True 1
        81773 False 2
        81774 True 1
        81774 False 2
        81775 True 1
        81775 False 2
        81776 True 1
        81776 False 2
        81777 True 1
        81777 False 2
        81778 True 1
        81778 False 2
        81779 True 1
        81779 False 2
        81780 True 1
        81780 False 2
        Ray,

        Thanks for your help. I tracked down what was causing my problem.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        1 response
        5 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X