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

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.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks, I will take a look!

      David

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by giulyko00, 04-24-2024, 12:03 PM
      9 responses
      43 views
      0 likes
      Last Post giulyko00  
      Started by memonic, Yesterday, 01:23 PM
      2 responses
      24 views
      0 likes
      Last Post memonic
      by memonic
       
      Started by merc410, Today, 03:41 AM
      2 responses
      15 views
      0 likes
      Last Post merc410
      by merc410
       
      Started by sugalt, 04-30-2024, 04:02 AM
      2 responses
      13 views
      0 likes
      Last Post sugalt
      by sugalt
       
      Started by Ndakotan1313, 03-14-2024, 05:02 PM
      2 responses
      64 views
      0 likes
      Last Post blaise_code  
      Working...
      X