Put NinjaTrader.Core.Globals.Now in ToTime().
Print(ToTime(NinjaTrader.Core.Globals.Now)); <-- this prints the current computer time represented as an integer.
This is what I have suggested in Post #8.
From the help guide:
"ToTime(DateTime time)"
It states this works with a DateTime object. NinjaTrader.Core.Globals.Now is a DateTime object with the current date and time.
There is no bar information in what I have suggested.
The the time of a bar is Time[0], which is not used in my suggestion.
Comment