When trading forex, I noticed that the Bars.BarsSinceSession returns a value of 1 at the start of the new trading session (5pm EST) but also at 12:00 midnight.. Is there any way to solve this? I'm only interested in the 5pm EST point in time.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
BarsSinceSession
Collapse
X
-
BarsSinceSession
Hi,
When trading forex, I noticed that the Bars.BarsSinceSession returns a value of 1 at the start of the new trading session (5pm EST) but also at 12:00 midnight.. Is there any way to solve this? I'm only interested in the 5pm EST point in time.Tags: None
-
I am using the Forex template with the following settings:
It happens on all forex pairs.
When I enter the following code within the OnBarUpdate() statement I get the results:
Code:if(Bars.FirstBarOfSession) { Print(Time[0].ToString()); }
7/1/2015 5:30:00 PM
I know there is a non-tradeable period between 5pm and 5:30pm but I would think the session is marked at 5pm.Last edited by siroki; 07-06-2015, 01:21 PM.
Comment
-
Hello,
Thanks for your reply.
I used:
Code:if(Bars.FirstBarOfSession && FirstTickOfBar) { Print(Time[0].ToString()); }
Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by jm_test19, Yesterday, 10:20 PM
|
0 responses
4 views
0 likes
|
Last Post
![]()
by jm_test19
Yesterday, 10:20 PM
|
||
Started by Lbclotto, Yesterday, 10:18 PM
|
0 responses
6 views
0 likes
|
Last Post
![]()
by Lbclotto
Yesterday, 10:18 PM
|
||
Started by Adamcoin33, Yesterday, 09:47 PM
|
0 responses
11 views
0 likes
|
Last Post
![]()
by Adamcoin33
Yesterday, 09:47 PM
|
||
Started by AmazonGuy, Yesterday, 02:06 PM
|
3 responses
10 views
0 likes
|
Last Post
![]()
by AmazonGuy
Yesterday, 09:19 PM
|
||
Started by cre8able, Yesterday, 07:16 PM
|
1 response
12 views
0 likes
|
Last Post
![]()
by rockmanx00
Yesterday, 07:59 PM
|
Comment