//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
#property copyright ""
#property link      ""

//#property show_inputs

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
{
   double multiplier = 1;
   int NrOfDigits = MarketInfo(Symbol(), MODE_DIGITS);          // Nr. of decimals used by Symbol
   if(NrOfDigits == 5)
      multiplier = 100;
   double drop_price=WindowPriceOnDropped();
   drop_price = NormalizeDouble(MathRound(drop_price*(multiplier*10))/(multiplier*10),Digits);


   if(ObjectFind("EJS_PL") != 0)
   {
      ObjectCreate("EJS_PL", OBJ_HLINE, 0, Close[0], drop_price);
      ObjectSet("EJS_PL", OBJPROP_STYLE, STYLE_SOLID);
      ObjectSet("EJS_PL", OBJPROP_WIDTH, 2);
      ObjectSet("EJS_PL", OBJPROP_BACK, 1);
      ObjectSet("EJS_PL", OBJPROP_COLOR, Magenta);
   }
   else
   {
      ObjectMove("EJS_PL", 0, Close[0], drop_price);
   }
   
   return(0);
}
//+------------------------------------------------------------------+