Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I change the upper and lower plot of WilliamsR indicator programmatically ?

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

    How do I change the upper and lower plot of WilliamsR indicator programmatically ?

    Dear Experts,

    I am trying to use the WilliamsR indicator as part of my strategy.

    I created the indicator this way and have it displayed on my chart.

    Code:
    private WilliamsR myWilliamsR;
    myWilliamsR = WilliamsR(21);
    AddChartIndicator(myWilliamsR);​

    How am I able to manipulate this part found within the indicator codes
    Code:
    AddLine(Brushes.DarkGray, -25, NinjaTrader.Custom.Resource.NinjaScriptIndicatorUpper);
    AddLine(Brushes.DarkGray, -75, NinjaTrader.Custom.Resource.NinjaScriptIndicatorLower);
    AddPlot(Brushes.Goldenrod, NinjaTrader.Custom.Resource.WilliamsPercentR);​
    Essentially I am trying to set the upper line to be -15 and lower line to be -85. Thank you.

    #2
    Hello elirion,

    Code:
    private WilliamsR myIndy;
    
    myWilliamsR = WilliamsR(21);
    myWilliamsR.Lines[0].Value = -15;
    
    AddChartIndicator(myWilliamsR);​
    Below is a link to the help guide.
    Code:
    https://ninjatrader.com/support/helpGuides/nt8/line_class.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello elirion,

      Code:
      private WilliamsR myIndy;
      
      myWilliamsR = WilliamsR(21);
      myWilliamsR.Lines[0].Value = -15;
      
      AddChartIndicator(myWilliamsR);​
      Below is a link to the help guide.
      https://ninjatrader.com/support/help...​​


      Appreciate your help once again

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      41 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X