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

Self-Adjusting Oscillator Levels - Ideas and Help Wanted

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

    Self-Adjusting Oscillator Levels - Ideas and Help Wanted

    I want to draw a horizontal line at the local high and low respectively on an oscillator. In other words, I want to mark the highest and lowest points of an oscillator over a given look-back period using horizontal lines. The goal is to create self-adjusting oscillator levels.

    To this end, I've set Swing High/Low to draw horizontal lines using the oscillator as input in the same panel. This is partially effective, the Swing high/low lines disappear and are redrawn during the regular operation of the Swing indicator. To remedy this, I put EMAs set to draw a horizontal line on the Swing High and Low respectively. The result is less than perfect - the line doesn't track well, it's performance is highly dependent on the length of the EMA, otherwise erratic, etc.

    Does anyone know of a solution?

    Thank you,

    Ninjatrader Crew

    #2
    Hello Tagliareni,

    Thanks for your post.

    Can you clarify this, "the Swing high/low lines disappear and are redrawn during the regular operation of the Swing indicator."? The Ninjatrader swing indicator by default draws dots and these do not disappear so I am confused on your statement.

    Can you provide a screenshot of a chart(s) that shows an example of what you are trying to accomplish or what the swing indicator is doing for you currently?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I set the draw function of the Swing high-low to draw horizontal lines, not dots. Regardless of dots or horizontal lines, during the regular operation of the Swing indicator the lines/dots disappear and are redrawn. For example, when price breaks a local high or low, that line or series of dots disappears and is then redrawn after price pivots and forms a new high or low. To correct that quirk of the swing indicator, I put an EMA set to draw a horizontal line on the swing high and low respectively. This solution however does not accurately track the local highs and lows of the oscillator.
      Basically I'm looking for another way to mark the highs and lows on an oscillator. Is the swing indicator the only option? I'm sure there's something I'm not thinking of that would do the trick.

      Thanks!

      Comment


        #4
        Hello Tagliareni,

        Thanks for your reply.

        The NinjaTrader swing indicator requires a certain amount of bars after a swing point is detected before the dots are drawn and this is directly related to the strength setting. In the case of a strength setting of 5, the swing dots are not drawn until the 5th bar after the swing point is detected at which point the swing point is "confirmed" and will not be redrawn or removed. I've attached a screen shot of the swing indicator on 5 minute bars with a strength of 5. None of these were removed. This is the normal function of the swing indicator.


        Click image for larger version

Name:	SwingExample.PNG
Views:	299
Size:	36.5 KB
ID:	1102761

        The swing indicator will provide the high and low swing points, based on the strength setting used.

        The issue you are facing is that a High or Low point cannot be known until subsequent values are less than the High or more than the low.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 04-23-2024, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        193 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,235 views
        0 likes
        Last Post xiinteractive  
        Working...
        X