Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enabling strategy: historical executions executed live!

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

    #16
    Originally posted by NinjaTrader_RyanM View Post
    Thanks. It will be good then to identify why you are getting these results. Can you save a copy of your strategy, strip out anything unnecessary to see the issue and share this with us. The simpler the better. You can attach here or mail to [email protected] Attn: RyanM
    Hi Ryan,
    I'm sending you the strategy now.

    Please could you just test it out to make sure that you can see the bug too.

    I'd hate to spend hours stripping out unnecessary stuff to find that you can't reproduce the bug at your end anyway.

    These are the settings I'm using:

    07/01/2011 12:01:27 Strategy Enabling NinjaScript strategy 'Test/01486a66ba31453fb368f68b2c1316d2' : On starting a real-time strategy -
    StrategySync=WaitUntilFlat
    SyncAccountPosition=False
    EntryHandling=AllEntries
    EntriesPerDirection=1
    StopTargetHandling=PerEntryExecution
    ErrorHandling=StopStrategyCancelOrdersClosePositio ns
    ExitOnClose=False
    Set order quantity by=Strategy
    ConnectionLossHandling=Recalculate
    DisconnectDelaySeconds=10
    CancelEntryOrdersOnDisable=True
    CancelExitOrdersOnDisable=False
    MaxRestarts=10 in 5 minutes

    Plus see attached screenshot.
    Attached Files
    Last edited by adamus; 01-07-2011, 06:06 AM.

    Comment


      #17
      I have found a work-around.

      Hopefully the strategy that I emailed you is demonstrating the bug.

      If so, edit the strategy and comment out lines 100 and 101. This means the strategy will no longer use multiple time frames. With it, the problem disappears. I hope this can give your bug fixers someething to work with.

      This is with NT7 R2 which I just downloaded.

      Comment


        #18
        adamus,

        Thanks for the strategy. You have a lot of custom code and we will need a streamlined script as well as steps to test and confirm an issue here.
        Ryan M.NinjaTrader Customer Service

        Comment


          #19
          Hi Ryan,

          glad you got the strategy.

          Like I said above (post 17) can you please just set up the strategy and try running it to see if you get the same problem as me. I don't want to spend a whole heap of time streamlining my script for you if the bug doesn't even show up for you.

          I just realised, you'll need a directory in your default folder called "NTlogs" where my strategy needs to write its log files.

          Comment


            #20
            adamus,

            This is because you do not have enough bars. Please see here for more information on ensuring you have enough data before beginning any logic: http://www.ninjatrader.com/support/h...nstruments.htm

            The part of interest for you are the if-statements for CurrentBars[] checks.

            -In your code you added a 377 minute series.
            -In your settings you are saying BarsRequired = 377.
            -This means your strategy and anything it does before all Bar series have at least met the BarsRequired setting is invalid and irrelevant.
            -You set days back to be 100 days back.
            -100 days back on a forex instrument with a 377 min series yields only 301 bars. You can confirm this yourself by printing CurrentBar count on a 377min chart separately.
            -This means your settings would never satisfy the BarsRequired requirement for the 377 minute series.
            -This means anything your strategy does under these settings are irrelevant.

            What all this boils down to is...
            1. Add in the CurrentBars[] checks
            2. Either increase your days back to achieve enough data for the 377min series to have at least 377 bars. Or decrease the BarsRequired setting to something below 301 bars which is the number of bars that exists on that series.
            Josh P.NinjaTrader Customer Service

            Comment


              #21
              OK, thanks for the explanation.

              Have a good weekend.

              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