Thanx AndrewAMD, makes sense yes.

Just want to ask, the numbers in [ ] specify how many bars back you want to look but with the MA I'm plotting
Code
plot("SMA High",smaHS[2],0,BLUE);
it does the shifting 2bars forward which is what I want, but when I do
Code
if(Close[1] > smaHS[2] && Close[2]<smaHS[2])
it does not look like it is taking the entries at the right place, or is the code correct for what I want to do?