Navigation:Home > Content >

TRO_MM_PAD.mq4

Time: 2012-01-17 | Download file:TRO_MM_PAD.mq4

//+------------------------------------------------------------------+ 
//|   TRO_MM_PAD                                                     | 
//|                                                                  | 
//|   Copyright © 2009, Avery T. Horton, Jr. aka TheRumpledOne       |
//|                                                                  |
//|   PO BOX 43575, TUCSON, AZ 85733                                 |
//|                                                                  |
//|   GIFTS AND DONATIONS ACCEPTED                                   | 
//|   All my indicators should be considered donationware. That is   |
//|   you are free to use them for your personal use, and are        |
//|   under no obligation to pay for them. However, if you do find   |
//|   this or any of my other indicators help you with your trading  |
//|   then any Gift or Donation as a show of appreciation is         |
//|   gratefully accepted.                                           |
//|                                                                  |
//|   Gifts or Donations also keep me motivated in producing more    |
//|   great free indicators. :-)                                     |
//|                                                                  |
//|   PayPal - THERUMPLEDONE@GMAIL.COM                               |  
//+------------------------------------------------------------------+ 
//| Use http://therumpledone.mbtrading.com/fx/ as your forex broker  |  
//| ...tell them therumpledone sent you!                             |  
//+------------------------------------------------------------------+ 


#property  copyright "Copyright © 2009, Avery T. Horton, Jr. aka TRO" 
#property  link      "http://www.therumpledone.com/" 
 

#property indicator_chart_window
  
extern bool  Show.Heading = true ;
extern bool  Show.CandleColor   = true ;
extern bool  Show.BuyersSellers = true ;
extern bool  Show.CloseClose1   = true ;

 
extern int  Corner = 1; 
extern int  xAxis  = 0 ;  
extern int  yAxis  = 1 ;


extern color UpColor   = Lime;
extern color DownColor = Red;
extern color FlatColor = Yellow;
extern color TextColor = DodgerBlue;





int tframe[]={1,5,15,30,60,240,1440,10080,43200};

string tf[]={"M1","M5","M15","M30","H1","H4","D1","W1","MN","TOT"};

int tfnumber=9,columns=10 ;  

double cValue, pValue, buyers, sellers, H,C,O,L, candle, DiffCC ;

string TimeFrameStr;
double IndValC[9],IndValD[9],IndVal[9];

int xpos[10], ypos[10];
int w , j , xposTAG, CAN, BS, CC;

string TAG = "PAD"   ;

string ArrowHeadRt =  "Ш" ; // 216 up arrow head
string ArrowHeadUp =  "Щ" ; // 217 up arrow head
string ArrowHeadDn =  "Ъ" ; // 218 up arrow head 

string theArrowC[10],theArrowD[10],theArrow[10];
color   theColorC[10], theColorD[10],theColor[10];

//+------------------------------------------------------------------+
int init()
{

deinit();

if(Corner == 1 || Corner == 3)
{ 
   for( w = 0 ; w < columns ; w++) { xpos[w] = 15 + ((10 - w)*23) ; } 
   xposTAG = 270 ;
} 
else
{
   for( w=0;w sellers)
        {
         IndVal[x]   = 1;
         theArrow[x] = ArrowHeadUp ;
         theColor[x] = UpColor ;
        }
        else if (buyers < sellers)
        {
         IndVal[x]   = -1;
         theArrow[x] = ArrowHeadDn ;
         theColor[x] = DownColor ;         
        }
        else 
        {
         IndVal[x]   = 0;
         theArrow[x] = ArrowHeadRt ;
         theColor[x] = FlatColor ;
        }
        
        
       if (candle > 0)
        {
         IndValC[x]   = 1;
         theArrowC[x] = ArrowHeadUp ;
         theColorC[x] = UpColor ;
        }
        else if (candle < 0)
        {
         IndValC[x]   = -1;
         theArrowC[x] = ArrowHeadDn ;
         theColorC[x] = DownColor ;         
        }
        else 
        {
         IndValC[x]   = 0;
         theArrowC[x] = ArrowHeadRt ;
         theColorC[x] = FlatColor ;
        }        
        
        if (DiffCC > 0)
        {
         IndValD[x]   = 1;
         theArrowD[x] = ArrowHeadUp ;
         theColorD[x] = UpColor ;
        }
        else if (DiffCC < 0)
        {
         IndValD[x]   = -1;
         theArrowD[x] = ArrowHeadDn ;
         theColorD[x] = DownColor ;         
        }
        else 
        {
         IndValD[x]   = 0;
         theArrowD[x] = ArrowHeadRt ;
         theColorD[x] = FlatColor ;
        }        
           
           CAN = CAN + IndValC[x] ;
           BS  = BS  + IndVal[x]  ;
           CC  = CC  + IndValD[x] ;      
                  
   } // for


 
        if (BS > 0 )
        {
         theArrow[9] = ArrowHeadUp ;
         theColor[9] = UpColor ;
        }
        else if (BS <  0 )
        {
         theArrow[9] = ArrowHeadDn ;
         theColor[9] = DownColor ;         
        }
        else 
        {
         theArrow[9] = ArrowHeadRt ;
         theColor[9] = FlatColor ;
        } 
 
 
        if (CC > 0 )
        {
         theArrowD[9] = ArrowHeadUp ;
         theColorD[9] = UpColor ;
        }
        else if (CC <  0 )
        {
         theArrowD[9] = ArrowHeadDn ;
         theColorD[9] = DownColor ;         
        }
        else 
        {
         theArrowD[9] = ArrowHeadRt ;
         theColorD[9] = FlatColor ;
        } 

        if (CAN > 0 )
        {
         theArrowC[9] = ArrowHeadUp ;
         theColorC[9] = UpColor ;
        }
        else if (CAN <  0 )
        {
         theArrowC[9] = ArrowHeadDn ;
         theColorC[9] = DownColor ;         
        }
        else 
        {
         theArrowC[9] = ArrowHeadRt ;
         theColorC[9] = FlatColor ;
        }         
           
      for(int  y=0;y        

Recommend