Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceSession

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_PaulH
    replied
    Hello,

    Thanks for your reply.

    I used:

    Code:
    if(Bars.FirstBarOfSession && FirstTickOfBar) 
    { 
    Print(Time[0].ToString());
    }
    At first I too had a print at Midnight on some days. I then reloaded all historical data and that cleared up the issue. Please try reloading your historical data and testing again.

    Leave a comment:


  • siroki
    replied
    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:02:00 PM
    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.

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello siroki,

    Thanks for your post.

    What session template are you using?

    What forex instrument(s) are you using?

    Leave a comment:


  • siroki
    started a topic BarsSinceSession

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by DayTradingDEMON, Yesterday, 02:10 PM
6 responses
39 views
0 likes
Last Post rockmanx00  
Started by Pointtoni, Yesterday, 11:41 PM
3 responses
35 views
0 likes
Last Post jenacie.com  
Started by Nate G, 03-17-2025, 02:53 PM
4 responses
72 views
1 like
Last Post timko
by timko
 
Started by several, 03-18-2025, 03:53 AM
11 responses
184 views
1 like
Last Post timko
by timko
 
Started by Amelie4262, Today, 10:45 AM
0 responses
14 views
0 likes
Last Post Amelie4262  
Working...
X