protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Score"));
Add(new Plot(Color.FromKnownColor(KnownColor.Transparent), PlotStyle.Line, "NumTrades"));
Add(new Plot(Color.FromKnownColor(KnownColor.Transparent), PlotStyle.Line, "MaxTradeSize"));
Overlay = false;
if (Instrument.FullName != null)
{
Add(Instrument.FullName, PeriodType.Tick, 1, MarketDataType.Bid);
Add(Instrument.FullName, PeriodType.Tick, 1, MarketDataType.Ask);
Add(Instrument.FullName, PeriodType.Tick, 1, MarketDataType.Last);
}
else
Print("ERROR: Instrument no set.");
if (bb == null)
bb = new NinjaCompanion.BlackBox();
}
/// <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
if (BarsInProgress == 0)
{
ProcessCandle(0);
}
else if (BarsInProgress == 1)
{
bb.Level1Quote.BidPrice = Closes[1][0];
bb.Level1Quote.BidSize = (long)Volumes[1][0];
}
else if (BarsInProgress == 2)
{
bb.Level1Quote.AskPrice = Closes[2][0];
bb.Level1Quote.AskSize = (long)Volumes[2][0];
}
else if (BarsInProgress == 3)
ProcessTrade(Times[3][0], Closes[3][0], (long)Volumes[3][0]);
}
Please advice asap. attached is the trace and the log.

Comment