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 JoMoon2024, Today, 06:56 AM
      0 responses
      6 views
      0 likes
      Last Post JoMoon2024  
      Started by Haiasi, 04-25-2024, 06:53 PM
      2 responses
      17 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      6 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,786 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Working...
      X