if(CurrentBar<1)
{
if(Smooth > 1 && avg==null)
avg=(HMA(Input,Smooth));
trend.Set(true);
UpTrend.Set(Input[0]);
DownTrend.Set(Input[0]);
//MACD
fastEma.Set(Input[0]);
macdAvg2.Set(Input[0]);
Value.Set(0);
Avg.Set(0);
Diff.Set(0);
return;
}
Thanks.

bject reference not set to an instance of an object" , but i have initialized all the objects.
Comment