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

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:


    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 f.saeidi, Today, 05:56 AM
    2 responses
    8 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    35 views
    0 likes
    Last Post Pattontje  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    7 responses
    27 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Skifree, Today, 03:41 AM
    2 responses
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by trimpy, Today, 04:38 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X