Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawDiamond("My swing" , true, 1, Swing(10).SwingHighBar(10, 1, 50), Color.Blue

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

    DrawDiamond("My swing" , true, 1, Swing(10).SwingHighBar(10, 1, 50), Color.Blue

    trying to draw a blue dot at the prior Swing(10)

    #2
    Hi, you can use Swing High Bar / Swing Low bar to reference previous swing points, this link includes sample code how to achieve this - http://www.ninjatrader-support.com/H...eV6/Swing.html

    Consider those give you the barsAgo value the swing was identified, you need to put those then into the 'value' method to get a price level.

    If you want to see previous 'dots' you would need to use a unique tag id for your DrawDot (you can do this by adding CurrentBar to your existing one).

    Comment


      #3
      DrawDot("My dot",0, High[Swing(10).SwingHighBar(0, 2, 500)],Color.Cyan);

      trying to draw dot at the high of the SwingHighBar or value (i think this is the same but not sure) "2" swinghigh's ago

      Comment


        #4
        Hello,

        The Swing indicator is challenging to work with. To get a better understanding of the values and how/when they change, use Print() and print out the values. Sometimes the values are available and sometimes they are redrawn after the fact. You will have to play around with it to see what I mean.
        DenNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X