Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter on Close

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

    #16
    AFter some trying I think that I found the error. It has to be with the Add(PeriodType.Minute,1) command. I tried a strategy, added just this command, tried again... and there were no trades...

    Comment


      #17
      Do you spot any errors in the Log tab when the strategy runs? Please attach the full strategy zip or cs file and I take a look on my end, thanks

      Comment


        #18
        Ok, I think I found now the problem: It was in the BarsSinceEntry() command.
        I use now BarsSinceEntry(0,"",0). But I don't know, which number I have to insert in the last place (actually: 0). What means "Number of bars that have elapsed since the last entry based on ... number of entries ago"? Don't understand this one. But anyway, it seems to work. Will check it now more carefully for other errors.


        Regards,

        Sepp
        Last edited by MasterSepp; 08-20-2009, 11:17 AM.

        Comment


          #19
          Great, this parameter refers to the bars that have elapsed since the last entry was executed - http://www.ninjatrader-support.com/H...inceEntry.html

          Comment


            #20
            By the way I realised, that I don't have to use the BarsInProgress() command. I guess, if I leave it out, the conditions refer on the primary bar series?

            Regards,

            Sepp

            Comment


              #21
              This depends on which bars series you execute to, so in your case you need the overload with the BarsInProgess parameter.

              Comment


                #22
                Yes but I backtested now the same strategy 3 times: the first time without any BarsInProgress command. The 2nd time with if(BarsInProgress == 1) and the third time with if(BarsInProgress == 0) and got everytime another result. So what's the difference between using the BarsInProgress command and not using it?

                Sepp

                Comment


                  #23
                  Sepp, checking for BarsInProgress will determine when a condition is evaluated (based on which bars series calls the OnBarUpdate) - http://www.ninjatrader-support.com/H...BarSeries.html

                  Comment


                    #24
                    I've already checked that site, but I didn't see an explanation, what BarsInProgress really does. As I understand, BarsInProgress sets the bar series, in which the conditions have to be filled. But what happens, when I just leave it out? Which bar is then used for the conditions? Both after each other?

                    Sepp

                    Comment


                      #25
                      Sepp, which BarsInProgress you can check with bars object has called the OnBarUpdate() method, which gives you the control to decide when certain code should be evaluated - http://www.ninjatrader-support.com/H...struments.html

                      Please take a look at this link under the section - 'Truely Event Driven OnBarUpdate() method'.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      647 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      368 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      108 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      571 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      573 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X