Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy.Historical Bug? Using multiple Dataseries

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

    Strategy.Historical Bug? Using multiple Dataseries

    Hi
    I think I have found a bug with the Historical Property in Strategy.

    If you have a single DataSeries in Strategy it works fine however if you have multiple it then does not seem to work.

    Please see the attached Strategy, I have been running it on Currencies with Initial Period set to 1 Minute.

    One would expect That every 1 and 5 minutes that the strategy would log a message only from the time the strategy was started, however it loggs a message for every bar loaded.
    Thanks

    Mike
    Attached Files
    Last edited by upshon; 02-08-2011, 06:05 AM.

    #2
    Mike, I was unable to reproduce here - you just see a ton of logs / prints as both series produce them for each tick received (COBC false) - is the timestamp you see really before the current bars's one when loading it up?

    Comment


      #3
      Sorry, its late at night I sent you the wrong version.

      If you can change CalculateOnBarClose = true;

      You get the same result.

      Cheers

      Mike

      Comment


        #4
        Thanks Mike, can't reproduce here still - are you sure you satisfy BarsRequired for all series in the strategy?

        Comment


          #5
          Hi,
          I also have a problem with the Historical flag in my Strategy. I always get the value true, I refer Real Time Data. I call on my strategy functions in a DLL. Currently it is 21:51. a test print but shows me the following:. Historical: 21.06.2011 21:51:00 / True.

          In the sample strategy 'SampleBreakoutStrategy' Historical flag works fine.

          What could be wrong?

          Thanks and regards,
          Eddy
          Last edited by ejzj1; 06-21-2011, 01:51 PM.

          Comment


            #6
            Hi Eddy, since the sample works fine I guess the issue must be in your custom code / setup used - could you please clarify how you would work with the historical property here?

            Comment


              #7
              Hi Bertrand,

              my strategy-code is very simple. I start a Windows form (which is inside a DLL) in the OnStartup-Method . Each event with OnBarUpdate then I send to the form. The Historical flag is always true.

              Code:
                      protected override void OnStartUp()
                      {
                          startMTIWorkbench();
                      }
              Code:
                      protected override void OnBarUpdate()
                      {
                          Print("Historical: " + Time[0] + " / " + Historical);
                          if (!sendTicks)
                              return;
              
                          StockPoint pt = new StockPoint(Time[0], Open[0], High[0], Low[0], Close[0], 0);
                          workbench.addBar (pt, Historical, ignoreTicklist);
                      }
              If i use the code in an indicator, it works fine.

              Edit
              If I comment out 'workbench.addBar (pt, Historical, ignoreTicklist);', Historical works fine.
              Last edited by ejzj1; 06-22-2011, 09:32 AM.

              Comment


                #8
                Please try the same in a regular NinjaScript strategy and ensure BarsRequired is fulfilled for all series used / added in the script - would you see the same issue then?

                Comment


                  #9
                  If I set BarsRequired to 0 or 1 or 20, the result is the same. Historical = true.
                  It must lie in the DLL call. Because if I comment out the DLL call, the ninja script code work fine.

                  The script uses only 1 dataseries (FDAX 09-11).

                  Comment


                    #10
                    I saw your edit Eddy, I would unfortunately not have an idea why this DLL call would impact Historical. Calling DLL's from NinjaScript is possible, but we can't really support that scope here.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    653 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    370 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    577 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X