AO_FozzySignalALL





//+------------------------------------------------------------------+
//|                Fozzy Daily Indicator                           |
//|                Programmed by Aidrian O'Connor                  |
//|                http://www.unitone.org            |
//+------------------------------------------------------------------+
#property copyright "Fozzy"
#property link      "http://"

#property indicator_separate_window
#property indicator_buffers 6
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 White
#property indicator_color4 White
#property indicator_color5 White
#property indicator_color6 Green

//---- indicator parameters
extern int    RSIPeriod = 8;
extern int    RSIMAPeriod = 8;
extern int    BandsPeriod=20;
extern int    BandsShift=0;
extern double BandsDeviations=2.0;

//---- buffers
double RSI[];
double RSIMA[];
double BBMid[];
double BBUp[];
double BBDn[];
double Signal[];
int i;
  
int init()
  {

  IndicatorBuffers(6);
 
//---- drawing settings
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID);
   SetIndexDrawBegin(0,i-1);
   SetIndexBuffer(0, RSI);
   SetIndexLabel(0,"RSI");

   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID);
   SetIndexDrawBegin(1,i-1);
   SetIndexBuffer(1, RSIMA);
   SetIndexLabel(1,"RSI-MA");
   
   SetIndexStyle(2,DRAW_LINE,STYLE_DOT);
   SetIndexDrawBegin(2,i-1);
   SetIndexBuffer(2, BBMid);
   SetIndexLabel(2,"BB-Mid");
   
   SetIndexStyle(3,DRAW_LINE,STYLE_DOT);
   SetIndexDrawBegin(3,i-1);
   SetIndexBuffer(3, BBUp);
   SetIndexLabel(3,"BB-Up");
   
   SetIndexStyle(4,DRAW_LINE,STYLE_DOT);
   SetIndexDrawBegin(4,i-1);
   SetIndexBuffer(4, BBDn);
   SetIndexLabel(4,"BB-Dn");
   
   SetIndexStyle(5,DRAW_LINE,STYLE_SOLID,1);
   SetIndexDrawBegin(5,i-1);
   SetIndexBuffer(5, Signal);
   SetIndexLabel(5,"Signal");
 
   return(0);
  }

int start()
  {
   i=Bars-BandsPeriod;
   while(i>=0) {
     RSI[i] = iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,i);
   i--;
   }
   
   i=Bars-BandsPeriod;
   while(i>=0) {
     RSIMA[i] = iMAOnArray(RSI,0,RSIMAPeriod,0,MODE_SMA,i);
   i--;
   }
   
   i=Bars-BandsPeriod;
   while(i>=0) {
     BBMid[i] = iMAOnArray(RSIMA,0,BandsPeriod,BandsShift,MODE_SMA,i);
     BBUp[i] = iBandsOnArray(RSIMA,0,BandsPeriod,BandsDeviations,BandsShift,MODE_UPPER,i);
     BBDn[i] = iBandsOnArray(RSIMA,0,BandsPeriod,BandsDeviations,BandsShift,MODE_LOWER,i);
   i--;
   }
   
   i=Bars-BandsPeriod;
   while(i>=0) {
      Signal[i] = 50;
      if(RSI[i]>RSIMA[i] && RSI[i+1]<RSIMA[i+1]){
         Signal[i] = 100;
      } else {
      
         if(RSI[i]<RSIMA[i] && RSI[i+1]>RSIMA[i+1]){
            Signal[i] = 0;
         }
      }
      
   i--;
   }
   return(0);
  }
 
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:



Indicator Curves created:

Implements a curve of type DRAW_LINE


Indicators Used:

Relative strength index
Moving average indicator


Custom Indicators Used:

Order Management characteristics:

Other Features: