How do I access to market sentiment data from an EA or Indicator?

Perhaps someone could send me a link to a code example.

Patrick