Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies tab: impossible to tell what status of strategy is

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

    Strategies tab: impossible to tell what status of strategy is

    Hi,

    I tried to start up my strategies for the week at the beginning of the Far Eastern forex trading session and NT7b16 has given me several pop-up messages and logged several errors.

    I can see that 17 out of 22 of my strategies are now running but 5 are not and I can't tell what status they are in.

    I have set "Immediately submit live working historical orders" so they should all start up, load their required data and begin trading.

    I started all 22 at once so some are obviously queued up but it's not displayed that it's pending. It's also not clear whether these strategies have become unstable and must be removed due to the errors, or whether they are still trying to resolve something in order to start or whether they just need re-activating again.

    They look as if they are just inactive, but choosing the right-click menu 'Active' command or clicking on the 'Active' checkbox has no effect.

    I have stopped and restarted NinjaTrader and now I'm trying it again to see what happens. Failing that I guess I'll have no choice but to remove the strategies and start from scratch.

    This is the type of error:

    30/05/2010 23:42:04 Strategy Unable to cancel out unmapped live orders. Strategy 'TrendFollower007/ab857dff7c4145eb9f5366fda293bc65' was not started.
    30/05/2010 23:42:04 Strategy CancelAllOrders failed4: barsInProgress=0 historical=False Orders.Count=5 instrument='$EURCHF' exp=Index was outside the bounds of the array.

    The first thing that I think is really important is that there is some kind of status shown - so that I can tell exactly what is required even if it's a reboot of the whole machine, or if it just requires some patience to wait a bit longer.

    PS I removed the strategies, closed NT, re-opened it and re-added them all and it now launched everything OK.
    Last edited by adamus; 05-30-2010, 04:55 PM.

    #2
    Hello adamus,

    Can you please let me know if the issue recurs and if you see any similarities between the first occurrence now that it launched Ok. Send me your log and trace files as well.

    I will forward your suggestion to include a status display on such an occassion to our development team and ask them if they can add this to the list of future considerations of the software.

    Comment


      #3
      Jason,

      here are the trace and the log.

      I can't see it happening again until next Sunday. I think it was the orders that I left in place when I shut down on Friday night. NT just couldn't deal with them when I restarted.

      I had to stop and restart NT just now to get the trace file, and on restart, NT behaved itself.

      [just deleted some stuff from here because I want to start another thread with its own title - it's not relevant to this title]
      Attached Files
      Last edited by adamus; 05-31-2010, 06:27 AM.

      Comment


        #4
        Unfortunately the files do not include the time stamp of occurrence.

        Please let me know if the issue recurs next Sunday and tell me if you had active orders from Friday again. Send me the log and trace files of Friday and Sunday in that case.

        Comment


          #5
          Jason,

          I've got a serious problem. After posting these messages, I left my computer running and have just got back to check the results. There have been about 5 bars or so and there should have been about 25 orders and 5 to 10 trades, but the strategies are just dead in the water. They are green, they are enabled, they appear to be running but they are not putting orders out as they should.

          What is the problem with the trace file? You say there's no time stamp of occurrence - do you need higher level of logging or a trace file from earlier?

          Comment


            #6
            Hello adamus,

            The trace file did not list the time stamp of the error you included in post #1.

            You will need to debug your strategy and check why it does not function as you expect. You can find general debug information at the link below.


            Could it be you experienced a disconnection during the time you was not behind the PC? Please check the Log-tab for any error messages.

            Comment


              #7
              Hi Jason,

              I'm still not clear what you mean. Do you mean that the trace file did not contain the error at all? Or do you mean that the error was missing the time stamp and I need to configure something to get it included next time?

              Regarding the strategy, it operated fine up until the weekend and I didn't change anything in it. In fact there's two different strategies that don't work which did work all last week. I have a couple of very basic test strategies that do work & submit orders, but they weren't set up on Friday or Sunday when these problems appeared. Therefore it seems unlikely to me that the code is wrong, since it worked all last week.

              I didn't experience any disconnection, none that I see in the logs.

              Any other checks to do, you advise?

              Comment


                #8
                The trace file you provided did not contain the error.

                Could it be the strategies use different settings compared to Friday and Sunday? Perhaps 'Calculate on bar close' is currently set to True, while it was set to False the previous time? Do you perhaps have a different session template selected?

                If there were no changes and it worked before, the strategies should still function. Do they function if you remove and re-add them?

                Comment


                  #9
                  From Friday to Sunday, I didn't touch a thing except Alt-F4 and then 'enable'.

                  I don't use session templates - or do you mean the saved defaults via the right click menu on the strategy properties?

                  I have removed them and added them back in several times now and can't see why they don't work but other strategies do. Maybe I sleep-walked to my computer and changed the code in the night. One related issue that I'm not familiar with is the usage of the strategy performance windows, with live, live+historical and historical only. I'm looking at one strategy now that doesn't show any historical orders at all.

                  I would like to go further back in the strategy performance chart window, but I'm not sure how I would tell NT to load up more history. Is that possible?

                  I'm looking into the strategies right now so I might have some more for you later.

                  Comment


                    #10
                    Can you please post your log and trace files for today. Perhaps they contain a clarification as to why those strategies did not work.

                    What exactly do you refer to as 'strategy performance windows'? Am I correct you refer to the Account Performance-tab? If so, it will display historical executions that occurred. If you cannot go back further in time, it indicates the strategy did not trade on previous dates.

                    You can backtest the strategy in the Strategy Analyzer on the historical data you specify. More information can be found at the link below.

                    Comment


                      #11
                      Hi Jason,

                      more chaos at this end with nothing working. I don't know what it is with this strategy but it's not a happy bunny.

                      I backtested the strategies on all the instruments I cover and put Print statements in the onBarUpdate, onStartUp and initialize events and they all work.

                      Two of them in backtesting up to now have positions on.

                      I enabled all the strategies and thought it wasn't a good sign when no orders were generated immediately. There should be at least 2 stops for the strategies that historically have positions on.

                      There were however initialize and onStartUp print-outs in the output window.

                      Worse, when the hour ticked over, there was no print statement in the output window from the onBarUpdate.

                      I've included the recent traces and logs, but I didn't see anything in there myself that looked helpful.

                      Thanks
                      Attached Files

                      Comment


                        #12
                        Can you please go to Tools-->Options-->Strategies-->NinjaScript-tab. What setting is enabled for 'On starting a real-time strategy'? Could it be you have 'Wait until flat before executing live' enabled? More information can be found at the link below.


                        I checked your files and I did not see anything helpful either.

                        Comment


                          #13
                          That would have been too easy, Jason. I checked it just now. It's set to "immediately submit working historical orders".

                          Since I can run other strategies normally, what I'll do is start off with a running skeleton and add my script to it line by line. At some point presumably it will break, or if not at least it will be working again.

                          The reason why I didn't think it is the script it that I have two seperate strategy scripts, and both of them died. However there is some of my code shared in the User Defined Methods script, so perhaps there's a bug in there somewhere.

                          Comment


                            #14
                            Ah! Before I started coding it up again, I thought I'd try it on a shorter time frame.

                            Normally I run it on 60 mins bars, so I put it on one instrument using 1 min bars and it's running.

                            Comment


                              #15
                              I've set up the strategy with 30min bars and that works.

                              However again when I set up a 60 min strategy, it failed to start - OK, so it's status is green and the checkbox is 'enabled', it initialized and fired an 'onStartUp' event, but it didn't do the historical trading calculation (I have them all set to 100 bars required) - which is obvious because it didn't fire any onBarUpdate events for the historical period, and it's not firing them now for live processing.

                              So any ideas what more I can do to nail this?
                              Last edited by adamus; 06-02-2010, 05:50 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              597 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
                              555 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X