#property indicator_chart_window

extern string note1 = "Change font colors automatically? True = Yes";
extern bool Bid_Ask_Colors = TRUE;
extern string note2 = "Default Font Color";
extern color FontColor = Black;
extern string note3 = "Font Size";
extern int FontSize = 23;
extern string note4 = "Font Type";
extern string FontType = "Arial Black";
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 int WhatCorner = 3;
extern int Text_window = 1;
extern int Shift_UP_DN = 63;
extern int Shift_Left_Right = 0;
double G_bid_168;

int init() {
   return (0);
}

int deinit() {
   ObjectDelete("Market_Price_Label");
   return (0);
}

int start() {
   int Li_0;
   if (Bid_Ask_Colors == TRUE) {
      if (Bid > G_bid_168) FontColor = LawnGreen;
      if (Bid < G_bid_168) FontColor = Red;
      G_bid_168 = Bid;
   }
   string Ls_4 = StringSubstr(Symbol(), 3, 3);
   if (Ls_4 == "JPY") Li_0 = 2;
   else Li_0 = 4;
   string dbl2str_12 = DoubleToStr(Bid, Li_0);
   ObjectCreate("Market_Price_Label", OBJ_LABEL, Text_window, 0, 0);
   ObjectSetText("Market_Price_Label", dbl2str_12, FontSize, FontType, FontColor);
   ObjectSet("Market_Price_Label", OBJPROP_CORNER, WhatCorner);
   ObjectSet("Market_Price_Label", OBJPROP_XDISTANCE, Shift_Left_Right + 1);
   ObjectSet("Market_Price_Label", OBJPROP_YDISTANCE, Shift_UP_DN + 1);
   return (0);
}
