I am building a custom Market Analyzer Column in NinjaTrader 8 and cannot get any value to display in the column cell. It always shows “…” no matter what I do.
Here is my minimal test code:
csharp
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Calculate = Calculate.OnEachTick;
MaximumBarsLookBack = MaximumBarsLookBack.Infinite;
}
}
protected override void OnBarUpdate()
{
Value[0] = Close[0];
}
protected override void OnMarketData(MarketDataEventArgs e)
{
Value[0] = Close[0];
}
Column settings:
- Calculate: On each tick
- Maximum bars look back: Infinite
- Bars to load: 300
- Type: Minute, Value: 5
Questions:
- Is
Value[0]the correct property to set for displaying a number in the column cell? - Does
OnBarUpdatefire for Market Analyzer Columns? - What is the correct method to output a value that displays in the column cell?
- Is there a working minimal example of a custom Market Analyzer Column that displays a calculated value?
NinjaTrader version: 8
