• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar by time

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

    Bar by time

    Hello, I need to draw a vertical line on my chart based on the bar containing a certain date/time. Any guidance on how to locate that spot on a chart. I'm using the DrawVerticalLine so I would need to know 'bars ago' that matches the time. Any thoughts would be appreciated!

    #2
    Hello pman777,

    Thank you for your note.

    I have put together a sample which will draw a vertical line at current bar if the current date is equal to the desired date, and also included another way where upon a condition being met, a horizontal line will be drawn at a desired date.

    To import a NinjaScript into NinjaTrader 7 do the following:
    From the Control Center window select File -> Utilities-> Import NinjaScript...
    Select the .Zip file for import.

    Please see the following section of our helpguide,
    https://ninjatrader.com/support/help...rticalline.htm

    You may also be interested in the following sample,
    https://ninjatrader.com/support/foru...ad.php?t=19176

    Please let us know if you need further assistance.
    Attached Files
    Last edited by NinjaTrader_AlanP; 11-19-2017, 05:03 PM.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Here is some code that will work really well
      Attached Files

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rontronimous, Today, 04:35 PM
      4 responses
      16 views
      0 likes
      Last Post rontronimous  
      Started by ren37, Yesterday, 09:42 AM
      5 responses
      20 views
      0 likes
      Last Post koganam
      by koganam
       
      Started by rtwave, 10-22-2019, 12:56 AM
      8 responses
      104 views
      0 likes
      Last Post koganam
      by koganam
       
      Started by rtwave, Today, 12:46 PM
      2 responses
      18 views
      0 likes
      Last Post NinjaTrader_ChristopherD  
      Started by pmallya.nt, Today, 12:55 PM
      1 response
      22 views
      0 likes
      Last Post NinjaTrader_Kate  
      Working...
      X