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 LawrenHom, Today, 10:45 PM
          0 responses
          3 views
          0 likes
          Last Post LawrenHom  
          Started by love2code2trade, Yesterday, 01:45 PM
          4 responses
          28 views
          0 likes
          Last Post love2code2trade  
          Started by funk10101, Today, 09:43 PM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Started by pkefal, 04-11-2024, 07:39 AM
          11 responses
          37 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          8 responses
          44 views
          0 likes
          Last Post bill2023  
          Working...
          X