could any one please help me assigning each button to its task ,, thanks in advance

 

mk

 hello

please i have this expert

http://www.mediafire.com/?aaj0h2t10enx8io
i need every button to do its task 

the key is in this code

////////////....................//////////

//logic of x1 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<540 && XY[1]<29) ///adddddddd
{
click=0;
continue;
}
//logic of x3 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<400 && XY[1]<29) ///aass
{
click=11;
continue;
}
//logic of x5 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=14;
continue;
}
//logic of x7 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=17;
continue;
}
//logic of x9 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=20;
continue;
}
//logic of x11 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=23;
continue;
}
//logic of x13 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=26;
continue;
}
//logic of x15 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=29;
continue;
}
//////////////...................///////////

//////////////////////////////////////////////////////

bool OnClick(int& XY[2], int& WindowSize[2])
{int pci[5];
int lpRect[4];
static bool clicked;
static int prevcursor;
bool result=false;
int click = GetAsyncKeyState(1);
if(GetTopWindow(parent2)!=parent1) return(false);
if(GetForegroundWindow() != parent3) return(false);
pci[0]=20;
if(GetCursorInfo(pci))
{if(GetWindowRect(WindowHandle(Symbol(),Period()),lpRect))
{if(!clicked && prevcursor==cursor && click<0 && pci[3]>lpRect[0]+5 && pci[3]<lpRect[2]-42 && pci[4]>lpRect[1]+5 && pci[4]<lpRect[3]-21)
{clicked = true;
result = true;
XY[0] = pci[3]-(lpRect[0]+5);
XY[1] = pci[4]-(lpRect[1]+5); }
WindowSize[0] = (lpRect[2]-42) - (lpRect[0]+5);
WindowSize[1] = (lpRect[3]-21) - (lpRect[1]+5); }
if(click==0) clicked = false;
prevcursor = pci[2]; }
return(result); }
bool XY2PriceBar(int XY[],int Size[], double& PriceTime[])
{int PXperBar = (Size[0]/WindowBarsPerChart()/2)*2;
if(PXperBar<1) PXperBar=1;
int Clicked_Bar = WindowFirstVisibleBar() - NormalizeDouble((XY[0]-0.0)/PXperBar,0);
double PXperPoint = Size[1]/((WindowPriceMax()-WindowPriceMin())/Point);
double Clicked_Price = NormalizeDouble(WindowPriceMax() - XY[1]/PXperPoint*Point ,Digits);
if(Clicked_Bar<0) Clicked_Bar=0;
PriceTime[0] = Clicked_Price;
PriceTime[1] = Clicked_Bar;
if(PriceTime[0]>Point && PriceTime[1]>EMPTY) return(true);
else return(false);}

/////////////////////////////////////////////////////////



but i don't know what is xy and what is WindowSize

could any one please modify it for me ,,,

or just tell me what are those variables

xy[0]

xy[1]

WindowSize [0]



thanks alot in advance

 

1. Please post your code using SRC button.

 

2. That's an MQL4 codes so you have to go MQL4.com

 
i put it there
 

but please could any one tell me 

what are those variables

xy[0]

xy[1]

WindowSize [0]

////////////....................//////////

//logic of x1 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<540 && XY[1]<29) ///adddddddd
{
click=0;
continue;
}
//logic of x3 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<400 && XY[1]<29) ///aass
{
click=11;
continue;
}
//logic of x5 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=14;
continue;
}
//logic of x7 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=17;
continue;
}
//logic of x9 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=20;
continue;
}
//logic of x11 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=23;
continue;
}
//logic of x13 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=26;
continue;
}
//logic of x15 button
if(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29) ///adddddddd
{
click=29;
continue;
}
//////////////...................///////////

////////////////////////////////////////////////////// 

bool OnClick(int& XY[2], int& WindowSize[2])
{int pci[5];
int lpRect[4];
static bool clicked;
static int prevcursor;
bool result=false;
int click = GetAsyncKeyState(1);
if(GetTopWindow(parent2)!=parent1) return(false); 
if(GetForegroundWindow() != parent3) return(false); 
pci[0]=20; 
if(GetCursorInfo(pci)) 
{if(GetWindowRect(WindowHandle(Symbol(),Period()),lpRect))
{if(!clicked && prevcursor==cursor && click<0 && pci[3]>lpRect[0]+5 && pci[3]<lpRect[2]-42 && pci[4]>lpRect[1]+5 && pci[4]<lpRect[3]-21)
{clicked = true;
result = true;
XY[0] = pci[3]-(lpRect[0]+5);
XY[1] = pci[4]-(lpRect[1]+5); }
WindowSize[0] = (lpRect[2]-42) - (lpRect[0]+5);
WindowSize[1] = (lpRect[3]-21) - (lpRect[1]+5); }
if(click==0) clicked = false; 
prevcursor = pci[2]; }
return(result); }
bool XY2PriceBar(int XY[],int Size[], double& PriceTime[])
{int PXperBar = (Size[0]/WindowBarsPerChart()/2)*2;
if(PXperBar<1) PXperBar=1;
int Clicked_Bar = WindowFirstVisibleBar() - NormalizeDouble((XY[0]-0.0)/PXperBar,0);
double PXperPoint = Size[1]/((WindowPriceMax()-WindowPriceMin())/Point);
double Clicked_Price = NormalizeDouble(WindowPriceMax() - XY[1]/PXperPoint*Point ,Digits);
if(Clicked_Bar<0) Clicked_Bar=0;
PriceTime[0] = Clicked_Price;
PriceTime[1] = Clicked_Bar;
if(PriceTime[0]>Point && PriceTime[1]>EMPTY) return(true);
else return(false);}

///////////////////////////////////////////////////////// 

 

 

task completed ,,

   
         //logic of x1 button
         if(WindowSize[0]-XY[0]>500 && WindowSize[0]-XY[0]<540 && XY[1]<29) ///adddddddd
           {
             click=0;
              continue;
            }
           //logic of x3 button
       if(WindowSize[0]-XY[0]>450 && WindowSize[0]-XY[0]<490 && XY[1]<29)  ///aass
           {
             click=11;
              continue;
            }
     //logic of x5 button
      if(WindowSize[0]-XY[0]>400 && WindowSize[0]-XY[0]<440 && XY[1]<29) ///adddddddd
           {
             click=14;
              continue;
            }
           //logic of x7 button
              if(WindowSize[0]-XY[0]>350 && WindowSize[0]-XY[0]<390 && XY[1]<29) ///adddddddd
           {
             click=17;
              continue;
            }
            //logic of x9 button
              if(WindowSize[0]-XY[0]>300 && WindowSize[0]-XY[0]<340 && XY[1]<29) ///adddddddd
           {
             click=20;
              continue;
            }
             //logic of x11 button
              if(WindowSize[0]-XY[0]>225 && WindowSize[0]-XY[0]<285 && XY[1]<29) ///adddddddd
           {
             click=23;
              continue;
            }
           //logic of x13 button
              if(WindowSize[0]-XY[0]>150 && WindowSize[0]-XY[0]<210 && XY[1]<29) ///adddddddd
           {
             click=26;
              continue;
            }
            //logic of x15 button
              if(WindowSize[0]-XY[0]>75 && WindowSize[0]-XY[0]<135 && XY[1]<29) ///adddddddd
           {
             click=29;
              continue;
            }
            //

 

 
could any one please help me assigning each button to its task ,, thanks in advance - MQL4 forum
  • www.mql5.com
could any one please help me assigning each button to its task ,, thanks in advance - MQL4 forum
Reason: