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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      132 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      118 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X