namespace NinjaTrader.Strategy
{
public class SBExample : StrategyBase{
NinjaTrader.Indicator.IndicatorBase indi_ ;
private int panelN;
public void Add_(NinjaTrader.Indicator.IndicatorBase indi__ , int panel_ ){
indi_ = indi__;
panelN= panel_;
}
protected override void Initialize()
{
Add(indi_);
indi_.Panel = panelN;
}
}
}
the I create a simple indicator:
namespace NinjaTrader.Indicator
{
[Description("Enter the description of your new custom indicator here")]
public class sample : Indicator
{
protected override void Initialize()
{
NinjaTrader.Strategy.SBExample sb= new NinjaTrader.Strategy.SBExample();
sb.Add_(EMA(20), 1);
sb.SetUp();
}
protected override void OnBarUpdate() { }
}
}
When I add "sample indicator" on chart, it compiles well, but on chart, the "EMA" indicator is not being shown. I think I am near to achieve goal? what you think?

Comment