//+------------------------------------------------------------------+
//|                                               Big Stochastic.mq4 |
//|                                                 author : Skyline |
//|                                          email : glicci@yahoo.it |
//+------------------------------------------------------------------+
// You can find me at following forums :
// www.forexpertutti.it (italian forum)
// www.fastbrokers.net/forum (international forum)
// www.forexfactory.com (international forum)

// v1.0 [01 May 2007] ** Indicator created
// v1.1 [02 May 2007] ** Added arrows indicator

#property copyright ""
#property link      ""

#property indicator_chart_window
extern color  Color      = Black;
extern int    Label_Size = 20;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
     ObjectDelete("Big_Stochastic");
     ObjectDelete("ArrowUp");     
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   string stoch_char;
   int    counted_bars=IndicatorCounted();
   double main   = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0);
   double signal = iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);
   if ( main >= 80 || main <= 20 ) Color = Green;
   else Color = Black;
   if ( main > signal ) stoch_char="Ù";
   else stoch_char="Ú";
   
   // Stochastic 
   ObjectCreate("Big_Stochastic", OBJ_LABEL, 0, 0, 0);
   ObjectSet("Big_Stochastic", OBJPROP_CORNER, 1);
   ObjectSet("Big_Stochastic", OBJPROP_XDISTANCE, 30);
   ObjectSet("Big_Stochastic", OBJPROP_YDISTANCE, 1);   
   ObjectSetText("Big_Stochastic", DoubleToStr(main,2), Label_Size, "Comic Sans MS", Color);
   // Arrow 
   ObjectDelete("ArrowUp");
   ObjectCreate("ArrowUp", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("ArrowUp",stoch_char,Label_Size, "Wingdings", Color);
   ObjectSet("ArrowUp", OBJPROP_CORNER, 1);
   ObjectSet("ArrowUp", OBJPROP_XDISTANCE,5);
   ObjectSet("ArrowUp", OBJPROP_YDISTANCE,1);
        
   
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

