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

 
hello

please i have this expert




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
 

Have we met before ?

It's already assigned !!!. Change the background color to white, click any of the button, notice the text on right bottom of the chart.

And thank you very much. I've been looking for this.

BTW, why don't you attach the full EA so the other forumers can help and comment on this. You post not enough code, BTW. They may know something that I don't.

Tell you what again, mine is working well.

:)

That's why I thank you.

 

full expert

http://www.mediafire.com/?aaj0h2t10enx8io

the problem is that all buttons do the same task

i want to know coordinates of each button to modify this line for each button

(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29)

 
3ammary:

full expert

http://www.mediafire.com/?aaj0h2t10enx8io

the problem is that all buttons do the same task

i want to know coordinates of each button to modify this line for each button

(WindowSize[0]-XY[0]>5 && WindowSize[0]-XY[0]<100 && XY[1]<29)

Attach it !!!.

The coordinates you looking for can be found in

 void Button(string text, int offset)
 

it is in development God will

,, and this is the last version of it till now,,

what i really want to know is,,,

what are those variables

xy[0]

xy[1]

WindowSize [0]

thanks

 
3ammary:

it is in development God will

,, and this is the last version of it till now,,

what i really want to know is,,,

what are those variables

xy[0]

xy[1]

WindowSize [0]

thanks

Since you sharing with us, and I thank you for it, and as I'm working on it now, I see what I can do. It's not easy you know.

BTW, what do you mean by :

it is in development God will

,, and this is the last version of it till now,,

what i really want to know is,,,

 

thanks alot dear :)

it is a tool,,, not a automatic trading expert

it is based on cycles,,,

it has a very complicated logic,, through programming,,, so i prefer to make it semi manual and semi automated

 
3ammary:

thanks alot dear :)

it is a tool,,, not a automatic trading expert

it is based on cycles,,,

it has a very complicated logic,, through programming,,, so i prefer to make it semi manual and semi automated

You're welcome.

I agree it is a tool, but I'm not so sure it's based on cycle, it draw some arrows but unfortunately somehow those arrows sometime not shown correctly :(.

BTW the XY[0], XY[1], WindowSize [0] and WindowSize [1] which is calculated in

bool OnClick(int& XY[2], int& WindowSize[2])

are for calculating the X and Y position of cursor and the width and height of the chart.

This is all I now right now, I haven't finish with it yet :)

 

task completed and this is the values,, thanks all

   
         //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;
            }
            //
 
special thanks for onewithzachy
 
3ammary:
special thanks for onewithzachy
You're welcome. I know you get this from mediafire, however, where do you hear this in the first place ?, cause something definitely is missing and I'd like to find out. :)
Reason: