Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder - how to input time/day to trade?

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

    Strategy Builder - how to input time/day to trade?

    Hi,

    I am trying set an interval to trade as input so that I can select when I want the strategy to trade. It works well, but only after midnight. If I select Start Time before midnight it fails and does not execute any trade. If the start time is after midnight, it executes them correctly.

    I defined the input as Time type and use a Condition: If Time Series Greater equal User Input (Start Time) and the same for Time Series Less equal User input (Stop trade).

    What am I doing incorrectly?

    Along the same line, if I want to have the option to select which day of the week the Strategy is looking for/executing trades, how would I do it?
    I tried selecting the days of the week as Bool and then adding a condition if Day of Week/Misc Sunday Equals User Input (e.g. Sunday), but I got an error message that left and right expressions do not match...

    Thanks!
    David

    #2
    Hello David, thanks for your post.

    We have a few examples of making a time filter here:

    https://ninjatrader.com/support/help...to_limit_t.htm - Code example

    Here is a guide for using the strategy builder to make a time filter:
    https://ninjatrader.com/support/help...ateTimeFilters

    Please let me know if you have any further questions.

    Comment


      #3
      Thanks, I will take a look!

      David

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      120 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X