Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Enter on Close
Collapse
X
-
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...
-
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,
SeppLast edited by MasterSepp; 08-20-2009, 11:17 AM.
Comment
-
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
-
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
-
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
-
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
-
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
-
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
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
574 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment