• 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 rexmie888, Yesterday, 09:37 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by larkmail, Yesterday, 06:19 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by jvanelli, Yesterday, 09:23 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by lavalampmj, Yesterday, 06:07 PM
      1 response
      10 views
      0 likes
      Last Post bltdavid  
      Started by Sameer, Yesterday, 04:40 PM
      1 response
      35 views
      0 likes
      Last Post NinjaTrader_EricB  
      Working...
      X