How can I access the resolution (like minute or day) and value (like 10 or 1) in the `DisplayName()` override method?
I thought the `BarsPeriod.Value` and `BarsPeriod.BarsPeriodType` properties would do, but they generate an error ("Unhandled Exception: Object reference not set to an instance of an object").
Edit: `Instrument.FullName` generates the same exception; so I'd also like to know how to get the instrument's name in the `DisplayName()` method.
Thanks,
------
public override string DisplayName
{
get
{
return Name + " (" +
// Symbol
//Instrument.FullName + ", " +
// Resolution
BarsPeriod.Value + " " +
BarsPeriod.BarsPeriodType + " [" +
//// Parameters
Period_Slow + ", " +
K_Slow + ", " +
Period_Quick + ", " +
K_Quick + ", " +
Filter_Signals +
"])";
}
}

Comment