I've been trying to add ticks to the Close[0] term to find out how many ticks are needed but am having a problem and getting messages of "Cannot implicitly convert type 'double' to Ninja Trader.Data.DataSeries"
I get this message whether i try the below code or increment the Close[0] term inside the LinReg formula itself.
Can someone help me to increment the input to the LinReg formula by adding 1 tick (a double) at a time t the Close[0] (an IdataSeries) to find the value for the crossover?
TIA...
taddypole...
Variables:
private double deltaDn;
private DataSeries CloseCrossOver;
Initialize:
CloseCrossOver = new DataSeries(this);
for (int i=0; i < 10; i++)
{
CloseCrossOver = Close[0] + i * TickSize;
LinReg.Set(LinReg(CloseCrossOver ,length)[0]);
LinRegAvg.Set(EMA(LinRegCurve,trigAvg)[0]);
deltaDn = (LinReg[0] - LinRegAvg[0]);
if(deltaDn == 0)
{
int TurnUpTickTarget = i;
}
}
Comment