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 Hwop38, 05-04-2026, 07:02 PM
|
0 responses
173 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
328 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
252 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
354 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
181 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment