• 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 tvaughan4, 12-13-2019, 10:46 PM
      2 responses
      15 views
      0 likes
      Last Post tvaughan4  
      Started by digibob, 12-13-2019, 10:01 PM
      3 responses
      12 views
      0 likes
      Last Post digibob
      by digibob
       
      Started by ldissinger, Yesterday, 12:55 PM
      1 response
      17 views
      0 likes
      Last Post ldissinger  
      Started by pstrusi, Yesterday, 09:06 AM
      1 response
      27 views
      0 likes
      Last Post marcus2300  
      Started by vpzdcv, Yesterday, 02:31 AM
      0 responses
      13 views
      0 likes
      Last Post vpzdcv
      by vpzdcv
       
      Working...
      X