Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Last hour bar of day missing
Collapse
X
-
Last hour bar of day missing
Hi- I'm noticing a strange issue: I'm on 1 hr bars and in my strategy and I print out a time stamp in the OnBarUpdate() method along with a summary of my holdings, among other things. However I'm missing the 4 pm bar for each day. Strange thing is the 4 pm bar does eventually show up the following morning in my output window on market open. Also any trades that happen on that missing 4 pm bar gets bought the next morning as well. Could it be an issue with the session manager?Tags: None
-
Hello ciro1963,
Thank you for your note.
A bar is not closed until the next bar opens, and in this case, that would be the next session.
If you wanted to have an action run at 4PM everyday, you could check that the time was after a certain time in OnMarketDepth, then do the action, set a bool to prevent that action from being done again until tomorrow. I put together a sample which demonstrates this.
See OnMarketDepth section of our helpguide,
Please let us know if you need further assistance.Attached FilesAlan P.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
41 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
1 response
11 views
0 likes
|
Last Post
by bltdavid
Today, 02:44 PM
|
||
Started by port119, Today, 02:43 PM
|
0 responses
7 views
0 likes
|
Last Post
by port119
Today, 02:43 PM
|
||
Started by Philippe56140, Today, 02:35 PM
|
0 responses
7 views
0 likes
|
Last Post Today, 02:35 PM | ||
Started by 00nevest, Today, 02:27 PM
|
0 responses
7 views
0 likes
|
Last Post
by 00nevest
Today, 02:27 PM
|
Comment