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 GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,227 views
    0 likes
    Last Post xiinteractive  
    Started by andrewtrades, Today, 04:57 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    7 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    440 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    12 views
    0 likes
    Last Post FAQtrader  
    Working...
    X