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 DJ888, 04-16-2024, 06:09 PM
      4 responses
      12 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by terofs, Today, 04:18 PM
      0 responses
      5 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by nandhumca, Today, 03:41 PM
      0 responses
      5 views
      0 likes
      Last Post nandhumca  
      Started by The_Sec, Today, 03:37 PM
      0 responses
      3 views
      0 likes
      Last Post The_Sec
      by The_Sec
       
      Started by GwFutures1988, Today, 02:48 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X