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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X