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

Start time/end time in NT8 Strategy builder

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

    Start time/end time in NT8 Strategy builder

    Is it possible to leave a strategy enabled but have a start time and an end time were the the strategy initializes its self?


    TexasGuy

    #2
    Hello TexasGuy,

    You can add a time filter to your script to trigger actions at certain times or between certain hours.

    Below is a publicly available link to a video that demonstrates.


    As well as a link to a reference sample.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hmm Unlock the code...but that's my security blanket...Thank you. One last question. In the NT8 Strategy builder the trailing stop asks for trialing stop asks for

      From entry signal..is this saying once I reach X ticks (in my case) profit move to to ValueY ?

      Mode is type of increment?

      Value is ?

      Texas Guy

      Comment


        #4
        Hello Texas Guy,

        I haven't suggested that you unlock your code.

        The video demonstrates a time filter in the Strategy Builder..

        The From entry signal is used to pair an exit with a specific entry's signal name.

        Below is a link to the Strategy Builder 301 course which discusses signal names and from entry signals.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you so much.

          Comment


            #6
            With this time filter, I added it and it seems to work but if you do not have a Profit target or stop loss target the open positions run until session close (if you have the strategy set to close all positions before session close)

            So how do you not only set a strategy to trade between certain hours but also ensure those positions that are opened during those times are closed at the end time you selected?

            Comment


              #7
              Hello TrendFollowingCapital,

              Additional logic would be necessary in a separate condition to check if a position is open at a specific time and then place an exit order for the position.

              Alternatively, you can use the ExitOnSessionCloseSeconds to advance when the position is flattened and all working orders cancelled.


              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NRITV, Today, 01:15 PM
              2 responses
              8 views
              0 likes
              Last Post NRITV
              by NRITV
               
              Started by frankthearm, Today, 09:08 AM
              7 responses
              31 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by maybeimnotrader, Yesterday, 05:46 PM
              5 responses
              26 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by quantismo, Yesterday, 05:13 PM
              2 responses
              19 views
              0 likes
              Last Post quantismo  
              Started by adeelshahzad, Today, 03:54 AM
              5 responses
              33 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X