Buttons & Textfields on mt4 chart possible now - page 6

 

Hi,

Is anyone here able to provide me with the files for this please? Would really love to be able to use this sort of functionality, I've gone through to fx1.net and can't find anything at all. Tried googling but haven't had any luck finding downloads of all the files.

If anyone would be kind enough to provide copies it would be greatly appreciated. my email is paul@lukafour3.com or just pm me

Kind regards

Paul

 
fridaystreet:

Hi,

Is anyone here able to provide me with the files for this please? Would really love to be able to use this sort of functionality, I've gone through to fx1.net and can't find anything at all. Tried googling but haven't had any luck finding downloads of all the files.

If anyone would be kind enough to provide copies it would be greatly appreciated. my email is paul@lukafour3.com or just pm me

Kind regards

Paul


Actually, I do not understand your problem.

I got my copies by visiting fx1.net first which led me to this site:

https://www.mql5.com/go?link=http://taurus-traders.com/index.php/de/services/forex-download/viewdownload/6-plugins/246-mt4gui-toolbox-addon-for-metatrader

I got the dll's from there. The "Download" button is at the bottom of the page, after the text.

It is all explained how to use the functions to create buttons.

Just remember the down-sides and first thoroughly test your program on demos, to avoid unpleasant surprises

if you are going to use these buttons in real account live trading !!!

Also, read this thread from the begining to end!

AND: Did you Google for "mt4gui.dll" ??? Try, you will be surprised how easy this is !!!

 

Hi,

I wrote a simple EA based on MT4GUI, but unfortunately MT4 crashes, when I try to change timeframe (e.g. from M1 to M5). Did anyone else experience this or have an idea how to fix it?

I tried many ways but so far couldn't find a solution. Even the simpliest EA with buttons crashes, when changing timeframes. I experienced the issue on builds 432 and 438.

Thanks

 
darksamu:

Hi,

I wrote a simple EA based on MT4GUI, but unfortunately MT4 crashes, when I try to change timeframe (e.g. from M1 to M5). Did anyone else experience this or have an idea how to fix it?

I tried many ways but so far couldn't find a solution. Even the simpliest EA with buttons crashes, when changing timeframes. I experienced the issue on builds 432 and 438.

Thanks

Yes, it does. I wrote about this earlier.

There is nothing you can do about it, it is a dll issue.

Just work around by opening many charts, each with different TF.

Or, I also do it like this:

There is another situation, when the dll's crash MT4, when you want to modify externs by clicking the smiley face.

That is why I made the Defaults button, which removes the EA and opens it again, popping up the EA initiation window.

 

Hi Dadas,

can you insert part your code, please? I don´t know create menu about "Select Lot size". Thank you.

 
endy5:

Hi Dadas,

can you insert part your code, please? I don´t know create menu about "Select Lot size". Thank you.


int    hwnd = WindowHandle(Symbol(),Period());

string MinimumLot = DoubleToStr(MarketInfo(Symbol(),MODE_MINLOT),2);

int SelectLotSizeBox = tbPutObject(hwnd,"list",-130,213,60,9,"");
    tbAddListItem(hwnd,SelectLotSizeBox,MinimumLot);
    if(MinimumLot=="0.01"){
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.02");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.03");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.04");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.05");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.06");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.07");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.08");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.09");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.10");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.20");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.30");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.40");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.60");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.70");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.80");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.90");
    tbAddListItem(hwnd,SelectLotSizeBox ,"1.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"2.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"3.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"4.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"5.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"6.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"7.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"8.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"9.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"10.00");}
    if(MinimumLot=="0.10"){  
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.20");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.30");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.40");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.60");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.70");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.80");
    tbAddListItem(hwnd,SelectLotSizeBox ,"0.90");
    tbAddListItem(hwnd,SelectLotSizeBox ,"1.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"2.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"3.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"4.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"5.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"6.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"7.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"8.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"9.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"10.00");}
    if(MinimumLot=="1.00"){    
    tbAddListItem(hwnd,SelectLotSizeBox ,"2.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"3.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"4.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"5.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"6.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"7.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"8.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"9.00");
    tbAddListItem(hwnd,SelectLotSizeBox ,"10.00");    
    }
    tbSetListSel(hwnd,SelectLotSizeBox ,0);
This is how I do it.
 
Good afternoon.
sorry for my English I am French.
I do not understand very well how the lists.
could you tell me how it recovers its values?

sample .

    tbAddListItem(hwnd,SelectLotSizeBox ,"2.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"3.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"4.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"5.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"6.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"7.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"8.50");
    tbAddListItem(hwnd,SelectLotSizeBox ,"9.50"); 

    tbAddListItem(hwnd,SelectLotSizeBox ,"10.00");  

 

 

 

cordially
 

Hi Dadas,

thank you very much for insert your past code!!! I have it my code :-)

But I have one question - how I get value (lot size) from select menu (object SelectLotSizeBox).

I found function:  string tbGetListSel(int hwnd, int object); 

Code: string size=tbGetListSel(hwnd, SelectLotSizeBox);  

return for select lotsize 0.01 value zero,

          for select lotsize 0.02 value 1 etc. This is serial number from select item. Can I get directly value lotsize (0.01; 0.02; etc.)?

 

Thank you for help me. 

 
phenix77:
Good afternoon.
sorry for my English I am French.
I do not understand very well how the lists.
could you tell me how it recovers its values?

sample .

    tbAddListItem(hwnd,SelectLotSizeBox ,"10.00");  

 

 

 

Are you familiar with this?

  string tbVersion();         
  int tbPutObject(int,string,int,int,int,int,string); // hwnd,type,x,y,w,h,label     
  int tbSetBgColor(int,int,int); // hwnd,object,bgcolor  
  int tbSetTextColor(int,int,int); // hwnd,object,color  
  int tbRemove(int,int);
  int tbRemoveAll(int); // hwnd 
  int tbEnable(int,int,int); // hwnd, object, 0|1   
  bool tbIsClicked( int,int ); // hwnd,object  
  int tbSetText(int,int,string,int,string); // hwnd,object,text,fontsize,fontname     
  string tbGetText(int,int); // hwnd,object 
  int tbAddListItem(int,int,string); // hwnd,object,item  
  int tbGetListSel(int,int); // hwnd,object  
  int tbSetListSel(int,int,int); // hwnd,object,index 
This will Get you the value :
Lot=StrToDouble(tbGetText(hwnd,SelectLotSizeBox));

The text in the select box is text, so string - right?

And you must make this string to double - right? 

 

 
endy5:

Hi Dadas,

I found function:  string tbGetListSel(int hwnd, int object); 

Code: string size=tbGetListSel(hwnd, SelectLotSizeBox);  

return for select lotsize 0.01 value zero,

          for select lotsize 0.02 value 1 etc. This is serial number from select item. Can I get directly value lotsize (0.01; 0.02; etc.)?

 

Thank you for help me. 

// It is:
string tbGetText(int,int); // hwnd,object 
// This one is int (integer):
int tbGetListSel(int,int); // hwnd,object  
// You are looking for:
double size = StrToDouble(tbGetText(hwnd,SelectLotSizeBox));