Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawPolygon

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

    DrawPolygon

    I need your help. I am porting code over from Wealthlab Pro and I've run into a problem. I'm not sure how to implement the DrawPolygon method:

    void DrawPolygon(ChartPane pane, Color color, Color fillColor, LineStyle style, int width, bool behindBars, params double[] coords);

    The issue is the the ability to define color as alpha, r,g b ?

    The use of alpha is pretty standard. I do see there is a brush property Opacity:

    BrushProperties bp=new BrushProperties();
    bp.Opacity=(float)0.4;

    How does this opacity property relate to Color FromArgb method?
    Last edited by boreland; 05-23-2016, 07:18 PM.

    #2
    Hello boreland,

    Thank you for writing in.

    I am not familiar with the BrushProperties class you have stated. Please take a look at this help guide link for NinjaTrader 8 help guide for more information about the use of Brushes: http://ninjatrader.com/support/helpG...s/?brushes.htm

    The section titled "Creating a Transparent Solid Color Brush" will be useful in providing information on how you can modify the alpha transparency of your brush.

    If you would like to pass a variable of type Color to the DrawPolygon() method with an alpha transparency specified, you'll want to use Color.FromArgb(): https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    66 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    41 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    24 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    27 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    53 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X