HELP. The same AFL code is working differntly !!!

#1
I have the following two codes which are saved as two different files

Code:
//
TimeFrameSet(in1Minute);
Condition1 = IIf((Hour() == 9 AND Minute() >=15) OR (Hour() == 10 AND Minute() < 15), 1, 0);
Plot(Condition1,"Plot for condition1", colorGreen);
Code:
//
TimeFrameSet(in1Minute);
Condition1 = IIf((Hour() == 9 AND Minute() >=15) OR (Hour() == 10 AND Minute() < 15), 1, 0);
Plot(Condition1,"Plot for condition1", colorGreen);

tempHigh = 0;
tempLow = 0;
firstHourHigh[0] = 0;
firstHourLow[0] = 0;
range[0] = 0;
for (i = 0; i < BarCount; i++)
{

	if ((i==0 AND Condition1[i] == 1) OR (Condition1[i] == 1 AND Condition1[i-1] = 0))
	{
		tempHigh = H[i];
		tempLow = L[i];
	}//End if

	if (Condition1[i] == 1)
	{

		if (H[i] > tempHigh)
		{
			tempHigh = H[i];
		} // End if
		if (L[i] < tempLow)
		{
			tempLow = L[i];
		} // End if

		firstHourHigh[i] = C[i]; //we may use some negative number like -1 instead of C
		firstHourLow[i] = C[i]; //we may use some negative number like -1 instead of C
		range[i] = 0;
	} // End if
	else
	{
		firstHourHigh[i] = tempHigh;
		firstHourLow[i] = tempLow;
		range[i] = tempHigh - tempLow;
	} // End else
}//End for

bought = 0;
t = TimeNum();
HourNumArray = Hour();
MinuteNumArray = Minute();
for (i = 0; i < BarCount; i++)
{
	if (Condition1[i] == 0)
	{
		Buy[i] = 0;
		Sell[i] = 0;
	} // End if
	else
	{
		if (( bought == 0) AND (C[i] > firstHourHigh[i]))  //((O[i] > firstHourHigh[i]) OR (C[i] > firstHourHigh[i])))
		{
			Buy[i] = 1;
			bought = 1;
		} // End if

		//if ((bought == 1) AND (C[i] < firstHourLow[i]) AND (C[i] >= (firstHourHigh[i] + (.75 * range[i]))) AND ((Hour[i] == 3) AND (Minute[i] >= 10)))  //((O[i] < firstHourLow[i] OR (C[i] < firstHourLow[i])))
		if ((bought == 1) AND (C[i] < firstHourLow[i]) AND (C[i] >= (firstHourHigh[i] + (.75 * range[i]))) AND ((HourNumArray[i] == 3) AND (MinuteNumArray[i] >= 10)))
		//{
			//if (t[i] >= 151000)//((Hour[i]) == 15) AND (M[i] >= 10))
		{
			Sell[i] = 1;
			bought = 0;
		} // End if
		//}
	} // End else
}
TimeFrameRestore();

//Plot(firstHourHigh, "firstHourHigh", colorGreen);
//Plot(firstHourLow, "firstHourLow", colorRed);
//Plot(range, "Range", colorBlue);
//
You can see that first pice of code is included in the second code and rest of the second code has nothing to do with the first part of the code.

And it can be seen that only the first pice of the code plots the chart even in the socond code but i cann't understand why i get two different charts when they are saved in two different files.
I will be very very thankfull to anyone who could help me out of this problem.