Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Approach for drawing line between peaks

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

    Approach for drawing line between peaks

    I'm working on an indicator that draws a line between peaks of an oscillator. I've been experimenting with basic concepts such as plotting lines, finding highs and lows etc but I seem to be groping for a particular method for accomplishing this.

    Does anyone have ideas for how I might achieve this? I'm not asking for code here so much as I'm asking for help in the conceptual approach i should be following.

    Any ideas are welcome. thx!

    #2
    Hi ShruggedAtlas,

    Best methods for this could be HighestBar(), and LowestBar(), which return bars ago value for when the highest and lowest values found over a lookback. You can plug these in for both the "bars ago" values used in drawing objects, and as an index for the specific indicator you're using for a drawing object's Y placement.

    If you wanted to look for more structural highs and lows, can look into the techniques in Swing or ZigZag, which will look at future bars and then recalculate historical values based on these future bars.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ok thx Ryan,

      I've been working with HighestBar and I've been able to get the start point for a DrawLine object but thats as far as I've gotten. Seems like I'm on the right track then. I'll look at those other indicators you mentioned and see if i can apply some ideas or code they may be using. thx!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Cormick, 07-21-2021, 12:45 PM
      29 responses
      98 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by gbrad, Today, 09:57 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Airwave, Yesterday, 05:04 AM
      3 responses
      22 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by Cormick, Today, 06:26 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by r3n3v, Today, 09:58 AM
      0 responses
      3 views
      0 likes
      Last Post r3n3v
      by r3n3v
       
      Working...
      X