Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Looking for Swing Indicator

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

    #31
    Hello,

    Unfortunately, it looks like your screenshot did not upload correctly. However, this should be fairly easy to accomplish, using the DrawLine() method, as long as you can define your starting and ending x and y values. Using the last version of the indicator in this forum thread, you should be able to edit the condition that draws dots as follows:

    Code:
    if (High[0] > High[1] && High[0] > lastDotPrice)
    {
    	DrawDot("hh"+upCount, false, 0, High[0] + 1 * TickSize, Color.Green);
            DrawLine("line" + CurrentBar, 0, High[0] + 1 * TickSize, lastDotBar, lastDotPrice + 1 * TickSize, Color.Green);
    	lastDotPrice = High[0];
            lastDotBar = CurrentBar;
    }
    What I'm doing in the above snippet is setting the starting X of the line to the current bar, and the starting Y to the current high. I'm then setting the ending X of the line to the bar number of the last dot drawn, and setting the ending Y to the high of that bar. You could switch this around to start in the past and end on the current bar, if you wish.

    For more information on DrawDot(), please see the link below:

    http://www.ninjatrader.com/support/h...l?drawline.htm
    Dave I.NinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    939 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    6 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    4 views
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    28 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    33 views
    0 likes
    Last Post wzgy0920  
    Working...
    X