Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with Session Start Time

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

    Problem with Session Start Time

    Hi,

    I have a strategy that has day bars as its primary, but uses minute bars internally for some actions (mostly, stop loss management).

    When I start the strategy, I do not have the option of setting the session start and end?

    First, it tried to submit a market order several hours before the market opened. The order was rejected by MBTrading. The strategy is coded to only place orders based on daily bars -- but how do i get it to constraint its activities to market hours?

    Also, since I am using minute bars to manage my exit, how do i prevent it from reacting to after market data, since the session start and end is not available for me to configure during strategy startup?

    Thanks,
    Brandon

    #2
    Hello Brandon,

    I suggest to take a look at the link below, which will provide information regarding a time filter to limit trading hours.
    JasonNinjaTrader Customer Service

    Comment


      #3
      So, basically, unless i explicitly code it not to do so, a strategy based on day bars is always going to execute trades in the pre-market. Seems crazy...

      Why you would have session start and end time for minute bars, and then remove it for day bars with this result, is very puzzling. Im sure most people who create a strategy don't want it executing orders in the pre-market.

      Comment


        #4
        Just use minute bars as primary or do what Jason stated. From a daily bar stand point there is no "session". It is just a bar as provided by the data provider. The strategy dialogue window does not know you have a secondary bar object in the wings.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks, i will try using minute bars as the primary and days as secondary - maybe that will fix it.

          However, the big problem was that the system submitted an order based on the daily bars. All my order entry is off the daily bars, and it seems like it processed this before the market opened. In fact, they were submitted around 2am.

          Maybe im just mistaken and MBtrading would hold these orders properly until market opens? I'm not sure, as one of the orders was rejected by MBTrading as having an invalid TIF.

          Thanks

          Comment


            #6
            The order would have been processed on the close of the prior daily bar which can only happen on the 1st tick of the next daily bar. Will look into this further.
            RayNinjaTrader Customer Service

            Comment


              #7
              Ok thanks. I started the strategy yesterday after market close, primarily because i knew a buy signal would be generated for today. It looks like around 2am NT generated a buy order to MBTrading. The signal would have been generated based on the closing price yesterday.

              Any help you can give me understanding the order and timing of executions when using the daily bar would be helpful. Ultimately, I need signals generated off of yesterdays closing price to execute at the market open the next day.

              Thanks

              Comment


                #8
                bridenour,

                If a signal was generated at 2am I am lead to believe that you had data coming in at 2am for your minute time frame. You are sending the orders from the minute time frame correct?

                If that is the case you really need to just add a time filter.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  I am only sending orders off of the day bars. Day is my primary bar configuration.

                  I just use the minute bars as part of a stop loss/exit strategy.

                  When would i normally expect to receive the daily bars? When would a day bar normally generated a buy signal, if that is where i place it?


                  I am going to implement the time filter also, but im concerned that is not going to address the day bar signal issue.

                  Comment


                    #10
                    Daily bars are built whenever your data provider offers that information. When NT receives a tick for that bar it plots it onto the chart. I am lead to believe that your next day's bar was created at 2am. As Ray mentioned, when you submit your order at the close of a bar it will execute at the open of the next daily bar. It seems to me the open of this next bar happened at 2am and that is what is causing you concern.

                    If you are submitting from the daily bars the time filter will not work.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks for the reply.

                      It seems like, based on what you are saying, using the daily bars for an ATS just won't work with Ninja Trader. If there is no way to effectively control and ensure that orders are placed during market hours, that would seem to suggest the product just won't work for multi-day trading or trading based on daily bars (rather than intraday bars) .

                      I use MBTrading, which based on my research is/was one of your well-supported execution brokers.

                      I'm very surprised that such a broad category of functionality is not supported. I researched for a couple of weeks here and did not see anyone else mention this limitation, and yet, if this is indeed a limitation, i can't imagine how anyone could use the product for this purpose.

                      For the system I'm automating, i can't move the entry signals to the minute bars, as they are fundamentally generated off of day timeframe conditions.

                      Comment


                        #12
                        Sure you can. In the daily tiime frame when you decide a signal, mark it with a temp variable. Then on the first time filterized minute bar submit that trade when temp variable is true. Reset temp variable to false. It will get you in at the same spot you hoped for otherwise.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          fair enough, good idea. i will try that.

                          be back in a few days

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by sarahastin11, Today, 02:45 AM
                          0 responses
                          2 views
                          0 likes
                          Last Post sarahastin11  
                          Started by wings, Today, 02:39 AM
                          0 responses
                          6 views
                          0 likes
                          Last Post wings
                          by wings
                           
                          Started by rebeccamia11, Today, 02:16 AM
                          0 responses
                          4 views
                          0 likes
                          Last Post rebeccamia11  
                          Started by rebeccamia11, Today, 02:10 AM
                          0 responses
                          5 views
                          0 likes
                          Last Post rebeccamia11  
                          Started by rebeccamia11, Today, 02:05 AM
                          0 responses
                          4 views
                          0 likes
                          Last Post rebeccamia11  
                          Working...
                          X