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

Custom Rectangle Border Thickness

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

    Custom Rectangle Border Thickness

    Dear Support,

    Using the script for Draw.Rectangle() in my indicator to draw a rectangle I am not having the choice to change the rectangle border properties from Sloid and a Thickness = 2. How do I change these properties?

    In NT7 the indicator would simply plot a rectangle using the default (or saved) properties form the Draw Toolbar.

    I know I can use a saved template in NT8, however, that is not a convenient choice for multiple users of the indicator. Please see comparison in the attached screenshot.

    Thanks.
    Attached Files
    Last edited by aligator; 03-16-2017, 09:50 PM.

    #2
    Hello aligator,

    Thanks for your post.

    To change the default settings for the specific tool, draw a rectangle on the chart, open the properties of the rectangle, change the settings as desired (thickness=1, line = dash, etc, etc.) then click on the small "template" at the bottom right, select save and use name of "Default" and click save, then OK. This action will change the current rectangle and will allow any future rectangles to be automatically drawn with these properties, either through the drawing tool or through ninjascript.

    Each user can apply their own default which is why each user can change the defaults to their preference.
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Paul View Post
      Hello aligator,

      Thanks for your post.

      To change the default settings for the specific tool, draw a rectangle on the chart, open the properties of the rectangle, change the settings as desired (thickness=1, line = dash, etc, etc.) then click on the small "template" at the bottom right, select save and use name of "Default" and click save, then OK. This action will change the current rectangle and will allow any future rectangles to be automatically drawn with these properties, either through the drawing tool or through ninjascript.

      Each user can apply their own default which is why each user can change the defaults to their preference.
      Thank you Paul,

      So, I guess unless I use the NinjaScript with a "Template" either default or custom, I will not have control over the Rectangle border properties, thickness, etc. although I do have control over color and opacity.

      Is it possible to change these properties without using a "Template" ? seems like that should be part of the script.

      Thanks.
      Last edited by aligator; 03-17-2017, 10:29 AM.

      Comment


        #4
        Hello aligator,

        Thanks for your reply.

        Yes, through ninjascript you can.

        For example:

        Rectangle myrect = Draw.Rectangle(this, "test2",30, High[30], 20, Low[20], Brushes.Yellow);
        myrect.OutlineStroke.Width = 5;
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ScottWalsh, Today, 04:52 PM
        0 responses
        1 view
        0 likes
        Last Post ScottWalsh  
        Started by ScottWalsh, Today, 04:29 PM
        0 responses
        5 views
        0 likes
        Last Post ScottWalsh  
        Started by rtwave, 04-12-2024, 09:30 AM
        2 responses
        22 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by tsantospinto, 04-12-2024, 07:04 PM
        5 responses
        70 views
        0 likes
        Last Post tsantospinto  
        Started by cre8able, Today, 03:20 PM
        0 responses
        7 views
        0 likes
        Last Post cre8able  
        Working...
        X