I am farting around with creating a custom bar type.
I am using Playback Connection, Market Replay, and Tick Replay is enabled for the Data series. NT version is 8.0.27.1 64-bit, SIM License
In my "BarsType" script file, I am using the Print() method for simple debugging.
I wrote some Print() commands inside State.Configure
Print(DateTime.Now.ToString("HH:mm:ss.fff") +", BarsTypes State= "+ State.ToString() ); // 12:44:08.213, BarsTypes State= Configure Print("BarsTypes Name= "+ Name +", DataBarsTypeRange= "+ Custom.Resource.DataBarsTypeRange +", Value= "+ BarsPeriod.Value +", MDtype= "+ BarsPeriod.MarketDataType ); // BarsTypes Name= 20 Range, DataBarsTypeRange= {0} Range{1}, Value= 20, MDtype= Last
I have the Output window open.
I noticed when I moved my mouse to hover over the chart using this custom bar type, I get a continuous stream of lines being written in the output window. This happens when the Playback head is NOT running.
Is this expected? Does that mean the bars object is constantly in the state of Configure? Or could my NinjaTrader installation be corrupted?
After I disconnect the Playback Connection, and move my mouse into the chart area again, the print statements continue, same as before.
I read in the Help Guide that I shouldn't try to access the Bars object until the state of DataLoaded, but I assume that concept is for "Indicator" types.
But I tried it anyway.
In my custom BarsType script, I added a state for DataLoaded, but none of the Print commands I put inside there do anything, so I'm wondering if that is not a valid state for a BarsType ?
Thank you.
Comment