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

Overnight breakout

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

    Overnight breakout

    Hello NT team.
    Is it possible to build the following strategy in the strategy builder.
    Suppose I want to open a long position during RTH when the price breaks above the overnight high, but I also want only one trade to be opened after breaking the overnight high, with all subsequent ones ignored, and the next trade only on the following regular session.
    If this strategy can be constructed using the strategy builder, please advise how.
    Thank you

    #2
    Hello Anquirk,

    Unfortunately, adding a data series with a different trading hours template is not possible in the Strategy Builder and the script would need to be unlocked and coded by hand.


    May I have you clarify "overnight high"?
    Do you mean the high from the current session on a future starting from the previous day up to the current time?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Anquirk,

      Unfortunately, adding a data series with a different trading hours template is not possible in the Strategy Builder and the script would need to be unlocked and coded by hand.


      May I have you clarify "overnight high"?
      Do you mean the high from the current session on a future starting from the previous day up to the current time?
      I mean I want to track night session and determine the high during the night session. Than at the opening 9:30 I'd like to trade breakout of the night high

      Comment


        #4
        Hello Anquirk,

        Which instrument are you referring to?

        I'm not able to think of an instrument that has a separate night session.

        Many CME futures trade from 5:00 PM to 4:00 PM central the next day.
        Most equities trade from 8:00 AM to 8:00 PM eastern (the same day).

        Do you mean the full current session that started the previous day?

        Are you making your own custom trading hours template that has specific hours you have designated overnight hours?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hello Anquirk,

          Which instrument are you referring to?

          I'm not able to think of an instrument that has a separate night session.

          Many CME futures trade from 5:00 PM to 4:00 PM central the next day.
          Most equities trade from 8:00 AM to 8:00 PM eastern (the same day).

          Do you mean the full current session that started the previous day?

          Are you making your own custom trading hours template that has specific hours you have designated overnight hours?
          I mean US equities RTH but applied to US index futures. To be clear let's say I want to determine (night) high during 16:00 - 9:30 and open the trade on a next day when high of 16:00-9:30 breaks

          Comment


            #6
            Hello Anquirk,

            You would need to use custom logic to determine the high between an arbitrary set of hours that is not the trading hours template.

            Below is a link to sample code that looks for the high between a range of bars.


            Use Bars.GetBar() to get a bar number by the date and time.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello Anquirk,

              You would need to use custom logic to determine the high between an arbitrary set of hours that is not the trading hours template.

              Below is a link to sample code that looks for the high between a range of bars.


              Use Bars.GetBar() to get a bar number by the date and time.
              https://ninjatrader.com/support/help...nt8/getbar.htm
              Thank you but I'm not really good at coding. Is there any options to build it somehow in strategy builder?

              Comment


                #8
                Hello Anquirk,

                Unfortunately, no. The Strategy Builder is only capable of simple left and right comparisons and cannot run loops or implement methods.

                The script would need to be unlocked and coded by hand.

                You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello Anquirk,

                  Unfortunately, no. The Strategy Builder is only capable of simple left and right comparisons and cannot run loops or implement methods.

                  The script would need to be unlocked and coded by hand.

                  You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
                  Yes please. Share the list of contacts

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by ageeholdings, Today, 07:43 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post ageeholdings  
                  Started by pibrew, Today, 06:37 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post pibrew
                  by pibrew
                   
                  Started by rbeckmann05, Yesterday, 06:48 PM
                  1 response
                  14 views
                  0 likes
                  Last Post bltdavid  
                  Started by llanqui, Today, 03:53 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post llanqui
                  by llanqui
                   
                  Started by burtoninlondon, Today, 12:38 AM
                  0 responses
                  12 views
                  0 likes
                  Last Post burtoninlondon  
                  Working...
                  X