• 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

How to enter vertical line in chart output for Strategy Analyzer

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

    How to enter vertical line in chart output for Strategy Analyzer

    I'm trying to add a vertical line everyday that is being analyzed at a specific time. I've yet to make anything display and assuming I'm handling the time input incorrectly?

    Code:
    Draw.VerticalLine(this, "tag1", 64500, Brushes.Green)
    Thanks!

    #2
    Hello Dragon989,

    Thank you for your note.

    The following would draw a vertical line on the most recent current bar, 0.
    Draw.VerticalLine(this, "tag1",0, Brushes.Green);

    When you're passing 64500 its drawing a line 645000 bars Ago.

    If you wanted a line drawn at a specific time each day, say 9AM, you could use the following,

    if (Times[0][0].TimeOfDay == new TimeSpan(08,00, 0))
    Draw.VerticalLine(this, "tag1"+CurrentBar, 0, Brushes.Green);

    Notice I amend "Tag1" with the current bar, so the same line is not redrawn on each call but a new line is created.

    See draw.vertical line section of our HG:
    https://ninjatrader.com/support/help..._reference.htm

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NW Trader, Today, 03:42 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by ralett, Today, 01:42 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by Barry Milan, Today, 01:33 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by dkbyond, Yesterday, 04:11 PM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by w0lverine, Yesterday, 08:22 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X