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

time in force - gtc vs day

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

    time in force - gtc vs day

    When i backtest with

    - order properties>time in force> gtc; and
    - order properties>time in force> day

    I get different results.

    However, my strategy always executes with a "at market" order so it should be executed immediately.

    So in the backtesting module, how are gtc and day orders handled differently?

    I checked the trades list and found a handful of trades with different trade times, with the majority of trades having the same trade times. With gtc, there were a few more trades than with day.

    #2
    Hello,

    Yes, the GTC (good till cancelled) orders will stay active until they are cancelled. Day will stay active only for the day, then they will be closed out.

    In live trading, the availability of these options depends on your broker.
    DenNinjaTrader Customer Service

    Comment


      #3
      "Day" will stay active for the day session or for that particular session (including night sessions)? That is, seems like "day" = "that particular session".

      I still have a problem tho ... my orders are placed "at market" so the order will be filled immediately ... yet specifying "day" or "gtc" in my backtesting creates different results ... why? There will be a handful of trades that are different and it isn't about "day" trades only being filled during the day because when set to "day", it still trades during chicago night time. Is there any difference in the collection of price and volume (bar) data? Because strange that it is, that is my hunch?

      Comment


        #4
        Hello,

        It is tough to say really from here, but I would suspect that the couple orders that are kept over night make you already long or short so any new signal is not accepted effectively blocking the new signal.

        Yes, Day should be for the Session.
        DenNinjaTrader Customer Service

        Comment


          #5
          No, as i said previously, my orders are submitted "at market" so the trade should be executed immediately ... that is why I am perplexed why there should be differences between gtc and day when testing. If you can't tell me why it has occurred, it undermines the validity of the backtesting model, doesn't it?

          Comment


            #6
            Are you using the ExitOnClose feature in your strategy anothertoy?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              No, not using exit on close.

              Comment


                #8
                Ok thanks, do you see the same issue when backtesting with the 'SampleMACrossOver' strategy?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  yes i do. different number of trades and different net profit.

                  Comment


                    #10
                    GTC means positions can carry over trading sessions. Day means any orders would not be carried over.

                    Instead of speaking in generalities, please provide exact examples of what you are looking at. Thank you.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by lorem, 04-25-2024, 09:18 AM
                    19 responses
                    81 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by joselube001, 05-10-2024, 12:17 PM
                    6 responses
                    29 views
                    0 likes
                    Last Post joselube001  
                    Started by bigc0220, 09-18-2018, 09:16 AM
                    6 responses
                    2,583 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by DawnTreader, 05-08-2024, 05:58 PM
                    21 responses
                    81 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Started by doihaveto13, Today, 12:46 PM
                    2 responses
                    8 views
                    0 likes
                    Last Post doihaveto13  
                    Working...
                    X