I am stumped. The current time is stuck at 310000, no updating time. I checked my computer's system time and it is current. Does it have something to do with internet time or computer system itself? Thanks for your help!
See attached picture and simple code here:
#region Using declarations using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Xml.Serialization; using NinjaTrader.Cbi; using NinjaTrader.Data; using NinjaTrader.Indicator; using NinjaTrader.Gui.Chart; using NinjaTrader.Strategy; #endregion // This namespace holds all strategies and is required. Do not change it. namespace NinjaTrader.Strategy { public class ShowTime : Strategy { #region Variables #endregion protected override void Initialize() { CalculateOnBarClose = false; } protected override void OnBarUpdate() { DrawTextFixed("time", "Current Time: " + ToTime(Time[0]), TextPosition.TopLeft,Color.LimeGreen,new Font("Arial", 20),Color.Black,Color.Black,10); } #region Properties #endregion } }
Comment