Hi Ninja Experts,
I am building a custom strategy for which I need to provide an instrument selector and a bars period type selector as input parameter settings. The user will choose instrument and its bars period type for use in the trade logic. Through the below mentioned code, I have been able to achieve bars period type selection as input of strategy. However, when I try the same thing with InstrumentSelector, the code gets compiled successfully but object reference set to null exception while trying to configure the strategy. I have tried several things but not getting the objective.Please help me out with some correction or a template code. I would be grateful for your kind help.
namespace NinjaTrader.NinjaScript.Strategies
{
protected override void OnStateChange()
{
region Properties
[NinjaScriptProperty, Display(Name="Bar Type", GroupName="Parameters", Order = 2)]
public BarsPeriodType BPTONE
{
#endregion
Best Regards,
Mubeen Haider
Comment