Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Only placing orders during market hours

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

    Only placing orders during market hours

    Hi, I would like to only place orders during market hours.

    Say the stock market is closed and I place a buy limit order. How do i get it so that the price is only executed durning market hours? There is an option on IB "only place trades durning market hours" but this option is only for if you place manual orders and NOT for the API.


    Thanks

    #2
    This is not supported. Orders goes live as you place them.
    RayNinjaTrader Customer Service

    Comment


      #3
      Would there be a way to get around this by changing the setting or the IB API... or would this be a bit too complicated?

      Comment


        #4
        Unfortunately there is no way around this.
        RayNinjaTrader Customer Service

        Comment


          #5
          I thought of a way I could get around it.

          1) The function NTCancelAllOrders; Would that function cancel orders that I initated by putting in manually, or just all orders initated by the API?

          2) Also, say I place a order "manually" to buy 100 shares of INTC.

          would the following code execute even though the order wasn't initiated by the API? Basically I'm wondering if I can manually put in the orders, and then let the automation manage the trade?

          if NTMarketPosition("") <> 0 then
          begin
          ///
          ///
          end;


          Thanks
          Last edited by HelloHello; 09-22-2007, 12:31 PM.

          Comment


            #6
            1) All orders across all accounts

            2) Current implementation it will not work since position is only reported if an order is initiated through the ATI. With NT 6.5 due out this fall it will report position even if an order was not initiated through the ATI.
            RayNinjaTrader Customer Service

            Comment


              #7
              I was surprised to see a Limit Order executed before market hours this morning when I set up my strategy. Is there still no way to confine orders to market hours? I have IB set to market hours as default but based on this thread I guess Ninja overrides that and checking another Ninja entered limit order I have I see that it is enabled for after hours. I could change that one by hand but of course not if it instantly executes which is what happened this morning. I can't imagine that I would have to wait till 9:30 to enter my strategy????

              Comment


                #8
                Have you tried setting up time filters rules for your strategy? - http://www.ninjatrader-support2.com/...ead.php?t=3226

                Comment


                  #9
                  I do actually have a time rule for my entry. Since I don't know code I hope there's a way to do that in the wizard for Profit stops? I don't see a way to enter that kind of rule on the stop page.

                  Comment


                    #10
                    Unfortunately this is not possible on the 'Stops and Targets' page, you could enter this as a condition and then place your Exit() order only during a certain timeframe, like you have coded your entries.

                    Comment


                      #11
                      Not sure I understand that -- is that something that can be done in the wizard?

                      Comment


                        #12
                        Yes, I believe so if I follow your issue correctly, you can take a look at this link - http://www.ninjatrader-support.com/H...mparisons.html

                        Then enter those stops only when the time filters give you 'green light'.

                        Comment


                          #13
                          stops during market hours using wizard

                          OK I understand the "Time filter" in terms of using it with the entry (see attached) but when you say "enter those stops only when the time filters give you 'green light'." how do I implement that within the wizard? I don't see any place to put say a 10% stop order on the entry page or a way to put the time condition on the stop page. Is there maybe a tutorial or something you could point me to?
                          Attached Files

                          Comment


                            #14
                            bkout,

                            That is correct. You cannot apply a time filter to the Stops & Targets page. Instead of using those you will want to directly place an ExitLongStop or ExitLongLimit order.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              OK thanks for walking me through this -- I'm thinking this is going to do what I'm looking for. Please see the two attached images -- after filling out Set 1 and Set 2 for my Long and Short entries I''m using Set 3 to create my 10.5% stop loss. Please check me on the numbers -- will .895 the way I have it give me a 10.5% stop loss from the entry price? Then I have the time rules above so that the stop will only be in effect during mkt hours (my computer is set to EST. How does this look?
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              85 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              47 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              29 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              32 views
                              0 likes
                              Last Post TheRealMorford  
                              Started by Mindset, 02-28-2026, 06:16 AM
                              0 responses
                              67 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X