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 and Stochastic checking

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

    RSI and Stochastic checking

    Hi All,
    what will be the code of checing the RSI and Stochastic cross over as show in the image ??
    Thanks in advance.
    Bill
    Attached Files

    #2
    Hello,

    Thank you for the question.

    For CrossAbove and CrossBelow's there are methods specific to this.

    Here is some documentation on these items:



    Here is an example for the indicators you listed:

    Code:
    if(CrossAbove(RSI(12,1), Stochastics(Close,8, 10, 2).D, 1))
    {
    	//the RSI Crossed the Stochastics K data series. 
    }
    If you were to read the line above it would say:

    If the RSI period 12 smoothing 1 crosses above the Stochastics D plot which is using the Close prices and a value of 8 and 10 for the D and K with a smoothing of 2 within the last 1 bar from the bar that is currently being processed then do something.

    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse,
      But I want to check individually. If the green line on RSI cross above yellow line on RSI...

      same for Stochastics, How do I check Stochastics D is > Stochastics K also ???? Can you please provide the code for RSI ???

      Thanks
      Bill

      Comment


        #4
        Hello,

        I am unsure what each color line is on the image as you can change the colors.

        The cross above code would be the same for all you would just need to change the plot you are checking. I would recommend reading the help guide on the Cross methods in addition to looking at the indicator methods section in the help guide as it has an example on the usage of each built in indicator.



        For comparing the RSI vs the same RSI using different plot you could do the following:

        Code:
         
        if(CrossAbove(RSI(12,1).Avg, RSI(12,1), 1))
        {
             //the RSI avg Crossed the RSI
        }
        For the D vs K

        Code:
        if(CrossAbove(Stochastics(Close,8, 10, 2).K, Stochastics(Close,8, 10, 2).D, 1))
        {
        	//the K crossed the D. 
        }
        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Got it Thank you Jesse.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by RDTrader16, Today, 10:19 PM
          0 responses
          5 views
          0 likes
          Last Post RDTrader16  
          Started by gemify, 03-08-2023, 08:02 AM
          9 responses
          148 views
          0 likes
          Last Post culpepper  
          Started by elirion, Today, 10:03 PM
          0 responses
          1 view
          0 likes
          Last Post elirion
          by elirion
           
          Started by RaddiFX, Today, 09:55 PM
          0 responses
          6 views
          0 likes
          Last Post RaddiFX
          by RaddiFX
           
          Started by Trader146, 03-29-2024, 01:22 PM
          4 responses
          26 views
          0 likes
          Last Post Trader146  
          Working...
          X