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 Max238, Today, 01:28 AM
    1 response
    21 views
    0 likes
    Last Post CactusMan  
    Started by giulyko00, Yesterday, 12:03 PM
    2 responses
    10 views
    0 likes
    Last Post giulyko00  
    Started by r68cervera, Today, 05:29 AM
    0 responses
    4 views
    0 likes
    Last Post r68cervera  
    Started by geddyisodin, Today, 05:20 AM
    0 responses
    6 views
    0 likes
    Last Post geddyisodin  
    Started by JonesJoker, 04-22-2024, 12:23 PM
    6 responses
    37 views
    0 likes
    Last Post JonesJoker  
    Working...
    X