How the MT4 distinguish between the "resultTotal" before the = as a new total that will have a new value assigned to it after operating the left side after the equal, and "resultTotal" that is on the left side after the equal as old value?

double resulttotal;

double resultaverage;

int totalbar = 10;

for(int x = 1; x <= totalbar; x++)

{resulttotal = resulttotal + iClose(NULL, 0 , x);

}

resultaverage = resulttotal / totalbar;

Sorry buddy but you’ve got me all confused here with your query. Could you please explain it better so that we can come up with a solution that’s helpful to you and other traders too?