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

Methods for calculating peaks and troughs

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

    Methods for calculating peaks and troughs

    Hi guys,

    I'm looking at building an indicator which calculates peaks and troughs and am wondering which methods there are out there????

    For example I know about 2 up, 1 down method or maybe 2up and 2 down to calculate a peak but what about different methods????

    Which of the above methods do you guys think is best???

    thank you for tips and advice.

    #2
    Hello Jagtrading,

    I will leave this thread open for our other users to respond to for any information they may have.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Does the Swing indicator method suffice?

      It has some exposed methods that are useful for this purpose.

      Search for "Swing" in file "bin/Custom/Indicator/@CandleStickPattern.cs"
      for examples of how to use them.

      Comment


        #4
        If you talk about peak and troughs, you basically wish to build a zigzag indicator. The zigzag indicator produces a sequence of alternating highs and lows.

        There are essentially two ways of defining a swing high or low. For a swing high

        - you may specify the swing strength (number of bars to each side which must have lower highs than the swing high itself)
        - you may specify the the distance (measured in multiple of ATR, AR, ticks, percent) that price must have travelled down to validate a new swing high

        The first definition is a horizontal definition, the second a vertical definition. It is possible to combine both concepts. The chart attached shows a zigzag which identifies swing highs and lows based on a swing strength of 5 and an ATR multiple of 3. The indicator identifies higher highs, higher lows, lower highs and lower lows and measures the size of the swing legs. Calculations are based on high/low, but you can also base them on the bar closes.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by RookieTrader, Today, 09:37 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by kulwinder73, Today, 10:31 AM
        0 responses
        5 views
        0 likes
        Last Post kulwinder73  
        Started by terofs, Yesterday, 04:18 PM
        1 response
        23 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by CommonWhale, Today, 09:55 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Gerik, Today, 09:40 AM
        2 responses
        7 views
        0 likes
        Last Post Gerik
        by Gerik
         
        Working...
        X