Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Properties

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

    Plot Properties

    Can you please tell me how to add a pen width of 2 pixels to this code? I am trying to add a 20 period white EMA with a pen width of 2 pixels to a Strategy but I'm stuck on the width. Thanks
    Add(EMA(20));
    EMA(20).Plots[0].Pen.Color = Color.White;


    #2
    Try:

    EMA(20).Plots[0].Pen.Width = 2;

    More information - http://www.ninjatrader.com/support/f...ead.php?t=3228
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks, but where does the color go? I need color and width.

      Comment


        #4
        Hello,

        You would keep your original line and add the line I sent you directly below it. So you would have 2 lines total one setting the width and one setting the color.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Thanks, I'll give it a shot

          Comment


            #6
            Is there a way to write the add line including the color and plot width? One line instead of 3 or 2?
            thanks

            Comment


              #7
              Hello,

              Unfortunately there is no documented way to do this in one line only.

              Let me know if I can be of further assistance.
              BrettNinjaTrader Product Management

              Comment


                #8
                How about 2? Ray had me add a third line. Can the color and width be combined?
                Thanks

                Comment


                  #9
                  Hello,

                  Please study this page for what is possible, this is where I'm pulling this information from.



                  Let me know if I can be of further assistance.
                  BrettNinjaTrader Product Management

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  648 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  369 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  109 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  573 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  575 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X