Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Bollinger.Upper in stratey

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

    Plot Bollinger.Upper in stratey

    Hi,
    in my strategy I don't be able to plot only Bolliner Upper band.

    If i try to compile this :
    (Bollinger(2,20)).Plots[0].Pen.Color = Color.Blue;
    Add(Bollinger(2,20));
    It works properly, but if I compile this :

    (Bollinger(2,20).Upper).Plots[0].Pen.Color = Color.Blue;
    Add(Bollinger(2,20).Upper);

    It give me an error... what is the correct syntax?
    And if I'd like to have the Dots instead of continuos-line ?

    Thanks so much for your help
    Luca

    #2
    Hello Luca,

    That is because "Plots" is on object of Indicator. When your are referencing the "Upper" it would just be a plot. You may want to change the Plots[x] value to the Plot that you would like to change, for example:

    Code:
    (Bollinger(2,20)).Plots[0].Pen.Color = Color.Blue;         // Upper band
    (Bollinger(2,20)).Plots[1].Pen.Color = Color.Red;          // Middle band
    (Bollinger(2,20)).Plots[2].Pen.Color = Color.Green;       // Lower band
    
    (Bollinger(2,20)).Plots[0].Pen.DashStyle = DashStyle.Dot;     // Upper band DashStyle
    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Great .. very good !

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      637 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      571 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X