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 rbeckmann05, Today, 06:48 PM
        0 responses
        4 views
        0 likes
        Last Post rbeckmann05  
        Started by rhyminkevin, Today, 04:58 PM
        4 responses
        52 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Started by iceman2018, Today, 05:07 PM
        0 responses
        5 views
        0 likes
        Last Post iceman2018  
        Started by lightsun47, Today, 03:51 PM
        0 responses
        8 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        14 views
        0 likes
        Last Post 00nevest  
        Working...
        X