Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

&&High[0] > Swing(10).SwingLow[0]

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

    &&High[0] > Swing(10).SwingLow[0]

    what does the [0] after the .SwingLow mean and what would it say if it was [1] or [2]?

    thanks


    Code:
    [FONT=Courier New][SIZE=2]
    &&High[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]] > Swing([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]10[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]).SwingLow[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]]
    [/SIZE][/FONT]

    #2
    Hi, please check this link - http://www.ninjatrader-support.com/H...eV6/Swing.html

    [0] means the SwingLow value for the most recent bar, [1] for one bar back, [2] for two bars back....

    Comment


      #3
      thanks,
      i was looking for a way to identify or reference the prior swing high or low and not a bar's value

      Comment


        #4
        Then you need to use thoses syntaxes -

        Code:
        [I]High Bar[/I] 
        Swing([COLOR=#0000ff]int[/COLOR] [I]strength[/I]).SwingHighBar([COLOR=#0000ff]int[/COLOR] [I]barsAgo[/I], [COLOR=#0000ff]int[/COLOR] [I]instance[/I], [COLOR=#0000ff]int[/COLOR] [I]lookBackPeriod[/I]) 
        Swing([COLOR=#0000ff]IDataSeries[/COLOR] [I]inputData[/I], [COLOR=#0000ff]int[/COLOR] [I]strength[/I]).SwingHighBar([COLOR=#0000ff]int[/COLOR] [I]barsAgo[/I], [COLOR=#0000ff]int[/COLOR] [I]instance[/I], [COLOR=#0000ff]int[/COLOR] [I]lookBackPeriod[/I]) 
        
        [I]Low Bar[/I] 
        Swing([COLOR=#0000ff]int[/COLOR] [I]strength[/I]).SwingLowBar([COLOR=#0000ff]int[/COLOR] [I]barsAgo[/I], [COLOR=#0000ff]int[/COLOR] [I]instance[/I], [COLOR=#0000ff]int[/COLOR] [I]lookBackPeriod[/I]) 
        Swing([COLOR=#0000ff]IDataSeries[/COLOR] [I]inputData[/I], [COLOR=#0000ff]int[/COLOR] [I]strength[/I]).SwingLowBar([COLOR=#0000ff]int[/COLOR] [I]barsAgo[/I], [COLOR=#0000ff]int[/COLOR] [I]instance[/I], [COLOR=#0000ff]int[/COLOR] [I]lookBackPeriod[/I])
        It will return the numbers of bars ago the Swing High / Low occured.

        Comment


          #5
          Hi Bertrand,

          Could you please clarify why the following swings have the same values?

          double currentswing=Swing(SWG).SwingLow[0];
          double lastswing=Swing(SWG).SwingLow[1];
          double secondlastswing=Swing(SWG).SwingLow[2];

          Print("Current Swing=" +currentswing+ " 1nd Swing="+lastswing+ " 2nd Swing="+secondlastswing);

          I assumed that the print statement was going to give me the most recent swing, previous swing and 2nd last swing. However, all the values are the same. Could you please let me know where is my mistake/misunderstanding of the functionality of Swing indicator.

          Thanks

          Comment


            #6
            Hi Loukas, that's not what the method would be giving you back, you just request the current swing value here via bars index, this is not allowing for access of previuos swing instances like the Swing High bar method. When you work with it, you can find the index value back to plugin the overload for the Swing Value method like in the example shown here :

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            634 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X