Traders Laboratory - View Single Post - TTM/DDF Value Chart
View Single Post
  #45 (permalink)  
Old 04-28-2008, 06:45 PM
thrunner thrunner is offline
thrunner has no status.

 
Join Date: Feb 2007
Posts: 179
Thanks: 60
Thanked 47 Times in 25 Posts
Re: TTM/DDF Value Chart

jj, thank you for the contribution, but this is probably the wrong indicator that was initially attached. There is no code for OnBarUpdate(), so it doesn't plot. Ninjatrader 6.5 doesn't support plotting of synthetic bars natively, so overriding the plot method is normally required for OHLC values :
[Description("Enter the description of your new custom indicator here")] [Gui.Design.DisplayName("jjvaluecharts")] public class valuecharts : Indicator { #region Variables // Wizard generated variables private int numbars = 5; // Default setting for Numbars // User defined variables (add any user defined variables below) #endregion /// <summary> /// This method is used to configure the indicator and is called once before any bar data is loaded. /// </summary> protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Vhigh0")); Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Vlow0")); Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Vclose0")); Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Vopen0")); CalculateOnBarClose = false; Overlay = false; PriceTypeSupported = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. }

Reply With Quote