Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars.FirstBarOfSession

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

    Bars.FirstBarOfSession

    I am using Bars.FirstBarOfSession to do a logic check when the market opens but it is returning false on the first bar. I am using it with FESX 0615 1min bars and CalculateOnBarClose is set to true. Could this be because it will only be true when the bar closes?

    #2
    Hello,

    Thank you for the question.

    Yes this would apply to the CalculateOnBarClose or the Close of the bar as well. If you are running COBC true, it would be the close of the bar otherwise with COBC false it would be the first tick of the bar that the session has started on.

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse

      OK I thought that was the case so I added tick bars to process Bars.FirstBarsOfSession on the first tick that comes in. This didnt work either and after going through the program flow with MS Visual Studio there is data coming in after 8.00 am CET which not from the current session. When I try and use Bars.BarsSinceSession for my logic it doesnt work either of course as it is considered bars from the last session and the int getting returned is in the order of 850.

      All of this means I have no way of processing logic when the market opens. I am running the strategy on FESX 09-15 on 6th July 2015.


      I looked at the data coming in again and because I have COBC = true when the market opens at 8 am it processes the close of the bar from the day before. So my logic then works off that close which is much higher then the opening tick of the current session. This is causing the problem. Is the only way around this to include a time condition?


      I solved the problem with :-

      Code:
      if(ToTime(Time[0])> 215900)
      	return;
      Last edited by GKonheiser; 09-24-2015, 04:34 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      646 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      367 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X