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

RSI divergence /w DivergenceInputSeriesNT8

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

    RSI divergence /w DivergenceInputSeriesNT8

    Hi everyone,

    I would like to include this divergence indicator into my strategy: http://www.ninjatrader.com/support/f...d=7&linkid=879


    I would like some help in understanding how this indicator works, and if it is possible to implement in my strategy. The indicator says:

    This indicator will check for divergence of the defined input series against price, by default it uses swing points as base point of divergence logic
    What I want to create, is an indicator/strategy that checks for a lower high on an upswing on the RSI in the overbought region without taking price into consideration price (which i believe is unnecessary). Lets only consider overbought zones to make this simple: if the RSI makes a lower high in an overbought zone then I want to sell. The attachment should make it clear: short at the blue arrows, divergence is the red line in the overbought zone defined by a lower high.

    what is the best way to program that. I'm having a very difficult time wrapping the logic around my head.
    Attached Files

    #2
    Hello mohdhm,

    Thanks for your post.

    Regrettably, your link is invalid however it sounds like you do not want to use it anyway.

    Based on your description of desire, "What I want to create, is an indicator/strategy that checks for a lower high on an upswing on the RSI in the overbought region without taking price into consideration price (which i believe is unnecessary).

    What I would suggest is to use the RSI as an input to the Swing indicator and develop your logic based on the swinghighs and swinglows of the RSI. The swing indicator allows you to set the "strength" of the swing which really means how many bars after the swing confirms that you have a swing. As a starting point I would recommend that you add the swing indicator to your chart of the RSI and see if you can use this for your strategy. You can certainly test the settings to find what may be ideal for your strategy. I've attached an example of the RSI on the NQ -09-18, 15 minute bars, and have added the swing indicator using the RSI as its input and set the swing strength to 3. I've turned of the RSI.avg plot and I've expanded the indicator panel to better show the indicator.

    Here is a link to the Swing methods available: https://ninjatrader.com/support/help...-us/?swing.htm

    Please note in the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients. If you would like the strategy created for you, we can provide reference links to 3rd party programmers.

    Edit: forgot to attach example screenshot, added now.
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul.

      Thank you for the very informative post. If i may ask you a new but related question as well...

      The link is at :http://www.ninjatrader.com/support/f...d=7&linkid=879

      The divergence indicator above does the calculations for the swing high/low. Here is the part of the code im interested in:

      Code:
      bool haveswinghigh; // found a swing point high
      bool haveswinglow; // found a swing point low
      How can I include that boolean value from that indicator, in an if statement using my strategy. Example:

      Code:
      if ( haveswinghigh = true)
      {
      Entershort()
      }
      Would that work?

      Comment


        #4
        Hello mohdhm,

        Thanks for your reply.

        You would not be able to access those from your strategy because they are private/local bools that are not exposed to be used outside of the indicator.

        If you want to use them outside of the indicator then you would need to modify the indicator and change their properties to public. We have an example indicator/strategy that demonstrates this here: https://ninjatrader.com/support/help...alues_that.htm
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gentlebenthebear, Today, 01:30 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Aviram Y, Today, 05:29 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by cls71, Today, 04:45 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by TradeForge, Today, 02:09 AM
        1 response
        22 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by elirion, Today, 01:36 AM
        2 responses
        14 views
        0 likes
        Last Post elirion
        by elirion
         
        Working...
        X