Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Highest High

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

    Highest High

    Hello, I'm basically building off of Ninjas Swing High/Low indicator here and was wondering how to reference that highest high bar or lowest low bars info. I would actually like to get the range of the highest high bar and do some calculations from that. I would also like to reference the bar after that swing low to get it's range as well.

    In the attach pic the arrows show the bars to which I'd like to reference. And like the swing high/Low, after a new one is formed, start referencing that new one.

    I'm pretty new to Ninja programming coming over from TS. Sorry if this is a really basic inquiry.
    Attached Files

    #2
    Hi jjthetrader, the swing indicator gives you two methods to work with -

    1. access how many bars ago the swing point occured with SwingHighBar / SwingLowBar

    or

    2. access the current swing value with SwingHigh / SwingLow

    An example call and the needed syntax can be found here - http://www.ninjatrader-support.com/H...eV6/Swing.html

    Comment


      #3
      Should this condition work to only print if the current hugh is greater than the high of the last 4 bars?

      if (High[0] > (MAX(High,4)[0]))


      DrawDiamond( "Buy",false, 0, High[0] + TickSize, Color.ForestGreen);

      Regarding my drawing of the diamond, is there any way to set the size. I may have the wrong input in the initialize section?:
      Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Buy"));

      thanks
      Last edited by jjthetrader; 05-14-2009, 12:15 PM.

      Comment


        #4
        Originally posted by jjthetrader View Post
        Should this condition work to only print if the current hugh is greater than the high of the last 4 bars?

        if (High[0] > (MAX(High,4)[0]))

        thanks
        It will never work since MAX includes current. It will work if you change it to:

        if (High[0] > (MAX(High,4)[1]))

        Comment


          #5
          Originally posted by roonius View Post
          It will never work since MAX includes current. It will work if you change it to:

          if (High[0] > (MAX(High,4)[1]))
          much appreciated, that worked!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          656 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          371 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          579 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X