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 Brevo, Today, 01:45 AM
              0 responses
              3 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              3 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              239 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              384 views
              1 like
              Last Post Gavini
              by Gavini
               
              Started by oviejo, Today, 12:28 AM
              0 responses
              6 views
              0 likes
              Last Post oviejo
              by oviejo
               
              Working...
              X