Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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#.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by rocketman7, Today, 02:12 AM
              5 responses
              23 views
              0 likes
              Last Post rocketman7  
              Started by trilliantrader, 04-18-2024, 08:16 AM
              7 responses
              28 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by samish18, 04-17-2024, 08:57 AM
              17 responses
              66 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by briansaul, Today, 05:31 AM
              1 response
              15 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by PaulMohn, Today, 03:49 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X