Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

if Historical -> return not working

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

    if Historical -> return not working

    Hi guys,

    I have a strategy here running on three Bars objects:
    - Daily
    - Minute
    - another Minute

    However, at the beginning of the code, the if (Historical) return; placed right after OnBarUpdate() won't work. Print statements show the strategy operating in historical data, live trading shows the same.

    Any ideas what additional setup is needed? Options I selected/ tried include "wait until flat before executing live" / "immediately submit live working hist. orders", no effect.

    A tryout strategy with three BarsObjects which are all MINUTE period types works, thus it must be related to the fact that there are both daily and minute BarsObjects being used.

    Regards
    n.i.n.j.n.a.

    #2
    Hi n.i.n.j.n.a,

    I attempted to recreate your scenario, but was unable to because it successfully ignored all historical prints. Can you please clarify what you are doing differently than I am?

    Attached is the strategy I ran on a Daily chart in real-time and in the Strategy Analyzer. No prints received on startup because everything was historical which is accurate behavior.
    Attached Files
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      Here's what comes out in the output window.

      I added the strategy in the strategies tab and ran it on ES 03-10, loading 10 days until today.

      **NT** Enabling NinjaScript strategy 'MultiSeriesHistorical/847dddcda79a4da980159476a52d8241' : On starting a real-time strategy - StrategySync=WaitUntilFlat SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=False CancelExitOrdersOnDisable=False MaxRestarts=4 in 5 minutes
      1 False 22.01.2010 09:30:00
      1 False 22.01.2010 09:40:00
      1 False 22.01.2010 09:50:00
      1 False 22.01.2010 10:00:00
      1 False 22.01.2010 10:10:00
      1 False 22.01.2010 10:20:00

      (...)

      2 False 02.02.2010 16:30:00
      2 False 02.02.2010 16:45:00
      2 False 02.02.2010 17:00:00
      2 False 02.02.2010 17:15:00
      2 False 02.02.2010 17:30:00
      2 False 02.02.2010 17:45:00

      Comment


        #4
        What version of NT7 are you on? Are you sure you are using 7.0.0.7?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Was on NT7b6 before, but just upgraded to NT7b7. Same story.

          edit: an interesting thing is that the Prints first show the whole time period for bar 1, then for bar 2 (see above). Bar 0 (daily) does not appear at all.
          When I keep the strategy running, the prints come out correctly and in the correct timely order.
          Last edited by noincomenojobnoassets; 02-02-2010, 12:36 PM.

          Comment


            #6
            At this point in time I can only suggest you try a 100% clean reinstall as you should not see any prints at all for any historical bars. Please delete your Documents/NinjaTrader 7 directory on uninstall prior to your reinstall attempt.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Sorry to say that, Josh - but I did exactly that.

              When installing 7b7, I ran into the "assembly error" that was suggested to be resolved by uninstalling, deleting the folder and then reinstalling fresh from scratch...

              Really strange. So you're entirely unable to reproduce the error? n.b.: I set up the strategy by right-clicking on the free area in the strategies tab, then set it up an enabled it (live account! maybe that's the difference? it was an IB papertrading account). I didnt use strategy analyzer or charts to start up the strategy...

              Comment


                #8
                Unfortunately I was unable to reproduce. B8 is coming out very shortly. Perhaps you can try it there and let me know then. Thank you for your efforts.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by iceman2018, Yesterday, 05:07 PM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by adaisguy, Today, 10:27 PM
                0 responses
                7 views
                0 likes
                Last Post adaisguy  
                Started by Jltarrau, Today, 10:18 PM
                0 responses
                8 views
                0 likes
                Last Post Jltarrau  
                Started by Option Whisperer, Yesterday, 09:55 AM
                4 responses
                30 views
                0 likes
                Last Post bltdavid  
                Started by Philippe56140, Yesterday, 02:35 PM
                2 responses
                21 views
                0 likes
                Last Post bltdavid  
                Working...
                X