Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Advancing the active or current bar
Collapse
X
-
Advancing the active or current bar
In my strategy, I am using <IsFirstTickOfBar> when making an entry but there are times that I would like to make the entry on the next bar. Is there a way to advance that bar, I tried nesting <IsFirstTickOfBar> but it did not work for me.Tags: None
-
Hello galsermil,
You cannot advance the data or manipulate the data in any way, the way your script processes is a result of how it processes the bar data and incoming data.
You would have to make your own logic which handles that situation. A simple way would be to use a bool variable. At the time when you see the entry should be submitted you could set the variable to true, on the next bar if the variable is true submit the order. You can also use more complex ways like storing the CurrentBar to check if a number of bars elapsed.
-
Thank you. I think I have myself between a rock and a hard place because I am using <IsFirstTickOfBar> in order to get my entry as close to the Open of the bar as possible but the signal to not use that bar is produced during that bar, usually quite early but not always. I suppose that I will have to find my warning at bar[1] or not at all..
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
45 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
31 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment