Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IsFirstTickOfBar triggering each 15 seconds

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

    IsFirstTickOfBar triggering each 15 seconds

    Hi,

    I put your sample indicator IsFirstTickOfBarAddedSeriesTest on GBPUSD 1 minute chart. I activated Show Tick Replay in the General Options->Market Data and Tick Replay on my data serie.

    Why I receive OnBarUpdate event each 15 seconds with IsFirstTickOfBar = true ? This is the result from my script output window:

    2020-09-16 10:54:45 | State: Realtime, BIP: 1, IsFirstTickOfBar: True, Bars TickCount: 1, Volume[0]: 11, BarsInProgress: 1, NewBar: True
    2020-09-16 10:55:00 | State: Realtime, BIP: 1, IsFirstTickOfBar: True, Bars TickCount: 1, Volume[0]: 2, BarsInProgress: 1, NewBar: True
    2020-09-16 10:55:15 | State: Realtime, BIP: 1, IsFirstTickOfBar: True, Bars TickCount: 1, Volume[0]: 12, BarsInProgress: 1, NewBar: True
    2020-09-16 10:55:30 | State: Realtime, BIP: 1, IsFirstTickOfBar: True, Bars TickCount: 1, Volume[0]: 1, BarsInProgress: 1, NewBar: True
    2020-09-16 10:55:45 | State: Realtime, BIP: 1, IsFirstTickOfBar: True, Bars TickCount: 1, Volume[0]: 8, BarsInProgress: 1, NewBar: True
    2020-09-16 10:56:00 | State: Realtime, BIP: 1, IsFirstTickOfBar: True, Bars TickCount: 1, Volume[0]: 27, BarsInProgress: 1, NewBar: True
    2020-09-16 10:56:15 | State: Realtime, BIP: 1, IsFirstTickOfBar: True, Bars TickCount: 1, Volume[0]: 2, BarsInProgress: 1, NewBar: True

    Than you for your help.
    Last edited by XTradeX; 09-16-2020, 09:11 AM.

    #2
    Hello, thanks for your post, and welcome to the NinjaTrader forum.

    It looks like you are printing the time stamp of the primary series, or you are running the script OnEachTick on a 15 second bar period. If that is the case, you will only have time stamps for each 15-second interval. So even if the first tick of the bar was at 56:14, it would print as 56:15

    I look forward to assisting.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi Chris,

      I verify the chart and I am on 1 minute chart. I tried with 2 minutes chart and I also get an event each 15 seconds.

      Comment


        #4
        Hello XTradeX, thanks for your reply.

        My test is working fine. I get a print out on the 00 second each time the bar closes. Could you provide a test script?

        Code:
        protected override void OnBarUpdate()
        {
            if(State == State.Realtime)
            {
                if(IsFirstTickOfBar)
                {
                    Print(DateTime.Now);
                }
            }
        }
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CoffeeOutlaw, Today, 09:10 AM
        0 responses
        3 views
        0 likes
        Last Post CoffeeOutlaw  
        Started by traderharley, Today, 08:46 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by NinjaCustomer, Today, 08:22 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Started by n8dogg59, Today, 07:58 AM
        2 responses
        9 views
        0 likes
        Last Post n8dogg59  
        Started by CoffeeOutlaw, Yesterday, 07:33 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_Kate  
        Working...
        X