Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

using tick data(intrabar granularity) in strategy analyer

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

    using tick data(intrabar granularity) in strategy analyer

    Hi,
    I have been creating anf testing strategy without major issues for sometime now.

    My current strategy needs to be intrabar and I find that when optimizing using strategy analyzer, the strategy basically only calculate on bar close. Is there any way to enable it to submit order before closing current bar. Please note the strategy works fine i.e as intended using market replay or when live. It will nice to backtest/optimize on the same principles before going live.

    I will give an example...

    I won't to go Long if the current ask goes above the close of the previous H1 bar. I cannot do this for backtesting or optimizing.

    Please help!
    regards

    #2
    Hello SuperDriveGuy,

    Yes, please set 'Calculate on bar close' to False for the strategy used in the Strategy Analyzer.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi Jason,

      I can't find that option. Please see attached screenshot.

      Regards
      Attached Files

      Comment


        #4
        My apologies, I was not that clear. You will need to add it in the code of the strategy.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Hi Jason,
          I already have that in my strategy...

          protected override void Initialize()
          {
          SetProfitTarget("", CalculationMode.Ticks, ProfitTarget);
          SetStopLoss("", CalculationMode.Ticks, StopLoss, false);
          TraceOrders = true;
          CalculateOnBarClose = false;
          }
          regards

          Comment


            #6
            To clarify, when backtesting/optimizing/etc. your strategy will always be processed as if CalculateOnBarClose = true. Only in real-time can you get intrabar processing.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Hi Jason,
              I have another thread open with Whitmark, and he is suggesting using a primary H1 and a secondary M1 etc data series to achieve intrabar order optimization, unless there is another workaround or hidden feature??

              Will NT7 enable me to do what I want?
              Regards

              Comment


                #8
                NT7 will not provide intrabar backtesting. Whitmark's suggestion is the one you want to follow. You can find a reference sample in the Reference Sample section demonstrating this.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks Josh and Jason!

                  Comment


                    #10
                    Hi Guys,
                    Just a thought currently I have market replay recorded a day at a time, can I record for multiple days.

                    My aim being to capture market replay information for say 30 days and then instead of backtesting/optmizing against historic data, I can replay against the 30 days replay data recorded earlier. I will have to do manual iterations but I am having a hard time, doing the intrabar order placement and strategy definition.

                    TIA

                    Comment


                      #11
                      Currently you cannot continuously roll 30 days worth of replay tape. They will be broken up into individual days.
                      Josh P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by PaulMohn, Today, 03:49 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post PaulMohn  
                      Started by inanazsocial, Today, 01:15 AM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Jason  
                      Started by rocketman7, Today, 02:12 AM
                      0 responses
                      10 views
                      0 likes
                      Last Post rocketman7  
                      Started by dustydbayer, Today, 01:59 AM
                      0 responses
                      2 views
                      0 likes
                      Last Post dustydbayer  
                      Started by trilliantrader, 04-18-2024, 08:16 AM
                      5 responses
                      23 views
                      0 likes
                      Last Post trilliantrader  
                      Working...
                      X