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 CarlTrading, 03-31-2026, 09:41 PM
                  1 response
                  87 views
                  1 like
                  Last Post NinjaTrader_ChelseaB  
                  Started by CarlTrading, 04-01-2026, 02:41 AM
                  0 responses
                  47 views
                  0 likes
                  Last Post CarlTrading  
                  Started by CaptainJack, 03-31-2026, 11:44 PM
                  0 responses
                  66 views
                  2 likes
                  Last Post CaptainJack  
                  Started by CarlTrading, 03-30-2026, 11:51 AM
                  0 responses
                  69 views
                  0 likes
                  Last Post CarlTrading  
                  Started by CarlTrading, 03-30-2026, 11:48 AM
                  0 responses
                  58 views
                  0 likes
                  Last Post CarlTrading  
                  Working...
                  X