Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plots- Setting plot bar width

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

    Plots- Setting plot bar width

    When I use the command
    Plots[0].Pen = new Pen(Color.Red);
    It sets the plot bar width to 1, why would it change this?


    Also;
    Is there a command to set plot bar width in real time.


    Lastly;
    Is there a command to make the plot appear on the top of the chart, instead of the bottom.

    Thanks
    Brutus
    Last edited by Brutus; 10-26-2008, 01:03 PM.

    #2
    Brutus,

    1) Since you are instantiating a new pen object. If you just want to change the color, just code: Plots[0].Pen.Color = Color.Red;

    2) Plots[0].Pen.Width = yourValue;

    3) There is no option to change the z-order of painting at this time.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thank you Ray

      Comment


        #4
        Originally posted by NinjaTrader_Ray View Post
        Brutus,

        1) Since you are instantiating a new pen object. If you just want to change the color, just code: Plots[0].Pen.Color = Color.Red;

        2) Plots[0].Pen.Width = yourValue;

        3) There is no option to change the z-order of painting at this time.
        Hi Ray
        It seems these commands affect the whole plot and not an individual bar, is there any way to set the plot - individual bar color and individual bar width?

        R/
        B

        Comment


          #5
          Originally posted by Brutus View Post
          Hi Ray
          It seems these commands affect the whole plot and not an individual bar, is there any way to set the plot - individual bar color and individual bar width?

          R/
          B
          Unfortuntely not.
          RayNinjaTrader Customer Service

          Comment


            #6
            Originally posted by Brutus View Post
            Hi Ray
            It seems these commands affect the whole plot and not an individual bar, is there any way to set the plot - individual bar color and individual bar width?

            R/
            B
            Originally posted by NinjaTrader_Ray View Post
            Unfortuntely not.
            Is this possible with NinjaTrader 7.0? Perhaps there is something like PlotColors introduced in this new version, or is it still not possible? If so, is there a workaround for this?


            Plots[0].Pen.Width=5;
            for example changes the width of the whole plot when included in a 'if' statement in the OnBarUpdate method. Anyone got an suggestion for accomplishing this?

            Regards,

            Comment


              #7
              Originally posted by J_o_s View Post
              Is this possible with NinjaTrader 7.0? Perhaps there is something like PlotColors introduced in this new version, or is it still not possible? If so, is there a workaround for this?


              Plots[0].Pen.Width=5;
              for example changes the width of the whole plot when included in a 'if' statement in the OnBarUpdate method. Anyone got an suggestion for accomplishing this?

              Regards,
              In NT7 you would have access to historical bar and plot colors through their series, unfortunately not the width - this could be accomplished by overriding the default plot method and custom drawing this with C#.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              152 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              89 views
              1 like
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              131 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              127 views
              1 like
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              107 views
              0 likes
              Last Post CarlTrading  
              Working...
              X