Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

DateTime that is forever?

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

    DateTime that is forever?

    I'm trying to draw a rectangle that starts from a specific time but goes on forever. Feel like it should be easy but drawing a brain fart on this.

    I currently have this and it starts at the time I want it to but the end time currently I have set to end of day but want it to be where it goes on forever but not finding a way to do that.

    ```Draw.Rectangle(this, "startTime" + CurrentBar,Time[0], Lows[1][0] - TickSize,new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 16,15,0), Highs[1][0], Brushes.Transparent);

    Any ideas on this? I'm sure its really easy or a simple tweak to do this.

    #2
    vegas3416 Have you tried setting the endTime to DateTime.MaxValue or a DateTime way out in the future??

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    Comment


      #3
      Hello vegas3416,

      You appear to want something like a ray where one end is extended but with a rectangle. The Rectangle drawing tool isn't really meant for that. You could re-draw on each new bar to the current bar (with the end date as Time[0]).

      You could look into finding or creating a custom coded addon.

      Below is a link to a thread that discusses.
      I've seen some questions about this before, but I'm just reviving this feature request. I already know of the highlight region tool which is a great start. It would just be nice to have the region have a starting point rather than just highlight the whole chart. (Basically, a rectangle tool with no right side limit.) Post in
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by futtrader, Today, 01:16 PM
      0 responses
      0 views
      0 likes
      Last Post futtrader  
      Started by Segwin, 05-07-2018, 02:15 PM
      14 responses
      1,789 views
      0 likes
      Last Post aligator  
      Started by Jimmyk, 01-26-2018, 05:19 AM
      6 responses
      838 views
      0 likes
      Last Post emuns
      by emuns
       
      Started by jxs_xrj, 01-12-2020, 09:49 AM
      6 responses
      3,294 views
      1 like
      Last Post jgualdronc  
      Started by Touch-Ups, Today, 10:36 AM
      0 responses
      13 views
      0 likes
      Last Post Touch-Ups  
      Working...
      X