Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

1/1/1800 12:00:00 am ??

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

    1/1/1800 12:00:00 am ??

    Hello,
    Starting March 20, NT8 started behaving strangely while in backtesting, with a strategy that worked OK (for several months now, last time used on March 19):
    the orders are now submitted, accepted and working at date/time 1/1/1800 12:00:00 AM
    Moreover, they are not executed anymore (due to, I assume, this strange date/time)
    Does this have anything to do with the daylight saving time that just happened in Canada? Anyway, this happens even when I start NT8 while I'm not connected to the internet…
    Any idea for fixing it on my side?

    Plese see below an example of output, thank you.

    3/20/2018 2:40:27 PM Strategy 'myStrategy/133032455': Entered internal SubmitOrderManaged() method at 3/20/2018 2:40:27 PM: BarsInProgress=1 Action=SellShort OrderType=Market Quantity=2 LimitPrice=0 StopPrice=0 SignalName='myOrder' FromEntrySignal=''
    OnOrderUpdate(): ' myOrder ' is Submitted at order.time=1/1/1800 12:00:00 AM, at time=1/1/1800 12:00:00 AM
    OnOrderUpdate(): ' myOrder ' is Accepted at order.time=1/1/1800 12:00:00 AM, at time=1/1/1800 12:00:00 AM
    OnOrderUpdate(): ' myOrder ' is Working at order.time=1/1/1800 12:00:00 AM, at time=1/1/1800 12:00:00 AM

    Code:
    [COLOR="Blue"]protected override void[/COLOR] OnOrderUpdate(Order order, [COLOR="blue"]double[/COLOR] limitPrice, [COLOR="blue"]double[/COLOR] stopPrice, [COLOR="blue"]int[/COLOR] quantity, [COLOR="blue"]int[/COLOR] filled, [COLOR="blue"]double[/COLOR] averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, [COLOR="Blue"]string[/COLOR] nativeError)
    {
    [COLOR="blue"]if[/COLOR] (order == [COLOR="blue"]null[/COLOR])  [COLOR="blue"]return[/COLOR];
    Print([COLOR="DarkRed"] "OnOrderUpdate(): '"[/COLOR] +order.Name + [COLOR="darkred"]"' is "[/COLOR] + order.OrderState + [COLOR="darkred"]" at order.time="[/COLOR]+order.Time+ [COLOR="darkred"]", at time="[/COLOR]+time);
    }
    Code:
    [COLOR="Blue"]protected override void[/COLOR] OnExecutionUpdate(Execution execution, [COLOR="blue"]string[/COLOR] executionId, [COLOR="blue"]double[/COLOR] price, [COLOR="blue"]int[/COLOR] quantity, MarketPosition marketPosition, [COLOR="blue"]string[/COLOR] orderId, DateTime time) {
    [COLOR="blue"]if[/COLOR] (execution.Order == [COLOR="blue"]null[/COLOR]) [COLOR="blue"]return[/COLOR];
    	  
    Print([COLOR="DarkRed"]"\nOnExecutionUpdate():"[/COLOR]+execution.Name+[COLOR="darkred"]" FromEntrySignal="[/COLOR]+execution.Order.FromEntrySignal+[COLOR="darkred"]" execution.Order.OrderState="[/COLOR]+execution.Order.OrderState+ [COLOR="darkred"]" Bar #"[/COLOR]+CurrentBar+[COLOR="darkred"]" Tick#="[/COLOR]+Bars.TickCount);
    }

    #2
    Hello utilizator,

    Thank you for your post.

    Daylight Savings Time should not affect the orders in this manner.

    Please detail the following on your backtest:
    • What instruments?
    • What Bars Types and Value?
    • What is the Start Date and End Date of the Backtest?
    • What Trading Hours option is used?
    • Is Tick Replay enabled?

    I look forward to your response.

    Comment


      #3
      Thanks Patrick, please check the attached screenshots, I think they contain the required info
      Attached Files

      Comment


        #4
        Hello utilizator,

        Thanks for replying with that detail. I would like to investigate this further.

        Could you provide answers to the following questions so we can look into this further?

        1. I see that you are testing in the Playback Connection. Do you see the same behavior with the Strategy Analyzer? Please make sure to disconnect from the Playback Connection when backtesting in the Strategy Analyzer since the Playback Controller will affect the data that is loaded into the Strategy Analyzer for backtesting.

        2. It is also unclear to me what the interval is for your backtest. I see some beginning and ending bars on your charts, but since the strategy is disabled and the Playback Controller is set to the beginning, I'm not sure what interval I should use to reproduce the matter. Could you verify the Start and End Dates I should use and the Trading Hours template?

        3. Do you see this issue with Market Replay in the Playback Connection, or is this limited to Historical Data in the Playback Connection?

        4. Is this behavior observable with a clone of the SampleMACrossover strategy that includes your prints in OnOrderUpdate() and OnExecutionUpdate()?

        Thanks in advance, I look forward to resolving this matter with you.
        JimNinjaTrader Customer Service

        Comment


          #5
          It works in Strategy Analyzer, please see the attached screenshots, thanks
          Attached Files

          Comment


            #6
            As you suggested at point 2), I matched the date&Time between Playback and Data Series, and the issue disappeared, please see attached screenshot. Thank you for your help!
            Attached Files

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Barry Milan, Yesterday, 10:35 PM
            5 responses
            16 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by DanielSanMartin, Yesterday, 02:37 PM
            2 responses
            13 views
            0 likes
            Last Post DanielSanMartin  
            Started by DJ888, 04-16-2024, 06:09 PM
            4 responses
            13 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by terofs, Today, 04:18 PM
            0 responses
            11 views
            0 likes
            Last Post terofs
            by terofs
             
            Started by nandhumca, Today, 03:41 PM
            0 responses
            8 views
            0 likes
            Last Post nandhumca  
            Working...
            X