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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    72 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X