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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        63 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        35 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        54 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        61 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        48 views
        0 likes
        Last Post CarlTrading  
        Working...
        X