Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
How to restrict bar data to only that for the current session
Collapse
X
-
How to restrict bar data to only that for the current session
I have noticed that there are times when even if the Days to Load setting in the Data Series of my MES chart is set to 0 (Load data based on: Days), the data loaded in the chart is that of 2 days or two sessions to be precise. I have tried different ways to restrict the bar data to only that of the current session but without avail. Is there a way to accomplish this? -
Hi mbesha, thanks for your post.
For a chart, the data is loaded literally based on days. So if I made a chart with 1 day on it right now, exactly 24 hours worth of bars will be printed to the chart. In a script, one could detect the beginning bar of a session using FirstBarOfSession, or in NinjaTrader 8 use a Session Iterator to partition data by session.
For visual confirmation of session begin/end you can set a unique color for the Session Break Line in the DataSeries menu.
Please let me know if you have any further questions.Chris L.NinjaTrader Customer Service
-
Hello mbesha,
Thanks for your post.
Another option would be to change the data series parameter "Load data based on" from "days" to "bars" and then specify the number of historical bars you want to see the chart start with. Please note that as new bars come in they will add to (the count of) initial bars to load for period that you are connected to real time data. When you restart Ninjatrader, the chart would then again only load the number of bars specified.
Reference: "How to edit Data Series parameters" : https://ninjatrader.com/support/help...price_data.htm
Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Gibranes, Today, 10:05 AM
|
5 responses
21 views
0 likes
|
Last Post Today, 01:55 PM | ||
Started by love2code2trade, Today, 01:45 PM
|
0 responses
3 views
0 likes
|
Last Post Today, 01:45 PM | ||
Started by 09try, 03-29-2024, 01:27 PM
|
9 responses
81 views
0 likes
|
Last Post
by ntcat
Today, 01:16 PM
|
||
Started by ninza33, Today, 06:28 AM
|
4 responses
17 views
0 likes
|
Last Post
by ninza33
Today, 12:38 PM
|
||
Started by ScottWalsh, Yesterday, 04:29 PM
|
4 responses
18 views
0 likes
|
Last Post Today, 12:00 PM |
Comment