This is a strategy that trades with traditional candles:

Code:
function run()
{
  if(CDLAdvanceBlock() > 0)
    enterLong();
  else if(CDLAdvanceBlock() < 0)
    enterShort();
}