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 alifarahani, 04-19-2024, 09:40 AM
          9 responses
          54 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by mmckinnm, Today, 01:34 PM
          2 responses
          5 views
          0 likes
          Last Post mmckinnm  
          Started by Conceptzx, 10-11-2022, 06:38 AM
          3 responses
          60 views
          0 likes
          Last Post NinjaTrader_SeanH  
          Started by f.saeidi, Today, 01:32 PM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by traderqz, Today, 12:06 AM
          9 responses
          16 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X