Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Dot object - controlling the brush color and the size simultaneously

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

    Draw.Dot object - controlling the brush color and the size simultaneously

    I am drawing a Dot on the chart.
    How can I control the Dot's color AND the Dot's size?

    When I look at the various syntax for the Draw.Dot object, I don't see one where I can change the Brush color and a string template in the same statement.

    Also, is the string template the way to change the Dot's size? If so, could you provide me with a quick sample.

    Syntax information:
    https://ninjatrader.com/support/help...?draw_text.htm

    Thanks,

    #2
    Hello GARZONJ,

    There is actually not a way to change the dots size, this is controlled based on the charts scaling. The dots color can be controlled using the overload which includes a brush, and as you noted there is not a specific overload which allows controlling the brush and template. The templates would contain a brush so that is used instead.

    If you want to later change the color and also load a template, you would need to draw the object and then change its values:

    Code:
    Dot dot = Draw.Dot(NinjaScriptBase owner, string tag, bool isAutoScale, int barsAgo, double y, bool isGlobal, string templateName)
    dot.AreaBrush = Brushes.Gold;
    dot.OutlineBrush = Brushes.Blue;

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Jeremytang, 07-14-2018, 06:45 PM
    21 responses
    439 views
    0 likes
    Last Post mav8rick  
    Started by LeonK, Yesterday, 09:26 PM
    1 response
    8 views
    0 likes
    Last Post bltdavid  
    Started by NicholasJoannette, Yesterday, 03:01 PM
    2 responses
    11 views
    0 likes
    Last Post NicholasJoannette  
    Started by rach1994, Yesterday, 12:20 PM
    1 response
    35 views
    0 likes
    Last Post bltdavid  
    Started by litamm89, Yesterday, 11:00 AM
    5 responses
    22 views
    1 like
    Last Post rafael_delima86  
    Working...
    X