Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Filter by time not working

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

    Filter by time not working

    Hi,

    I had a strategy that was working correctly to begin with and added the following condition:

    ToTime(Time[0]) >= 02000 && ToTime(Time[0]) < 150000

    But trades still occur outside this range of time. The chart is of the 6E (euro) and data series is set to instrument for session template.

    I added a similar line using 093500 and 154500 for stocks, using the RTH session template, and it seems to work fine.

    Is something going on because the session spans more than 1 calendar day? If so, how can this be resolved?

    Thanks

    #2
    Hi coolmoss,

    Time[0] is the time stamp of the bar, and your statement allows trades when this time stamp falls in range between 12:20 AM until 3:00 PM. Are you seeing trades outside these times?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Okay, this is really dumb (again LOL) what is the integer time value for 2 am? That's what I thought I had.

      Never mind, I forgot a zero. Sheesh !

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by llanqui, Today, 10:29 AM
      0 responses
      3 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by llanqui, Today, 08:32 AM
      1 response
      9 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by lollers, Yesterday, 03:26 AM
      1 response
      53 views
      0 likes
      Last Post lollers
      by lollers
       
      Started by Salahinho99, 05-05-2024, 04:13 AM
      7 responses
      62 views
      0 likes
      Last Post Salahinho99  
      Started by knighty6508, 05-10-2024, 01:20 AM
      4 responses
      30 views
      0 likes
      Last Post knighty6508  
      Working...
      X