Here's the missing example:

Code:
function run()
{
  ...
  vars Price = series(price());
  if(rising(Price)) 
    enterLong();
  else if(falling(Price))
    enterShort();
}