/*
*********************************************************************
     StochHistogramStub                  
*********************************************************************
*/

#define FLAT 0
#define UP 1
#define DOWN 2

extern string note1 = "First Stochastic";
extern int    StochPeriod1=14;
extern int    DPeriod1=3;
extern int    SlowingPeriod1=3;

//+------------------------------------------------------------------+
int init() {

}
//+------------------------------------------------------------------+
int deinit() {
   
   
}


//+------------------------------------------------------------------+
int start() {

   int Signal = GetStochHistogram(1);
   if (Signal == UP) ProcessUpSignal();
   if (Signal == DOWN) ProcessDownSignal();
   
   return(0);

}

// Function to replace iCustom call
int GetStochHistogram(int pos)
{
   double Stoch;
   
   Stoch=iStochastic(NULL,0,StochPeriod1,DPeriod1,SlowingPeriod1,MODE_SMA,0,MODE_MAIN,pos)-50;      
     
   if(Stoch>0) return(UP); // Custom indicator shows green
   if (Stoch<0) return(DOWN); // Custom indicator shows red
   return(FLAT);
}

// Function to handle StochHist above 0 line with green color 
void ProcessUpSignal()
{
}

// Function to handle StochHist below 0 line with red color 
void ProcessDownSignal()
{
}



//+------------------------------------------------------------------+

