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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      656 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      371 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      579 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X