Kindly, FREEN
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Bars.BarsInSession property?
Collapse
X
-
Thanks Bertrand! Yes, I´m aware this:
if(Bars.LastBarOfSession)
{
Print((Bars.BarsSinceSession+1).ToString());
}
Sorry to ask without having tried yet, would it be possible to trigger the OnBarUpdate events only at first session, do the Initializing/declaring with collected data from that session, then run the the OnBarUpdate events as usually?Last edited by FREEN; 07-20-2012, 07:09 AM.
Comment
-
"Although this method is called once on the start of an indicator or strategy, there are times that this method is also called (Opening an indicator dialog) when you may not expect it to."
Q 1: Is it possible to do the Initializing after OnBarUpdate event/-s?:
OnBarUpdate
-collect data
First Session end flag
Initialize
OnBarUpdate
-main code
Q 2: List.Add during first session? Thanks, I´ll look into if that does the trick.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment