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 pilotfo, Today, 12:50 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by DTSSTS, Today, 11:35 AM
      2 responses
      11 views
      0 likes
      Last Post DTSSTS
      by DTSSTS
       
      Started by sinpeople, Today, 07:20 AM
      2 responses
      10 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Frank1000, Today, 03:05 AM
      5 responses
      16 views
      0 likes
      Last Post Frank1000  
      Started by fscabrera03, Yesterday, 01:18 PM
      2 responses
      26 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X