F
Frankdot
Guest
Hello,
I try to break a loop when foundIndex = barIndex but i get an error message saying cant covert int into bool.
Any idea what i am doing wrong?
Thank you
double sum1 =0;
double sum2 = 0;
double cma = 0;
for (int i = 0; i <= totalBarIndex; i++)
for(int barIndex = i; barIndex <= ChartBars.ToIndex; barIndex++)
{
if (foundIndex = barIndex)
break;
double closePrice = Bars.GetClose(barIndex);
double volumes = Bars.GetVolume(barIndex);
double clovol = closePrice * volumes;
sum1 += clovol;
sum2 += volumes;
cma = sum1 / sum2;
}
Continue reading...
I try to break a loop when foundIndex = barIndex but i get an error message saying cant covert int into bool.
Any idea what i am doing wrong?
Thank you
double sum1 =0;
double sum2 = 0;
double cma = 0;
for (int i = 0; i <= totalBarIndex; i++)
for(int barIndex = i; barIndex <= ChartBars.ToIndex; barIndex++)
{
if (foundIndex = barIndex)
break;
double closePrice = Bars.GetClose(barIndex);
double volumes = Bars.GetVolume(barIndex);
double clovol = closePrice * volumes;
sum1 += clovol;
sum2 += volumes;
cma = sum1 / sum2;
}
Continue reading...