现在可以在mt4图表上设置按钮和文本字段了 - 页 6

 

你好。

有谁能为我提供这方面的文件吗?我真的很想能够使用这种功能,我已经通过fx1.net,但根本找不到任何东西。我试着在谷歌上搜索,但没有任何运气找到所有文件的下载。

如果有人愿意提供副本,我将不胜感激。我的电子邮件是:paul@lukafour3.com 或直接给我发邮件。

致以诚挚的问候

保罗

 
fridaystreet:

你好。

有谁能为我提供这方面的文件吗?我真的很想能够使用这种功能,我已经通过fx1.net,但根本找不到任何东西。我试着在谷歌上搜索,但没有任何运气找到所有文件的下载。

如果有人愿意提供副本,我将不胜感激。我的电子邮件是:paul@lukafour3.com 或直接给我发邮件。

致以诚挚的问候

保罗


事实上,我不明白你的问题。

我首先通过访问fx1.net得到了我的副本,这使我找到了这个网站。

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

我从那里得到了dll's。下载 "按钮在页面的底部,在文字之后。

上面都解释了如何使用这些函数来创建按钮。

只要记住缺点,并首先在演示中彻底测试你的程序,以避免不愉快的意外发生

如果你打算在真实账户中使用这些按钮的话

另外,请从头到尾阅读这个主题!

还有:你在谷歌上搜索了 "mt4gui.dll "吗?试试吧,你会惊讶于这是多么容易的事情!!!。

 

你好。

我写了一个基于MT4GUI的简单EA,但不幸的是,当我试图改变时间框架(例如,从M1到M5)时,MT4崩溃了。有谁遇到过这种情况,或者有办法解决吗?

我尝试了很多方法,但到目前为止还没有找到解决方案。即使是最简单的带有按钮的EA,在改变时间框架时也会崩溃。我在432和438版本中遇到了这个问题。

谢谢

 
darksamu:

你好。

我写了一个基于MT4GUI的简单EA,但不幸的是,当我试图改变时间框架(例如,从M1到M5)时,MT4崩溃了。有谁遇到过这种情况,或者有办法解决吗?

我尝试了很多方法,但到目前为止还没有找到解决方案。即使是最简单的带有按钮的EA,在改变时间框架时也会崩溃。我在432和438版本中遇到了这个问题。

谢谢

是的,确实如此。我之前写过这个问题。

你对此无能为力,这是个程序库问题。

你可以通过打开许多图表来解决这个问题,每个图表有不同的TF。

或者,我也是这样做的。

还有一种情况,当你想通过点击笑脸来修改外部设备时,dll会使MT4崩溃。

这就是为什么我做了 "默认 "按钮,它可以删除EA并再次打开,弹出EA启动窗口。

 

嗨,达达斯。

你能插入你的部分代码吗?我不知道如何创建 "选择批量大小 "的菜单。谢谢你。

 
endy5:

嗨,达达斯。

你能插入你的部分代码吗?我不知道如何创建 "选择批量大小 "的菜单。谢谢你。


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);
我是这样做的。
 
下午好。
对不起,我的英语是法国人。
我不太理解列表的内容。
你能告诉我它是如何恢复其价值的吗?

示例.

    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")。

诚恳地
 

嗨,达达斯。

非常感谢你插入你过去的代码!!我有我的代码:-)

但我有一个问题--我如何从选择菜单(对象SelectLotSizeBox)中获得数值(手数)。

我发现函数:string tbGetListSel(int hwnd, int object)。

代码:字符串size=tbGetListSel(hwnd, SelectLotSizeBox)

返回选择批量0.01的值为零。

对于选择批号0.02的值为1,等等。这是选择项目的序列号。我可以直接得到lotsize的值(0.01;0.02;等等)吗?

谢谢你对我的帮助。

 
phenix77:
下午好。
对不起,我的英语是法国人。
我不太理解列表的内容。
你能告诉我它是如何恢复其价值的吗?

示例.

tbAddListItem(hwnd,SelectLotSizeBox ,"10.00")。

你对这个熟悉吗?

  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 
这将使你得到价值:
Lot=StrToDouble(tbGetText(hwnd,SelectLotSizeBox));

选择框中的文本是文本,所以是字符串--对吗?

而且你必须使这个字符串变成双倍的--对吗?

 
endy5:

嗨,Dadas。

我发现函数:string tbGetListSel(int hwnd, int object)。

代码:字符串size=tbGetListSel(hwnd, SelectLotSizeBox)

返回选择批量0.01的值为零。

对于选择批号0.02的值为1,等等。这是选择项目的序列号。我可以直接得到lotsize的值(0.01;0.02;等等)吗?

谢谢你对我的帮助。

// 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));