BrokerInfo indicator

 
I have a indicator to show same broker info in screen.
But I have a problem with this indi, it work fine in alpari uk, but not working is several other broker, as fxcm!!
Α programmer can see what went wrong with this indicator?
//+------------------------------------------------------------------+
//|                                                   BrokerInfo.mq4 |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
#import "Kernel32.dll"
void GetSystemTime(int& a0[]);
#import
//---- input parameters
extern int          CornerLabel=3;
extern int          PositionUnDn=150;
//---- buffers
   double ExtMapBuffer1[];
//==========================================================================================
   int GMTOffset()
   {
   int lia_0[4];
   int lia_4[43];
   string ls_unused_16;
   GetSystemTime(lia_0);
   int li_36 = lia_0[0] & 65535;
   int li_40 = lia_0[0] >> 16;
   int li_44 = lia_0[1] >> 16;
   int li_48 = lia_0[2] & 65535;
   int li_52 = lia_0[2] >> 16;
   int li_56 = lia_0[3] & 65535;
   string ls_8 = FormatDateTime(li_36, li_40, li_44, li_48, li_52, li_56);
   double ld_28 = TimeCurrent() - StrToTime(ls_8);
   return (MathRound(ld_28 / 3600.0));
   }
//==========================================================================================
   string FormatDateTime(int ai_0, int ai_4, int ai_8, int ai_12, int ai_16, int ai_20)
   {
   string ls_24 = ai_4 + 100;
   ls_24 = StringSubstr(ls_24, 1);
   string ls_32 = ai_8 + 100;
   ls_32 = StringSubstr(ls_32, 1);
   string ls_40 = ai_12 + 100;
   ls_40 = StringSubstr(ls_40, 1);
   string ls_48 = ai_16 + 100;
   ls_48 = StringSubstr(ls_48, 1);
   string ls_56 = ai_20 + 100;
   ls_56 = StringSubstr(ls_56, 1);
   return (StringConcatenate(ai_0, ".", ls_24, ".", ls_32, " ", ls_40, ":", ls_48, ":", ls_56));
   }
//==========================================================================================
   int start()
   {
   int counted_bars=IndicatorCounted();
//////////////////////////////////////////////////////////  
   int MYpoint=1;
   int MYdigits=0;
   if(Digits==5||Digits==3) {MYpoint=10; MYdigits=1;}
//////////////////////////////////////////////////////////  
   datetime brokerTime = CurTime();
   datetime GMT =brokerTime - (GMTOffset())*3600;
   string GMTs = TimeToStr( GMT, TIME_MINUTES );
   string brokers = TimeToStr( CurTime(), TIME_MINUTES );
   double Spread=MarketInfo(Symbol(),MODE_SPREAD)/MYpoint;
   double MinLot=MarketInfo(Symbol(),MODE_MINLOT);
   double MaxLot=MarketInfo(Symbol(),MODE_MAXLOT);
   double LotStep=MarketInfo(Symbol(),MODE_LOTSTEP);
   double StopLevel=MarketInfo(Symbol(),MODE_STOPLEVEL)/MYpoint;
//////////////////////////////////////////////////////////  
   ObjectSetText( "gmt1", "GMTtime:", 10, "Arial", LightBlue );
   ObjectSetText( "gmt2", GMTs, 10, "Arial", OrangeRed );
   ObjectSetText( "bro1", "BROKERtime:", 10, "Arial", LightBlue );
   ObjectSetText( "bro2", brokers, 10, "Arial", OrangeRed );
   ObjectSetText("Spread Monitor1","Spread:", 10, "Arial", LightBlue);
   ObjectSetText("Spread Monitor2",DoubleToStr(Spread ,MYdigits),10, "Arial Bold", Red);
   ObjectSetText( "MinLot1", "MinLot:", 10, "Arial", LightBlue );
   ObjectSetText( "MinLot2", DoubleToStr(MinLot,2), 10, "Arial", Gold );
   ObjectSetText( "MaxLot1", "MaxLot:", 10, "Arial", LightBlue );
   ObjectSetText( "MaxLot2", DoubleToStr(MaxLot,0), 10, "Arial", Gold );
   ObjectSetText("LotStep1","LotStep:", 10, "Arial", LightBlue);
   ObjectSetText("LotStep2",DoubleToStr(LotStep,2),10, "Arial Bold", Gold);
   ObjectSetText("StopLevel1","StopLevel:", 10, "Arial", LightBlue);
   ObjectSetText("StopLevel2",DoubleToStr(StopLevel,2),10, "Arial Bold", Gold);
//////////////////////////////////////////////////////////  
   return(0);
  }
//==========================================================================================
   int ObjectMakeLabel( string n, int xoff, int yoff )
   {
   ObjectCreate( n, OBJ_LABEL, 0, 0, 0 );
   ObjectSet( n, OBJPROP_CORNER, CornerLabel );
   ObjectSet( n, OBJPROP_XDISTANCE, xoff );
   ObjectSet( n, OBJPROP_YDISTANCE, yoff );
   ObjectSet( n, OBJPROP_BACK, true );
   }
//==========================================================================================
   int init()
   {
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
//////////////////////////////////////////////////////////  
   int top=PositionUnDn;
   ObjectMakeLabel("gmt1", 60, top-5 );
   ObjectMakeLabel("gmt2", 15, top-5 );
   ObjectMakeLabel("bro1", 60, top-25);
   ObjectMakeLabel("bro2", 15, top-25);
   ObjectMakeLabel("LotStep1",60,  top-45);  
   ObjectMakeLabel("LotStep2", 20, top-45);
   ObjectMakeLabel("MinLot1", 60, top-65 );
   ObjectMakeLabel("MinLot2", 20, top-65 );
   ObjectMakeLabel("MaxLot1", 60, top-85);
   ObjectMakeLabel("MaxLot2", 5, top-85);
   ObjectMakeLabel("StopLevel1",60,  top-105);
   ObjectMakeLabel("StopLevel2", 20, top-105);
   ObjectMakeLabel("Spread Monitor1",60,  top-125);
   ObjectMakeLabel("Spread Monitor2", 30, top-125);
   return(0);
   }
//==========================================================================================
   int deinit()
   {
   ObjectDelete("gmt1");
   ObjectDelete("gmt2");
   ObjectDelete("bro1");
   ObjectDelete("bro2");
   ObjectDelete("Spread Monitor1");   
   ObjectDelete("Spread Monitor2");
   ObjectDelete("LotStep1");
   ObjectDelete("LotStep2");
   ObjectDelete("MinLot1");
   ObjectDelete("MinLot2");
   ObjectDelete("MaxLot1");
   ObjectDelete("MaxLot2");
   ObjectDelete("StopLevel1");   
   ObjectDelete("StopLevel2");       
   return(0);
   }
//==========================================================================================
 
Yep, i see the problem, next time do not post decompiled code
 
pannek:
I have a indicator to show same broker info in screen.
You have a decompiled indicator - STOLEN CODE. Either your are a thief, or are the receiver of stolen intellectual property. No one here should help you with it.
 
WHRoeder:
You have a decompiled indicator - STOLEN CODE. Either your are a thief, or are the receiver of stolen intellectual property. No one here should help you with it.


I change code with part in page https://www.mql5.com/en/forum/109854

Now is ok?

//+------------------------------------------------------------------+
//|                                                   BrokerInfo.mq4 |
//+------------------------------------------------------------------+
#property copyright "PanNik"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
#import "Kernel32.dll"
void GetSystemTime(int& TimeArray[]);
#import
//---- input parameters
extern int CornerLabel=3;
extern int PositionUnDn=150;
//---- buffers
double ExtMapBuffer[];
//==========================================================================================
   int GMTOffset()
   {
   int TimeArray[4];
   int TZInfoArray[43];
   int nYear,nMonth,nDay,nHour,nMin,nSec,nMilliSec;
   string sMilliSec;
   GetSystemTime(TimeArray);
   nYear=TimeArray[0]&0x0000FFFF;
   nMonth=TimeArray[0]>>16;
   nDay=TimeArray[1]>>16;
   nHour=TimeArray[2]&0x0000FFFF;
   nMin=TimeArray[2]>>16;
   nSec=TimeArray[3]&0x0000FFFF;
   nMilliSec=TimeArray[3]>>16;
   string LocalTimeS=FormatDateTime(nYear,nMonth,nDay,nHour,nMin,nSec);
   double GMTtime=TimeCurrent()-StrToTime(LocalTimeS);
   return(MathRound(GMTtime/3600.0));
   }
//==========================================================================================
   string FormatDateTime(int nYear,int nMonth,int nDay,int nHour,int nMin,int nSec)
   {
   string sMonth,sDay,sHour,sMin,sSec;
   sMonth=100+nMonth;
   sMonth=StringSubstr(sMonth,1);
   sDay=100+nDay;
   sDay=StringSubstr(sDay,1);
   sHour=100+nHour;
   sHour=StringSubstr(sHour,1);
   sMin=100+nMin;
   sMin=StringSubstr(sMin,1);
   sSec=100+nSec;
   sSec=StringSubstr(sSec,1);
   return(StringConcatenate(nYear,".",sMonth,".",sDay," ",sHour,":",sMin,":",sSec));
   }
//==========================================================================================
   int start()
   {
   int counted_bars=IndicatorCounted();
//////////////////////////////////////////////////////////  
   int MYpoint=1;
   int MYdigits=0;
   if(Digits==5||Digits==3) {MYpoint=10; MYdigits=1;}
//////////////////////////////////////////////////////////  
   datetime brokerTime=CurTime();
   datetime GMT=brokerTime-(GMTOffset())*3600;
   string GMTs=TimeToStr(GMT,TIME_MINUTES );
   string brokers=TimeToStr(CurTime(),TIME_MINUTES );
   double Spread=MarketInfo(Symbol(),MODE_SPREAD)/MYpoint;
   double MinLot=MarketInfo(Symbol(),MODE_MINLOT);
   double MaxLot=MarketInfo(Symbol(),MODE_MAXLOT);
   double LotStep=MarketInfo(Symbol(),MODE_LOTSTEP);
   double StopLevel=MarketInfo(Symbol(),MODE_STOPLEVEL)/MYpoint;
//////////////////////////////////////////////////////////  
   ObjectSetText("gmt1", "GMTtime:", 10, "Arial", LightBlue );
   ObjectSetText("gmt2", GMTs, 10, "Arial", OrangeRed );
   ObjectSetText("bro1", "BROKERtime:", 10, "Arial", LightBlue );
   ObjectSetText("bro2", brokers, 10, "Arial", OrangeRed );
   ObjectSetText("Spread Monitor1","Spread:", 10, "Arial", LightBlue);
   ObjectSetText("Spread Monitor2",DoubleToStr(Spread ,MYdigits),10, "Arial Bold", Red);
   ObjectSetText("MinLot1", "MinLot:", 10, "Arial", LightBlue );
   ObjectSetText("MinLot2", DoubleToStr(MinLot,2), 10, "Arial", Gold );
   ObjectSetText("MaxLot1", "MaxLot:", 10, "Arial", LightBlue );
   ObjectSetText("MaxLot2", DoubleToStr(MaxLot,0), 10, "Arial", Gold );
   ObjectSetText("LotStep1","LotStep:", 10, "Arial", LightBlue);
   ObjectSetText("LotStep2",DoubleToStr(LotStep,2),10, "Arial Bold", Gold);
   ObjectSetText("StopLevel1","StopLevel:", 10, "Arial", LightBlue);
   ObjectSetText("StopLevel2",DoubleToStr(StopLevel,2),10, "Arial Bold", Gold);
//////////////////////////////////////////////////////////  
   return(0);
  }
//==========================================================================================
   int ObjectMakeLabel(string n, int xoff, int yoff)
   {
   ObjectCreate(n,OBJ_LABEL,0,0,0);
   ObjectSet(n,OBJPROP_CORNER,CornerLabel);
   ObjectSet(n,OBJPROP_XDISTANCE,xoff);
   ObjectSet(n,OBJPROP_YDISTANCE,yoff);
   ObjectSet(n,OBJPROP_BACK,true);
   }
//==========================================================================================
   int init()
   {
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer);
//////////////////////////////////////////////////////////  
   int top=PositionUnDn;
   ObjectMakeLabel("gmt1",60,top-5 );
   ObjectMakeLabel("gmt2",15,top-5 );
   ObjectMakeLabel("bro1",60,top-25);
   ObjectMakeLabel("bro2",15,top-25);
   ObjectMakeLabel("LotStep1",60,top-45);  
   ObjectMakeLabel("LotStep2",20,top-45);
   ObjectMakeLabel("MinLot1",60,top-65 );
   ObjectMakeLabel("MinLot2",20,top-65 );
   ObjectMakeLabel("MaxLot1",60,top-85);
   ObjectMakeLabel("MaxLot2",5,top-85);
   ObjectMakeLabel("StopLevel1",60,top-105);
   ObjectMakeLabel("StopLevel2",20,top-105);
   ObjectMakeLabel("Spread Monitor1",60,top-125);
   ObjectMakeLabel("Spread Monitor2", 30,top-125);
   return(0);
   }
//==========================================================================================
   int deinit()
   {
   ObjectDelete("gmt1");
   ObjectDelete("gmt2");
   ObjectDelete("bro1");
   ObjectDelete("bro2");
   ObjectDelete("Spread Monitor1");   
   ObjectDelete("Spread Monitor2");
   ObjectDelete("LotStep1");
   ObjectDelete("LotStep2");
   ObjectDelete("MinLot1");
   ObjectDelete("MinLot2");
   ObjectDelete("MaxLot1");
   ObjectDelete("MaxLot2");
   ObjectDelete("StopLevel1");   
   ObjectDelete("StopLevel2");       
   return(0);
   }
//==========================================================================================
Reason: