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

Finding next lower low/higher high

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

    Finding next lower low/higher high

    Hello,
    I'm trying to create an indicator that is beyond my programming ability and am wondering if I can get some pointers or better yet a link to an indicator that someone else has already created.
    I simply want to find the next lower low or higher high of and indicator.
    Can someone give me the steps to creating this. I will do the research. I just need direction.
    Thanks
    Attached Files

    #2
    Hello CaptainAmericaXX,

    Thanks for your post.

    You can use the Swing indicator for this purpose. Just use the indicator of choice as the input series to the swing indicator (and make sure to set swing indicator to the same panel as the input indicator. Please see the attached example.
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Paul,
      Thank you for the idea. It worked perfectly.
      I'm now trying to create an swing indicator based on that idea. In the Swing indicator code I replaced Low[0] and High[0] with RMI(High, 14, 3)[0], etc. However the values aren't coming out the same as just changing the input series in the Data box of the Swing indicator. Do you have any ideas what else I would have to change to match what is being changed with the Input series change?
      Attached Files

      Comment


        #4
        Hello CaptainAmericaXX,

        Thanks for your post.

        The issue is that the RMI value does not have a High or Low, just a Close value. The bar data at any given point can have a high and a low, however the indicator RMI will only have the (its) Close value. If you replace all instances of the High and Low with Close, your modified indicator will line up precisely.

        Also, in your code you had a few lines like:

        if (RMI(High, 14, 3)[0] > High[strength] && swingHighSwings[strength] > 0.0) Note that you did not change the High[strength]. Here is what it should look like:

        if (RMI(Close, 14, 3)[0] > RMI(Close, 14, 3)[strength] && swingHighSwings[strength] > 0.0)
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by r68cervera, Today, 05:29 AM
        0 responses
        3 views
        0 likes
        Last Post r68cervera  
        Started by geddyisodin, Today, 05:20 AM
        0 responses
        6 views
        0 likes
        Last Post geddyisodin  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        6 responses
        35 views
        0 likes
        Last Post JonesJoker  
        Started by GussJ, 03-04-2020, 03:11 PM
        12 responses
        3,241 views
        0 likes
        Last Post Leafcutter  
        Started by AveryFlynn, Today, 04:57 AM
        0 responses
        7 views
        0 likes
        Last Post AveryFlynn  
        Working...
        X