• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 Steve L, Today, 03:50 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by kherzfeldt6953, Today, 06:11 PM
    0 responses
    1 view
    0 likes
    Last Post kherzfeldt6953  
    Started by Newtrader101, Today, 06:01 PM
    0 responses
    2 views
    0 likes
    Last Post Newtrader101  
    Started by Newtrader101, Today, 05:32 PM
    0 responses
    4 views
    0 likes
    Last Post Newtrader101  
    Started by ntbone, Yesterday, 11:53 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X