Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multiday strategy calculate on bar close=false

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

    multiday strategy calculate on bar close=false

    Hello to everyblody, i have a problem to solve with my strategy.

    It works as a multiday strategy leaving often open positions day by day and it works with the option "calculate on bar close=false".
    Unfortunately every night i have to restart ninja because of i lose the connection with my provider patsystem. When i restart it and i run again the strategy i lose the trade made before because ninja works with "calculate on bar close= true". So my strategy is not correlated with the positions in my account anymore.

    How can i fix it? Definetely i need that my strategy when i restart ninja "remembers" the open positions of the last daytrade.

    Thank you

    #2
    pragma, when you restart a NinjaScript strategy, you'll need to ensure the sync between your strategy and your account position is present, if not manual interaction is needed according to those instructions - http://www.ninjatrader-support.com/H...tPosition.html

    Comment


      #3
      Hello Bertrand i know that but my problem is a little bit different.
      Figure out that on day 1 i go long at a price of 121,10 and with a target of 122.
      On day 2 when i restart ninja and the strategy, because of the historical data of day 1 are calculated on bar close and not tick by tick, i find that my position is now short and not long anymore and with a different target because of the differences between a strategy that works on bar close and the one that works tick by tick. In this case i have a long position opened on my account but my strategy works as if my position is short. And i can't manually syncronize the account with the strategy, there would be a too big difference in my trades.
      So i need that the strategy re-begins from the last tick by tick order and not from the last bar close order.

      Comment


        #4
        pragma, this is unfortunately not supported, as when you restart in the morning a new strategy instance is created. NinjaTrader 7 will offer more options to address strategy persistence across sessions - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

        Comment


          #5
          ok, just to know...can i backtest a strategy tick by tick with ninjatrader 7?
          now it works only on barclose...if it's possible with the 7 i can wait till then...(by the end of september right?)

          thanx

          Comment


            #6
            I'm not sure I follow what you want to do, what you could do for example right now with NinjaTrader 6.5 is submitting orders to other charts / bars object to simulate executing those trades intrabar - http://www.ninjatrader-support2.com/...ead.php?t=6652

            Comment


              #7
              Yes I know that, but what i need is different. My strategy doesn't work only intraday but can leave some positions opened day by day and works tick by tick. When I restart ninja (for patsystem connection lost) i have my past trades changed because ninja calculates these past trades of the last day on barclose and not tick by tick. It's the same problem of the backtesting...ninja 6.5 doesn't allow backtesting tick by tick, but only on bar close. So i think that if the version 7 can allow to backtest tick by tick i can solve my problem when i restart ninja, finding the past trades with the right prices (tick by tick).

              Comment


                #8
                pragma,

                There is no backtesting tick by tick simply because there is no such granularity. When you open a historical 1 min chart, for instance, there is simply no information about what happen with each of those 1 min bars. You only have OHLC snapshots of each 1 min. This is unfortunately the reality of the matter. Without additional granularity there is just no way to do this.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                633 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                364 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                567 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                568 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X