Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time Related Error for Extended Line

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

    Time Related Error for Extended Line

    Hello,

    I've been running this indicator for almost a year now with no problems. However, today I am receiving the following error message whenever it tries to run.

    Indicator 'L33TB0YAverages': Error on calling 'OnBarUpdate' method on bar 200: NinjaTrader.NinjaScript.DrawingTools.ExtendedLine startTime must be greater than the minimum Date of 1/1/1800 12:00:00 AM but was 1/1/0001 12:00:00 AM

    I am painting two separate sets of lines. The startTime is acquired via Time[0] for one line and Time[1] for another. What is the root cause of this issue and why would it only show up now? I wonder if it is related to the daylight savings time change.

    Thank you!
    L33TB0Y
    NinjaTrader Ecosystem Vendor - L33TB0Y TRADING

    #2
    Hello L33TB0Y,

    Thank you for your post.

    So I may accurately assist you, please answer all of the following questions:
    • What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.?.?.?)
    • What is your logic for drawing the extended lines?
    • What instrument symbol (and expiry if applicable) have you selected? For example, ES 03-22, AAPL, EURUSD, etc.
    • What interval is selected? For example, 5 minute, 1 day, 2000 volume, 4 Renko, etc.
    • Are you able to reproduce this error in a test script that only draws an extended line with the same/similar logic to that which is used in your L33TB0YAverages indicator?
    I look forward to your reply.

    Comment


      #3
      Thanks for your quick reply.

      1. Version 8.1.2.0 64-bit
      2. The logic is:

      Draw.ExtendedLine(this, "StartToStart" + lineName + startToStartCount, false, secondStartTime, secondPriceLevel, firstStartTime, currentPriceLevel, Brushes.Magenta, DashStyleHelper.Solid, 1);

      3. ES 12-23
      4. 500 Tick Candlesticks
      5. Using the logic above I was able to draw a line by simply inputting the Time[1] and Time[0] in place of second and first start time.

      All of my indicators that use extended lines, except one, have started doing this. These indicators are not connected to one another. I was able to fix it temporarily by setting all the time related variables to Time[0] via a script that runs one time before the lines are called which makes me think there's an issue with my code, and not a bug of some type. I'll do a deep dive tomorrow to see if I can figure out what's going on.

      Thank you!
      L33TB0Y
      NinjaTrader Ecosystem Vendor - L33TB0Y TRADING

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      636 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      568 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      571 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X