//+------------------------------------------------------------------+
//|                                                A1 Pesan Gold.mq4 |
//|                        Copyright 2013, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2013, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window

extern color rcolor = White;
extern color scolor = Yellow;

int Hortot, i;

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   Hortot = ObjectsTotal();
   for(i=0; i < Hortot; i++)
      {
       if(ObjectType(ObjectName(i)) == OBJ_HLINE)
         {
          if(ObjectGet(ObjectName(i), OBJPROP_PRICE1) < Close[0])
            {
             ObjectSet (ObjectName(i), OBJPROP_COLOR , rcolor);
            }
          else 
            {
             ObjectSet (ObjectName(i), OBJPROP_COLOR , scolor);
            }
         }
      }
   return(0);
  }
//+------------------------------------------------------------------+