Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

can i enter an order requesting that it be entered at a specified time of day?

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

    can i enter an order requesting that it be entered at a specified time of day?

    can i enter an order requesting that it be entered at a specified time of day?

    for example... buy 1 nq futures contract at the bid price at 6:15 pm tonight.

    #2
    Hello joemiller,
    Thanks for your post.

    There is not a way to do this from a standard order entry window, but it is possible inside the context of NinjaScript and using an automated strategy for order submission. Please let me know if you'd like more information.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JoshG View Post
      Hello joemiller,
      Thanks for your post.

      There is not a way to do this from a standard order entry window, but it is possible inside the context of NinjaScript and using an automated strategy for order submission. Please let me know if you'd like more information.
      yes, please send more information.

      i have a vague memory [apparently imagined] of at one time specifying that a position be closed at 4:55 pm on that day. that's why i thought maybe i could do the same basic thing [i.e.] create a position rather than close a position.

      Comment


        #4
        If you have programming experience you would be best suited to check out the following documents on filtering your trading hours. The concepts used in the 'SampleTimeFilter_NT8.zip' script would only need to be slightly modified to achieve what you are looking for.
        Help Guide - Using a time filter to limit trading hours

        If you do not have any programming experience, you may want to try using the Strategy Builder and implement the 'How to create time comparisons' example.
        Help Guide - Strategy Builder
        Help Guide- Strategy Builder - How to create time comparisons

        Let me know if you have any questions.
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          thanks for the help josh.

          is there an easy way i can specify ''close a position at eod''? i keep thinking something like that is what i may have done?

          Comment


            #6
            I believe what you may actually be looking for is the "TIF" property on your order entry windows. Setting the "TIF" for an order will get you the following behavior:

            DAY- Orders will be canceled by the broker at the end of the trading session (I think this is the setting you will want to use)

            GTC- Order will remain working until the order is explicitly cancelled.

            GTD- Order will remain working until the specified date

            This property is dependent on what time in force your broker may or may not support. If a brokerage / exchange combination is not compatible with a particular time in force, the order will be rejected by the broker. NinjaTrader does not have a method to prevent an unsupported TIF to be sent to a particular exchange. For questions about what TIF may be supported, please contact your broker directly.
            Josh G.NinjaTrader Customer Service

            Comment


              #7
              Strategy Builder time to seconds, i.e... 00:00:10

              1
              Strategy Builder only allows going down to the minute for the time series and time inputs.Is there a method to get to the seconds in the Strategy Builder OR would there be an indicator that could provide a time series down to the second for Strategy Builder?

              2
              One Cancels Other entry would also be great. Is there a way to place OCO long/short with Strategy builder? If it cannot, can you provide directions on how to add it to a strategy builder after the code is unlocked?
              Last edited by JMont1; 05-22-2018, 12:31 AM.

              Comment


                #8
                1 Strategy Builder only allows going down to the minute for the time series and time inputs.Is there a method to get to the seconds in the Strategy Builder OR would there be an indicator that could provide a time series down to the second for Strategy Builder?
                No, this would need to be manually coded. Here is the public msdn link for C# DateTime structures
                https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

                2 One Cancels Other entry would also be great. Is there a way to place OCO long/short with Strategy builder? If it cannot, can you provide directions on how to add it to a strategy builder after the code is unlocked?
                You would not be able to get OCO functionality outside of your stop loss and profit targets in the Strategy Builder. Creating your own custom OCO orders would require switching to the unmanaged order approach to get access to manually setting the OCO ID. You will see it is a parameter for SubmitOrderUnmanaged().
                Help Guide - Unmanaged Approach
                Josh G.NinjaTrader Customer Service

                Comment


                  #9
                  Indicator that performs an entry?

                  JoshG, thanks for the response. Any chance you think someone has created an OCO entry as an indicator or would that only be codable in a strategy?

                  I was thinking maybe I could use Strategy Builder to build an entry logic but forego Strategy Builder's trade logic by having an indicator trigger the entry. Once in the trade I could manually manage it - especially since NT8 allows attaching an ATM to an existing position.

                  Please set me straight.

                  Comment


                    #10
                    Yes, you are correct. This would only be codeable from within a strategy since indicators do not have access to Order objects.

                    You would not be able to manage an automated strategies orders with an ATM, unless you manually coded your strategy and used the ATM Strategy methods.
                    Help Guide - ATM Strategy Methods
                    Josh G.NinjaTrader Customer Service

                    Comment


                      #11
                      Are you aware of a sample OCO strategy? It seems like someone should have one for news times and things like that. My need is fairly basic.

                      Time of day place OCOs above and below the current price.

                      If anyone knows of one I would be very appreciative rather than try and fumble through code since I am a code paster (Auto correct wants me to use PESTER, Haha) not an actual coder.

                      Comment


                        #12
                        Here is one sample of an OCO bracket order strategy.

                        Support for the development of custom automated trading strategies using NinjaScript.
                        Josh G.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by kujista, Today, 05:44 AM
                        3 responses
                        13 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Started by samish18, Yesterday, 08:57 AM
                        9 responses
                        26 views
                        0 likes
                        Last Post NinjaTrader_BrandonH  
                        Started by samish18, Today, 08:31 AM
                        0 responses
                        0 views
                        0 likes
                        Last Post samish18  
                        Started by RookieTrader, Today, 07:41 AM
                        2 responses
                        8 views
                        0 likes
                        Last Post RookieTrader  
                        Started by trilliantrader, Today, 08:16 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post trilliantrader  
                        Working...
                        X