Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy intraframe timing

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

    Strategy intraframe timing

    I have several strategies which are not working as well as possible due to the strategy waiting until the next bar to calculate.

    I have tried CalculateOnBarClose=false. No luck.

    The pip difference is significant-- sometimes just by waiting one extra frame for enter and exit turns a would-be gain into a loss, and always considerably lessens the gains.


    Is there any way to calculate conditionals (>, <, CrossAbove,Etc.) within the live frame ?

    #2
    Faspomy,

    Are you backtesting? CalculateOnBarClose is always true on historical data. Since your entry signal bar is already closed by the time your strategy evaluates it it is not possible to trade on that bar. Next available trading time is the next bar's open.

    The only option available to you when backtesting is to try to add more granularity into the strategy with another bar object. Please see this reference sample: http://www.ninjatrader-support.com/v...ead.php?t=6652
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      thanks for the info. I have backtested these strategies, but am citing results made while forward testing.

      Comment


        #4
        Faspomy,

        I guess I don't follow then. When using CalculateOnBarClose = false your strategy will run through its logic on every single tick.

        I am not sure what you mean by calculating additional conditions within a live frame. You can calculate anything you want within any OnBarUpdate() call.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Josh,

          I have attached a pic to this message.

          The calculations seem to be happening on the next bar after the cross. I have tried every variation of calculation (CrossAbove, >, >=) and have ended with identically time-shifted results. The Strategy invariably buys and sells one bar after the red/blue cross.
          Attached Files
          Last edited by Faspomy; 10-16-2008, 10:21 AM.

          Comment


            #6
            Faspomy,

            Are you sure these are real-time trades? Even though you are connected real-time, historical bars are still treated as if it were backtesting.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Ah-ha !

              Thanks Josh !

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              596 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              343 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              556 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              554 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X