Navigation:Home > Content >

JJN-Infobar.mq4

Time: 2013-01-15 | Download file:JJN-Infobar.mq4

//+------------------------------------------------------------------+
//|                                                  JJN-InfoBar.mq4 |
//|                                      Copyright © 2010, JJ Newark |
//|                                           http://jjnewark.atw.hu |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, JJ Newark"
#property link      "http://jjnewark.atw.hu"

#property indicator_chart_window

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

extern string     _Copyright_                 = "http://jjnewark.atw.hu";
extern string     _IndicatorSetup_            = ">>> Indicator Setup:<<<";
extern int        ADX_Period                  = 14;
extern int        ADX_Price                   = PRICE_CLOSE;
extern double     Step_Psar                   = 0.02;
extern double     Max_Psar                    = 0.2;
extern int        RSI_Period                  = 14;
extern int        Stoch_KPeriod               = 5;
extern int        Stoch_DPeriod               = 3;
extern int        Stoch_Slowing               = 3;
extern int        Macd_FastP                  = 12;
extern int        Macd_SlowP                  = 26;
extern int        Macd_SignalP                = 9;

extern string     _DisplaySetup_              = ">>> Display Setup:<<<";
extern string     Help_for_BigPrice_Decimals  = "Used only: 2,3,4,5!";
extern int        BigPrice_Decimals           = 5;
extern color      UpColor                     = Lime;
extern color      DownColor                   = OrangeRed;
extern color      FlatColor                   = Gold;
extern color      TextColor                   = Silver;
extern color      SeparatorColor              = DimGray;
extern bool       ShowBackground              = TRUE;
extern color      BackgroundColor             = Black;
extern int        PosX                        = 0;
extern int        PosY                        = 0;

double Psar;
double PADX,NADX;
string TimeFrameStr;
double IndVal[9];
double Rsi1,Rsi2,Stoch_Main,Stoch_Signal,Macd_Main,Macd_Signal;
double Prev_Price;
string q="s";


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
  
   
   if(ShowBackground)
   {
   for(int x=0;x<6;x++) // 
   for(int w=0;w<6;w++)
      {
         ObjectCreate("Bkgrd"+x+q+w,OBJ_LABEL,0,0,0,0,0);
         ObjectSet("Bkgrd"+x+q+w,OBJPROP_CORNER,0);
         ObjectSet("Bkgrd"+x+q+w,OBJPROP_XDISTANCE,x*24+PosX+10);
         ObjectSet("Bkgrd"+x+q+w,OBJPROP_YDISTANCE,w*24+PosY);
         ObjectSetText("Bkgrd"+x+q+w,CharToStr(110),32,"Wingdings",BackgroundColor);
      }
   } 
      
      
   for(int j=0;jRsi2)
   ObjectSetText("Rsi_updown",CharToStr(110),12,"Wingdings",UpColor); 
   if(Rsi1Stoch_Signal)
   ObjectSetText("Stoch_updown",CharToStr(110),12,"Wingdings",UpColor); 
   if(Stoch_MainMacd_Signal)
   ObjectSetText("Macd_updown",CharToStr(110),12,"Wingdings",UpColor); 
   if(Macd_MainPrev_Price)
   ObjectSetText("PriceDisplay",DoubleToStr(iClose(NULL,0,0),BigPrice_Decimals),24,"Tahoma",UpColor);
   if(iClose(NULL,0,0) NADX)
        {
        IndVal[x]=1;
        }
        else if (Psar > iClose(NULL,tframe[x],0) && NADX > PADX)
        {
        IndVal[x]=-1;
        }
        else IndVal[x]=0;
      }
   
   
   
      for(int y=0;y        

Recommend