Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Real time vs OnBarUpdate

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

    Real time vs OnBarUpdate

    Hi,

    is there a way to execute orders in a strategy at the moment it crosses the desired point, as opposed to on the next bar after it has crossed that point? Is there a way to tell the strategy that it doesn't have to wait for the bar update, but rather execute the order immediately when the conditions are met?

    Thanks.

    #2
    Hello werido,

    Yes, this is controlled with CalculateOnBarClose.

    False = Logic is processed with every incoming tick.
    True = Logic is processed at the close of a bar.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Hello werido,

      Yes, this is controlled with CalculateOnBarClose.

      False = Logic is processed with every incoming tick.
      True = Logic is processed at the close of a bar.

      Thanks. Now, if I set CalculateOnBarClose to True in the strategy code but set it to False in the option when applying the strategy to the chart, will that False override the "True" that's in the code and calculate it on each in coming tick?

      Thank you

      Comment


        #4
        Yes, the selection made in the gui (false in this case) will override whatever is written in code.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thank you!!

          Comment


            #6
            wait, all my strategy conditions in the code are under OnBarUpdate, so even if I change CalculateOnBarClose to false, do I need to change the OnBarUpdate to OnTickUpdate or something like that to make the strategy execute the moment it meets the conditions and not wait for the the bar to update?

            Comment


              #7
              No, there is only one property that controls this - CalculateOnBarClose
              Ryan M.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, 04-17-2024, 06:40 PM
              6 responses
              49 views
              0 likes
              Last Post algospoke  
              Started by arvidvanstaey, Today, 02:19 PM
              4 responses
              11 views
              0 likes
              Last Post arvidvanstaey  
              Started by samish18, 04-17-2024, 08:57 AM
              16 responses
              61 views
              0 likes
              Last Post samish18  
              Started by jordanq2, Today, 03:10 PM
              2 responses
              11 views
              0 likes
              Last Post jordanq2  
              Started by traderqz, Today, 12:06 AM
              10 responses
              21 views
              0 likes
              Last Post traderqz  
              Working...
              X