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

Strategy - RSI - Change lines

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

    Strategy - RSI - Change lines

    Hi,

    I'm working on a strategy to use RSI and I want to change the lines from 30-70 to 40-60.


    myRSI = RSI(14,3);

    myRSI.Lower? ??
    myRSI.Upper??

    I can't seem to find the way to change the default 30/70 lower/upper lines.



    How can i achieve this in code?



    #2
    Hello priceisking,

    Thanks for your post.

    If you are wanting to display the RSI when loading the strategy you would need to use AddChartIndicator(). Reference: https://ninjatrader.com/support/help...tindicator.htm

    For the purposes of display, you can change the upper and lower lines by changing the value of the lines, for example:

    myRSI.Lines[0].Value = 40; // Lines[0] is the first added line in the RSI and would be the lower line
    myRSI.Lines[1].Value = 80; // Lines[1] is the second added line in the RSI and would be the upper line.

    If you are wanting to determine when the RSI crosses a line/value , you need only specify a numeric value so modifying a line is not needed for this internal calculation.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Paul. This helped solve what I was looking for!!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by zstheorist, Today, 07:52 PM
      0 responses
      3 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      149 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      5 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Started by tkaboris, Today, 05:13 PM
      0 responses
      5 views
      0 likes
      Last Post tkaboris  
      Working...
      X