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

SmoothingMode in Price Panel

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

    SmoothingMode in Price Panel

    I've created a simple indicator that places a dot on the close of each bar, and I'd like the dots to look clean with smooth, round edges. So I changed the smoothing mode to the high quality ("AntiAlias") setting. The problem is that instead of improving the quality of these dots, it improves the quality of the dots in the indicator panels below the price panel. I like that it smooths out the other indicators, but I can't figure out a way to smooth out any dots in the price panel.

    I already tried changing the smoothing mode in the indicators of other panels and that didn't work unless the indicator panel was ABOVE the price panel, which none of mine are. Could someone please give me a clue of what I should do? Thanks!

    Here is my code and a screen shot:

    Code:
    public class Custom_Bars : Indicator
        {
            public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
            { 
                base.Plot(graphics, bounds, min, max);
                graphics.SmoothingMode = SmoothingMode.AntiAlias;
            }
        
            protected override void Initialize()
            {
                Add(new Plot(Color.Lime, PlotStyle.Dot, "Dots"));
                CalculateOnBarClose = false;
                DisplayInDataBox    = false;
                PaintPriceMarkers   = false;
                Overlay             = true;
            }
    
            protected override void OnBarUpdate()
            {    
                Dots.Set(Close[0]);            
            }
        
            #region Properties
            [Browsable(false)]    
            [XmlIgnore()]        
            public DataSeries Dots
            {
                get { return Values[0]; }
            }
            #endregion
        }
    Attached Files
    Last edited by Gumby; 09-27-2010, 07:24 PM. Reason: To add an icon

Latest Posts

Collapse

Topics Statistics Last Post
Started by traderqz, Today, 12:06 AM
2 responses
4 views
0 likes
Last Post traderqz  
Started by RideMe, 04-07-2024, 04:54 PM
5 responses
28 views
0 likes
Last Post NinjaTrader_BrandonH  
Started by f.saeidi, Today, 08:13 AM
1 response
7 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by DavidHP, Today, 07:56 AM
1 response
6 views
0 likes
Last Post NinjaTrader_Erick  
Started by kujista, Today, 06:23 AM
3 responses
11 views
0 likes
Last Post kujista
by kujista
 
Working...
X