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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      50 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      16 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      22 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      23 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X