SpeedTick





//+------------------------------------------------------------------+
//|                                                    SpeedTick.mq4 |
//|                                           Copyright © 2006, XEON |
//|                                                       xeon@nm.ru |
//+------------------------------------------------------------------+

#property copyright "Copyright © 2006, XEON"
#property link      "xeon@nm.ru"
//Èíäèêàòîð íàðîñòàíèÿ äâèæåíèÿ öåí çà ïðîìåæóòîê âðåìåíè
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red
//---- indicator buffers
double     BUYBuffer[];
double     SELLBuffer[];
//------------------------------
int        NewBar;
double     OldBid, NewBid;
int        BUYTick, SELLTick;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   SetIndexStyle(0,DRAW_HISTOGRAM,0);
   SetIndexBuffer(0,BUYBuffer);
   SetIndexStyle(1,DRAW_HISTOGRAM,0);
   SetIndexBuffer(1,SELLBuffer);
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
    OldBid = NewBid;
    NewBid = Bid;
    
    if(NewBid>OldBid){BUYTick++;}
    else if(NewBid<OldBid){SELLTick++;}
    else {BUYBuffer[0]=0; SELLBuffer[0]=0;}
    BUYBuffer[0] =BUYTick;
    SELLBuffer[0]=-SELLTick;
    if(NewBar!=Bars){
       NewBar=Bars;
       BUYTick  = 0;
       SELLTick = 0;
    }
   
//----
   return(0);
  }





Sample





Analysis



Market Information Used:



Indicator Curves created:

Implements a curve of type DRAW_HISTOGRAM


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: