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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      163 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      82 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      125 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      206 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      185 views
      0 likes
      Last Post CarlTrading  
      Working...
      X