//+------------------------------------------------------------------+
//| Magnified Market Price.mq4        ver1.4             by Habeeb   |
//+------------------------------------------------------------------+
//| Magnified Market Price_TRO_MODIFIED_VERSION                      |
//| MODIFIED BY AVERY T. HORTON, JR. AKA THERUMPLEDONE@GMAIL.COM     |
//| I am NOT the ORIGINAL author 
//  and I am not claiming authorship of this indicator. 
//  All I did was modify it. I hope you find my modifications useful.|
//|                                                                  |
//+------------------------------------------------------------------+
 

#property indicator_chart_window

 input color   InpBackColor=clrBlack;
 input bool    InpBack=false;

 
 extern int    WhatCorner = 0;
 extern int    xAxis      = 15;
 extern int    yAxis      = 1;

 
 extern bool    Extra_Decimal = False ;

  extern string note1          = "Change font colors automatically? True = Yes";
  extern bool   Bid_Ask_Colors = False;
  
  extern string note2       = "Default Font Color";
  extern color  FontColor   = Black;
  extern color  FontColorUp = Green;  
  extern color  FontColorDn = Red; 
  
  extern string note3    = "Font Size";
  extern int    FontSize = 16;
  
  extern string note4    = "Font Type";
  extern string FontType = "Arial" ; //"Comic Sans MS";
  
  extern string note5 = "Display the price in what corner?";
  extern string note6 = "Upper left=0; Upper right=1";
  extern string note7 = "Lower left=2; Lower right=3";
  

  extern string myNote     = "";
  extern color  myColor    = Black; 
  extern color Panel_Background_Color = White;
  extern int    myFontSize = 16;
  
  
double        Old_Price;
double point ;
string symbol, tChartPeriod,  tShortName ;  
int    digits, period  ; 

 
string shortName ;
 
//+------------------------------------------------------------------+  
   
int init()
{
  
   period       =  Period() ;     
   tChartPeriod =  TimeFrameToString(period) ;  
   digits       =  Digits ;  
    
   if( !Extra_Decimal )
   { 
      if(digits == 5 || digits == 3) { digits = digits - 1 ; point = point * 10 ; }   
   }
    
   shortName = "MMP_TRO" ; 
 
 
           
return(0);
}
 
  
//+------------------------------------------------------------------+
int deinit()
  {
  ObjectDelete("Market_Price_Label3"); 
  ObjectDelete("Market_Price_Note1"); 
    
   
  return(0);
  }
//+------------------------------------------------------------------+
int start()
{
  
   if (Bid_Ask_Colors == True)
   {
    if (iClose(NULL, 0, 0) > iOpen(NULL, 0, 0)) FontColor = FontColorUp;
    if (iClose(NULL, 0, 0) < iOpen(NULL, 0, 0)) FontColor = FontColorDn;
    
   }
   
   string Market_Price=Symbol() + " " + tChartPeriod;
  
   ObjectCreate("Market_Price_Label3", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Market_Price_Label3", Market_Price, FontSize, FontType, FontColor);
   ObjectSet("Market_Price_Label3", OBJPROP_CORNER, WhatCorner);
   ObjectSet("Market_Price_Label3", OBJPROP_BACK, false); 
   ObjectSetText("Market_Price_Label2", "gg", 20, "Webdings", Panel_Background_Color); 
   ObjectSet("Market_Price_Label3", OBJPROP_XDISTANCE, xAxis );
   ObjectSet("Market_Price_Label3", OBJPROP_YDISTANCE, yAxis );
   
   if( myNote != "")
   {
   ObjectCreate("Market_Price_Note1", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Market_Price_Note1", myNote, myFontSize, FontType, myColor);
   ObjectSet("Market_Price_Note1", OBJPROP_CORNER, WhatCorner);
   ObjectSet("Market_Price_Label3", OBJPROP_BACK, false); 
   ObjectSetText("Market_Price_Label2", "gg", 20, "Webdings", Panel_Background_Color);
   ObjectSet("Market_Price_Note1", OBJPROP_XDISTANCE, xAxis );
   ObjectSet("Market_Price_Note1", OBJPROP_YDISTANCE, 2*FontSize + yAxis );   
   
   }
  return(0);   
}
  
//+------------------------------------------------------------------+  

string TimeFrameToString(int tf)
{
   string tfs;
   switch(tf) {
      case PERIOD_M1:  tfs="M1"  ; break;
      case PERIOD_M5:  tfs="M5"  ; break;
      case PERIOD_M15: tfs="M15" ; break;
      case PERIOD_M30: tfs="M30" ; break;
      case PERIOD_H1:  tfs="H1"  ; break;
      case PERIOD_H4:  tfs="H4"  ; break;
      case PERIOD_D1:  tfs="D1"  ; break;
      case PERIOD_W1:  tfs="W1"  ; break;
      case PERIOD_MN1: tfs="MN";
   }
   return(tfs);
}
 
//+------------------------------------------------------------------+   