Well, it's now another wrong way around. The order of commands matters in programming. Here's how it should probably look:

Code
function run()
{
  BarPeriod=60;
  StartDate=2010;
  EndDate=2020;

  asset("EUR/USD");
  vars dim=series(MinusDI(8));
  vars dip=series(PlusDI(8));
  Stop=PIP*50;
  if (crossOver(dip,dim)) enterLong();
  if (crossOver(dim,dip)) enterShort();
}