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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    102 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X