• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:
    protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string nativeError)
    {
    if (order == null)  return;
    Print( "OnOrderUpdate(): '" +order.Name + "' is " + order.OrderState + " at order.time="+order.Time+ ", at time="+time);
    }
    Code:
    protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time) {
    if (execution.Order == null) return;
    	  
    Print("\nOnExecutionUpdate():"+execution.Name+" FromEntrySignal="+execution.Order.FromEntrySignal+" execution.Order.OrderState="+execution.Order.OrderState+ " Bar #"+CurrentBar+" Tick#="+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.
    Patrick H.NinjaTrader Customer Service

    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 jertrade, Today, 02:50 PM
            0 responses
            2 views
            0 likes
            Last Post jertrade  
            Started by Emma1, Today, 02:42 PM
            0 responses
            3 views
            0 likes
            Last Post Emma1
            by Emma1
             
            Started by RedDuke, Today, 01:59 PM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by MarianApalaghiei, Today, 01:18 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by williamzz, Today, 01:00 PM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jim  
            Working...
            X