Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wrong dates of the entries

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

    Wrong dates of the entries

    I've spotted something I can't explain during the order execution.

    I'm backtesting strategy on historical data off Opentick. And I've discovered discrepancies among date of the entry plotted on a chart and date stated either in Output windows or by Time[0].ToString() function.

    See attached chart. Short order plotted on a chart says 10/24 (get by Time[0].ToString() function. Chart itself is showing 10/27.

    I'm using this code for getting information about the order execution:


    Code:
    if (WeeklyTrend == "bear" && (WilliamsR(14)[0] > -80))
                                {
                                    SetStopLoss(100);
                                    EnterShort(DefaultQuantity, "Short "+Time[0].ToString());
                                    stoploss = GetCurrentBid()-2;
                                    Print("");
                                    Print(Time[0].ToString());
                                    Print ("Short position entered");
                                    Print ("Stoploss" +stoploss);
                                    Print ("%R: " +WilliamsR(14)[0]);
                                }
    And output windows for this particular trade shows :
    10/24/2003 0:00:00
    Short position entered
    Stoploss233
    %R: 0
    Open PnL: 0


    Any idea what's causing this discrepancy here?


    Thanks for help.


    Regards,


    Ondrej




    Click image for larger version

Name:	entries.JPG
Views:	1
Size:	97.3 KB
ID:	890454

    #2
    The 24th is the date that the condition was true (on close of the bar) and order submitted, the fill happens in the future, the next bar which likely is the 27th, likely a Monday.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks Ray,
      you're right. At first stage I didn't take a look to the data itself. I thought that settings exclude weekends to false will do the trick. Obviously not when I don't have data for a weekends there...

      I'm very pleased by level of support you guys give! Highly appreciated.


      Regards,


      Ondrej

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      56 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      143 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      276 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X