Trigger Wave Oscillator





//+------------------------------------------------------------------+
//|                                      Elliott Wave Oscillator.mq4 |
//|                                                tonyc2a@yahoo.com |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "tonyc2a@yahoo.com"
#property link      ""

#property indicator_separate_window
#property indicator_color1 DeepPink

//---- buffers
double Buffer1[];
extern int Rperiod = 48;
extern int LSMA_Period = 5;
extern int Div = 3;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);
   SetIndexBuffer(0,Buffer1);
   SetIndexLabel(0,"EWO");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
   double TL1,TL2;
//---- TODO: add your code here
   for(int i=Bars;i>=0;i--){
      TL1=iCustom(NULL,0,"TriggerLine",Rperiod,LSMA_Period,Div,0,i);
      TL2=iCustom(NULL,0,"TriggerLine",Rperiod,LSMA_Period,Div,1,i);
      
      Buffer1[i]=TL1-TL2;
      }
//----
   return(0);
  }
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:



Indicator Curves created:

Implements a curve of type DRAW_HISTOGRAM


Indicators Used:




Custom Indicators Used:
TriggerLine

Order Management characteristics:

Other Features: