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 Waxavi, Today, 02:10 AM
    0 responses
    3 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by TradeForge, Today, 02:09 AM
    0 responses
    7 views
    0 likes
    Last Post TradeForge  
    Started by Waxavi, Today, 02:00 AM
    0 responses
    2 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by elirion, Today, 01:36 AM
    0 responses
    4 views
    0 likes
    Last Post elirion
    by elirion
     
    Started by gentlebenthebear, Today, 01:30 AM
    0 responses
    4 views
    0 likes
    Last Post gentlebenthebear  
    Working...
    X