• 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 vevbarrq, Today, 12:11 AM
    0 responses
    1 view
    0 likes
    Last Post vevbarrq  
    Started by johnnybegoode, Yesterday, 10:16 PM
    0 responses
    3 views
    0 likes
    Last Post johnnybegoode  
    Started by reedstickets, Yesterday, 07:53 PM
    0 responses
    9 views
    0 likes
    Last Post reedstickets  
    Started by Atilla, Yesterday, 04:05 PM
    0 responses
    26 views
    0 likes
    Last Post Atilla
    by Atilla
     
    Started by Displacer, Yesterday, 02:57 PM
    2 responses
    17 views
    0 likes
    Last Post Displacer  
    Working...
    X