Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 alifarahani, Today, 09:40 AM
      4 responses
      19 views
      0 likes
      Last Post alifarahani  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by PhillT, Today, 02:16 PM
      2 responses
      7 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by Kaledus, Today, 01:29 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      14 responses
      47 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X