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

from time; to time?

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

    from time; to time?

    I just searched for this 'time value'..no results due to search words being too common? hmm..and I know this has been brought up here before.

    need to run strategy from 9:00 AM to 3:00 PM EST. basically I just need to know exactly what to input for time series, time value, etc.

    I know it should look something like this

    from time >= 9:00 AM to time <= 3:00 PM but all I can get to come up is: 'to time; to time'. cannot input: 'from time; to time'

    I have done this before (2 years ago) with a different strategy before..but cannot remember what parameters to input in strategy wizard.

    #2
    Hello shooly76,

    Thanks for your post.

    You've posted in the NinjaTrader 8 strategy development so I will assume you are using the strategy builder.

    This is the code generated by the strategy builder using your times as an example:

    if ((Times[0][0].TimeOfDay >= new TimeSpan(9, 0, 0)) && (Times[0][0].TimeOfDay <= new TimeSpan(15, 0, 0)))

    Here is a link to the helpguide for the strategy builder "conditions" where you will find a section on how to make time comparison in the builder: http://ninjatrader.com/support/helpG...on_builder.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      oh man..Im sorry.. I meant to post this in NT7 strategy development. can you move this thread there for me.. and give me (maybe) a new answer for NT7 strategy WIZARD....lol. thanks

      Comment


        #4
        I dont remember having to input any ninja script code last time I made it work with a different strategy.

        Im pretty sure I just built the time series/value parameters within the strategy wizard.

        ie- I did not need to input ninja script code..the wizard did all that for me. I can do it..but if I dont have to then Id rather the wizard do it for me..ha.

        Comment


          #5
          Hello shooly76,

          Thanks for clarifying your needs.

          In the NT7 Strategy wizard's condition builder, in the upper window, click Add then on the left side select Time> Time series, next in the center select ">=", next on the right side select Time>Time Value and set the specific time of 9:00 AM, click OK. Next again click the Add button and repeat the sequence except choose "<=" and on the right enter the time of 3:00 PM. See screenshot.

          Reference: http://ninjatrader.com/support/helpG...on_builder.htm
          Attached Files
          Paul H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by wzgy0920, 04-20-2024, 06:09 PM
          2 responses
          27 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 02-22-2024, 01:11 AM
          5 responses
          32 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 04-23-2024, 09:53 PM
          2 responses
          49 views
          0 likes
          Last Post wzgy0920  
          Started by Kensonprib, 04-28-2021, 10:11 AM
          5 responses
          193 views
          0 likes
          Last Post Hasadafa  
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,235 views
          0 likes
          Last Post xiinteractive  
          Working...
          X