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, 05-11-2026, 05:56 AM
      0 responses
      61 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      34 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      198 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      364 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      283 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X