• 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

  • pman777
    started a topic Bar by time

    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!

  • ballboy11
    replied
    Here is some code that will work really well
    Attached Files

    Leave a comment:


  • NinjaTrader_AlanP
    replied
    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, 06:03 PM.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by levikNT, Today, 07:36 AM
0 responses
5 views
0 likes
Last Post levikNT
by levikNT
 
Started by TazoTodua, Today, 07:27 AM
0 responses
4 views
0 likes
Last Post TazoTodua  
Started by KennyK, Yesterday, 09:47 PM
1 response
6 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Dogmatichacker, Yesterday, 03:52 PM
1 response
15 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Trino, 03-23-2019, 09:26 AM
1 response
4 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X