Yes, this version is identical to a crossUnder.

Your SL code does not work. This would be a correct entry with SL:

Code:
if(tmp[0]>tmp[1] && crossOver(Close,upper)) {
  Stop = down - 10*PIP;
  enterLong();
}
if(tmp[0]<tmp[1] && crossUnder(Close,down)) {
  Stop = upper + 10*PIP;
  enterShort();
}