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 NullPointStrategies, Today, 05:17 AM
|
0 responses
52 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
48 views
0 likes
|
Last Post
|

Comment