Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using a time filter overnight with the strategy builder GUI?

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

    #16
    Originally posted by NinjaTrader_Jesse View Post
    Hello sclay115,

    What rockmanx00 said is correct, you would need two additional sets and conditions like the ones they posted checking your exit condition in addition to the position, then submit an exit order for that position.
    Okay interesting.

    Wouldn't this directly impact a position that was open that is after that time? i.e. If a position was entered at 7pm, and then the strategy follows the conditions as listed, wouldn't it automatically close the position as the resulting output would be a true statement?

    Maybe it needs to be a secondary time filter?

    Something like:

    if Times[DefaultInput][0].TimeOfDay >= new TimeSpan (8,00)
    if Times[DefaultInput][0].TimeOfDay < new TimeSpan (19,00)
    and if Position.MarketPosition.Long
    then ExitLong​

    Comment


      #17
      Hello sclay115,

      The condition you have there say from 8 to 19 which is 24 hour times, exit long is there is a long position. You would need to make the time condition for the time where you want the position closed.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      82 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      43 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      56 views
      0 likes
      Last Post CarlTrading  
      Working...
      X