编码帮助 - 页 754 1...747748749750751752753754755756757758759760761...786 新评论 Mladen Rakic 2017.01.23 11:21 #7531 1225113: 谢谢你的意见。有更多的需求,这个指标(附件)可以在EA中关闭所有未结订单和挂单吗? 如果你的意思是一个指标可以处理订单,它不能 ...如果你的意思是该指标的值可以用于此,那么,是的,它们可以。你必须使用一些逻辑来使用你的指标值,然后将该逻辑纳入你的EA中。但仅仅堆积指标是没有用的。定义你的严格规则,然后使用这些规则。 第三个问题:该指标会重绘。如果你试图从EA(任何EA)中使用它,你很快就会发现,试图从EA中使用该指标来获得任何形式的信号都是无用的。 [删除] 2017.01.23 11:35 #7532 能否为这两个指标增加一个警报?谢谢团队投资者(TEAMTRADER 附加的文件: IndicatorCrossCCI 8.ex4 27 kb IndicatorCrossCCI 8v2.mq4 17 kb baraozemo 2017.01.23 14:49 #7533 嗨。我使用MT5。 我需要一个显示增量评论的函数,使用FIFOshowcomment("EA开始")。showcomment ("buy at xxxx") ;showcomment ("sell close at xxxx") ;等等......等等。showcomment ("EA Finished at 23:00")。 Mladen Rakic 2017.01.23 16:51 #7534 baraozemo: 嗨。我使用MT5。 我需要一个显示增量评论的函数,使用FIFOshowcomment("EA开始")。showcomment ("buy at xxxx") ;showcomment ("sell close at xxxx") ;等等......等等。showcomment ("EA Finished at 23:00")。 试试这样的方法。 #define _maxLinesInComment 20string _commentLines[_maxLinesInComment];void incrementalComment(string line){ static int linesCount=0; if (linesCount==_maxLinesInComment) for (int i=0; i<linesCount-1; i++) _commentLines[i]=_commentLines[i+1]; _commentLines[MathMin(linesCount,_maxLinesInComment-1)] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1); string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n"; Comment(comment); } baraozemo 2017.01.23 17:23 #7535 mladen: 试试这样的方法: #define _maxLinesInComment 20string _commentLines[_maxLinesInComment];void incrementalComment(string line){ static int linesCount=0; if (linesCount==_maxLinesInComment) for (int i=0; i<linesCount-1; i++) _commentLines[i]=_commentLines[i+1]; _commentLines[MathMin(linesCount,_maxLinesInComment-1)] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1); string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n"; Comment(comment); } Mladen 谢谢你的回答。填充20行后,代码没有 "向上滚动 "注释... 最老的一行注释应该被删除,以进入新的注释。 Mladen Rakic 2017.01.23 17:34 #7536 baraozemo: Mladen 谢谢你的回答。填完20行后,代码没有 "滚动 "注释......。 最早的一行注释应该被删除,以进入新的注释。 试试这个。 #define _maxLinesInComment 20string _commentLines[_maxLinesInComment];void incrementalComment(string line){ static int linesCount=0; if (linesCount==_maxLinesInComment-1) for (int i=0; i<_maxLinesInComment-1; i++) _commentLines[i]=_commentLines[i+1]; _commentLines[linesCount] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1); string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n"; Comment(comment); } baraozemo 2017.01.23 19:21 #7537 谢谢,效果很好 Cenk 2017.01.24 09:47 #7538 mladen: 试试这个。 #define _maxLinesInComment 20string _commentLines[_maxLinesInComment];void incrementalComment(string line){ static int linesCount=0; if (linesCount==_maxLinesInComment-1) for (int i=0; i<_maxLinesInComment-1; i++) _commentLines[i]=_commentLines[i+1]; _commentLines[linesCount] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1); string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n"; Comment(comment); } 亲爱的@mladen,如果可能的话,你能不能在所有方框都是绿色或红色的时候给附件中的趋势指标添加一个警报? 附加的文件: Trend indicator_LuXingMod(1).zip 4 kb 1225113 2017.01.24 10:34 #7539 mladen: 如果你的意思是一个指标可以处理订单,它不能 ...如果你的意思是该指标的值可以用于此,那么,是的,它们可以。你必须使用一些逻辑来使用你的指标值,然后将该逻辑纳入你的EA中。但仅仅堆积指标是没有用的。确定你的严格规则,然后使用这些规则。 第三点:该指标会重绘。如果你试图从EA(任何EA)中使用它,你很快就会发现,试图从EA中使用该指标来获得任何形式的信号都是无用的。 亲爱的mladen。我非常同意你的观点,如果应用于其他EA的信号,但我只用于手动交易,而平仓单要戴上EA...我需要HH或LL来平仓单,不管我的想法是什么?...或者你有更好的EA,因为我想推荐给我,你能告诉我吗?谢谢您的关注 Mladen Rakic 2017.01.24 10:44 #7540 1225113: 亲爱的mladen。我非常同意你的观点,如果应用于其他EA的信号,但我只用于手动交易,而平仓单要穿EA...我需要HH或LL来平仓,不管我的想法是什么?...或者你有更好的EA,因为我想推荐给我,你能告诉我吗?谢谢您的关注 您的原始问题是: 1225113: 谢谢你的意见。有一个更多的需求,这个指标(附件)可以在EA中 关闭所有未结订单和挂单吗? 回答是关于这一点的。在任何情况下,如果你是手动交易,那么就没有必要改变任何东西(甚至是重绘指标)。 1...747748749750751752753754755756757758759760761...786 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
谢谢你的意见。有更多的需求,这个指标(附件)可以在EA中关闭所有未结订单和挂单吗?
如果你的意思是一个指标可以处理订单,它不能 ...
如果你的意思是该指标的值可以用于此,那么,是的,它们可以。你必须使用一些逻辑来使用你的指标值,然后将该逻辑纳入你的EA中。但仅仅堆积指标是没有用的。定义你的严格规则,然后使用这些规则。
第三个问题:该指标会重绘。如果你试图从EA(任何EA)中使用它,你很快就会发现,试图从EA中使用该指标来获得任何形式的信号都是无用的。
能否为这两个指标增加一个警报?
谢谢
团队投资者(TEAMTRADER
嗨。
我使用MT5。
我需要一个显示增量评论的函数,使用FIFO
showcomment("EA开始")。
showcomment ("buy at xxxx") ;
showcomment ("sell close at xxxx") ;
等等......等等。
showcomment ("EA Finished at 23:00")。
嗨。
我使用MT5。
我需要一个显示增量评论的函数,使用FIFO
showcomment("EA开始")。
showcomment ("buy at xxxx") ;
showcomment ("sell close at xxxx") ;
等等......等等。
showcomment ("EA Finished at 23:00")。
试试这样的方法。
string _commentLines[_maxLinesInComment];
void incrementalComment(string line)
{
static int linesCount=0;
if (linesCount==_maxLinesInComment) for (int i=0; i<linesCount-1; i++) _commentLines[i]=_commentLines[i+1];
_commentLines[MathMin(linesCount,_maxLinesInComment-1)] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1);
string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n";
Comment(comment);
}
试试这样的方法:
string _commentLines[_maxLinesInComment];
void incrementalComment(string line)
{
static int linesCount=0;
if (linesCount==_maxLinesInComment) for (int i=0; i<linesCount-1; i++) _commentLines[i]=_commentLines[i+1];
_commentLines[MathMin(linesCount,_maxLinesInComment-1)] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1);
string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n";
Comment(comment);
}
Mladen 谢谢你的回答。
填充20行后,代码没有 "向上滚动 "注释...
最老的一行注释应该被删除,以进入新的注释。
Mladen 谢谢你的回答。
填完20行后,代码没有 "滚动 "注释......。
最早的一行注释应该被删除,以进入新的注释。
试试这个。
string _commentLines[_maxLinesInComment];
void incrementalComment(string line)
{
static int linesCount=0;
if (linesCount==_maxLinesInComment-1) for (int i=0; i<_maxLinesInComment-1; i++) _commentLines[i]=_commentLines[i+1];
_commentLines[linesCount] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1);
string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n";
Comment(comment);
}
试试这个。
string _commentLines[_maxLinesInComment];
void incrementalComment(string line)
{
static int linesCount=0;
if (linesCount==_maxLinesInComment-1) for (int i=0; i<_maxLinesInComment-1; i++) _commentLines[i]=_commentLines[i+1];
_commentLines[linesCount] = line; linesCount=MathMin(linesCount+1,_maxLinesInComment-1);
string comment = ""; for (int i=0; i<linesCount; i++) comment += _commentLines[i]+"\n";
Comment(comment);
}
亲爱的@mladen,
如果可能的话,你能不能在所有方框都是绿色或红色的时候给附件中的趋势指标添加一个警报?
如果你的意思是一个指标可以处理订单,它不能 ...
如果你的意思是该指标的值可以用于此,那么,是的,它们可以。你必须使用一些逻辑来使用你的指标值,然后将该逻辑纳入你的EA中。但仅仅堆积指标是没有用的。确定你的严格规则,然后使用这些规则。
第三点:该指标会重绘。如果你试图从EA(任何EA)中使用它,你很快就会发现,试图从EA中使用该指标来获得任何形式的信号都是无用的。
您的原始问题是:
谢谢你的意见。有一个更多的需求,这个指标(附件)可以在EA中 关闭所有未结订单和挂单吗?