• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 Antares66, Yesterday, 05:19 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by lavalampmj, Yesterday, 05:25 PM
      0 responses
      7 views
      0 likes
      Last Post lavalampmj  
      Started by jmneto, Yesterday, 05:18 PM
      0 responses
      9 views
      0 likes
      Last Post jmneto
      by jmneto
       
      Started by Bobbyj78, Yesterday, 02:21 PM
      2 responses
      18 views
      0 likes
      Last Post bltdavid  
      Started by EnveousColnago, Yesterday, 02:10 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Ariana  
      Working...
      X