I'm trying to convert an indicator from NT7 to NT8.
How to convert the 2 lines (with arrows as comment) to NT8 ??
(Thsi didn't help : https://ninjatrader.com/support/help...ng_changes.htm )
Thanks!
-----------------------------------------------------------------------------------------------
public class Indic_1 : Indicator
....
protected override void OnBarUpdate()
{
double v1 = Indic_2(0.5, Order, Period).MyLine[0]; // <----------- How to convert this line to NT8 ???
double v2 = Indic_2(0.2, Order, Period).MyLine[1]; // <----------- ... and this one?
}
[Description("")]
[GridCategory("Parameters")]
public int Period
{
get { return period; }
set { period = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Order
{
get { return order; }
set { order = Math.Max(1, value); }
}
public class Indic_2 : Indicator
....
private double propor = 0.75;
private int period = 50;
private int order = 2;
private double sum;
....
protected override void OnBarUpdate()
{
for(n=0;n<=5;n++)
{
sum+=....
MyLine.Set(n,n*sum);
}
}
[Browsable(false)]
[XmlIgnore()]
public DataSeries MyLine
{
get { return Values[0]; }
}
[Description("")]
[GridCategory("Parameters")]
public double Propor
{
get { return propor; }
set { proport = Math.Max(0.100, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Order
{
get { return order; }
set { order = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int Period
{
get { return period; }
set { period = Math.Max(1, value); }
}

Comment