Q:

Why was Bilbo's sword not glowing?

In some places in The Hobbit: An Unexpected Journey, 'Sting', (Bilbo's sword) wasn't glowing blue. There are a few scenes where Bilbo is around Orcs, Even one where they were fighting the Pale Orc, but the sword was still not shown to glow.

Sting had the magical ability to detect orcs or goblins nearby. When
  orcs or goblins were present, it glowed blue, as it did when the
  Fellowship encountered orcs in the mines of Moria. This was a common
  property of First Age Elf blades, particularly those forged in
  Gondolin.
  - Wikipedia

So if I'm not blind, is there some explanation for that or is it just a mistake?

A:

It is a mistake
From: The Hobbit: An Unexpected Journey - the worst continuity errors

Sting!
The sword that is affectionately known as Sting has a magic property,
  it glows blue when enemies are near. We know that because in 'Lord of
  the Rings' Frodo has it, and it does indeed glow blue when enemies are
  near, like in the Mines of Moria. However, during the Orc attack on
  the cliff at the finale of the movie, Sting doesn't glow at all

