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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X