Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
EasyLanguage to NinjaScript
Collapse
X
-
Can you tell me how to get bar data by bar number?
This is all happening at bar 1 so i cant use barsago, or High[1].
if ( BarsInProgress == 0 & CurrentBar == 1 )
{
I get the bar number
dt = Bars.GetTime(Bars.Count-1) ;
barno = Bars.GetBar(dt) ;
so how do I get the bar data using barno ? High, Low ?
Comment
-
I am trying to get all the bars in the last trading day, so its the right most bar, ie close and the bar before that, all the way back to the open. I am trying to make a checksum so I can verify the data otherwise I will tell the user to do a Historical update.
Comment
-
Hello RobinT,
Thanks for writing in.
You cannot send just a custom session. You would need to send your entire database file which includes the following and would replace these items for the other user.
ATM Strategy templates, Session templates, Instrument Lists / Custom Instruments, historical trade execution data, and various other NinjaTrader things
The database file is named ninjatrader.sdf and is located under Documents\NinjaTrader 7\db
There is not an option to exclude holidays in NinjaTrader 7. This feature has been added to NinjaTrader 8.
Comment
-
TimeZone
I want to get the NYSE start time in local time.
I use
Bars.Session.GetNextBeginEnd(BarsArray[0], 0, out sessionBegin, out sessionEnd);
in the OnStartUp()
but the time varies depending on the UK summer time for the first bar on the chart.
How do I get this information for today.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
605 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
351 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment