it fails on this line
Print(DateTime.Now + Instrument.FullName + "Crossed below ask");
Severity Code Description Project File Line Suppression State
Error CS0120 An object reference is required for the non-static field, method, or property 'Instrument.FullName' NinjaTrader.Custom C:\Users\Suresh\Documents\NinjaTrader 8\bin\Custom\SuperDomColumns\Pipsfromentry.cs 46 Active
//This namespace holds SuperDOM Columns in this folder and is required. Do not change it.
namespace NinjaTrader.NinjaScript.SuperDomColumns
{
public class Pipsfromentry : SuperDomColumn
{
private double limitprice;
private double stopprice;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom SuperDOM column here.";
Name = "Pipsfromentry";
}
else if (State == State.Configure)
{
}
}
protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
{
if (limitprice > 0 && marketDataUpdate.Ask < limitprice)
{
Print(DateTime.Now + Instrument.FullName + "Crossed below ask");
}
}
protected override void OnOrderUpdate(OrderEventArgs orderUpdate)
{
if(orderUpdate.Filled==orderUpdate.Order.Quantity)
{
stopprice=0;
limitprice = 0;
return;
}
if (orderUpdate.Order.OrderType == OrderType.MIT )
{
limitprice = orderUpdate.LimitPrice;
}
}
protected override void OnRender(DrawingContext dc, double renderWidth)
{
// test
}
}
}

Comment