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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            65 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            149 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            99 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            286 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X