Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Catch the end of a minute bar on a tick by tick OnBarUpdate event

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

    Catch the end of a minute bar on a tick by tick OnBarUpdate event

    I was wondering if there is a way to catch the end of a minute bar when updating a strategy on a tick per tick basis?

    I explain:

    protectedoverridevoid Initialize()
    {
    ....
    Add(PeriodType.Minute,
    1);

    CalculateOnBarClose =
    false;

    }

    #2
    No, since the end of the bar only would be determined as the first tick of the new bar was seen.

    BTW: No need for
    Add(PeriodType.Minute,1);
    Just execute your strategy on a 1 minute series.

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      No, since the end of the bar only would be determined as the first tick of the new bar was seen.

      Although, we are using tick to fire the OnBarUpdate event I thought there could have been a special event, a time event that could indicate the end of a bar even when there is not a new coming tick, something like:

      OnBarUpdate.UpdateType = NewTick

      or

      OnBarUpdate.UpdateType = EndBarContext(ContextNumber)

      Sometimes like this.

      Basically it would be nice to have different types of events that could trigger the OnBarUpdate event and then be able to check the type of events which triggered the OnBarUpdate event.

      It would be very helpfull to write fast accurate trading strategies.

      BTW: No need for
      Add(PeriodType.Minute,1);
      Just execute your strategy on a 1 minute series.
      I cannot do that as my strategies have limit orders but I want those orders to become market after a small time has passed or few quotations have occured. So I need to track down at the tick level my entry limit in the market to check if it was quoted or not.

      Knowing the end of the bar of a given context before the first tick of the next bar would be handy to update my entry or exit trigger one tick earlier.

      Thanks,
      Fabrice.

      Comment


        #4
        Thanks for your suggestion. We'll add it to the list.

        Comment


          #5
          Fabrice,

          Maybe is it possible to retrieve the time remaining from the indicator BarTimer. ( I do not know how to do it)

          Comment


            #6
            This is not possible.

            Maybe PercentComplete would work?

            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by mmenigma, Today, 02:22 PM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frankthearm, Today, 09:08 AM
            9 responses
            35 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by NRITV, Today, 01:15 PM
            2 responses
            9 views
            0 likes
            Last Post NRITV
            by NRITV
             
            Started by maybeimnotrader, Yesterday, 05:46 PM
            5 responses
            26 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by quantismo, Yesterday, 05:13 PM
            2 responses
            21 views
            0 likes
            Last Post quantismo  
            Working...
            X