任何菜鸟问题,为了不给论坛添乱。专业人士,不要路过。没有你就无处可去 - 6. - 页 341 1...334335336337338339340341342343344345346347348...1178 新评论 [删除] 2013.12.14 12:56 #3401 伙计们,请帮忙。我想写一个函数,使每个下一个开仓的订单的手数比前一个大2倍。这个函数给出了错误的值...它有什么问题呢?提前感谢! extern double LotBuy = 0.01; double GetLotBuy() { for(int n = 1; n<=CountBuy(); n++) { LotBuy=LotBuy*2; } return (LotBuy); } TarasBY 2013.12.14 13:21 #3402 Trader7777: 伙计们,请帮忙。我想写一个函数,使每个下一个开仓的订单的手数比前一个大2倍。这个函数给出了错误的值...它有什么问题呢?提前感谢! extern double LotBuy = 0.01; double GetLotBuy() { for(int n = 1; n<=CountBuy(); n++) { LotBuy=LotBuy*2; } return (LotBuy); } 对于初学者来说。 extern double LotBuy = 0.01; double GetLotBuy() { double ld_Lot = LotBuy; for(int n = 1; n<=CountBuy(); n++) {ld_Lot = LotBuy * n * 2;} return (ld_Lot); } max020780 2013.12.14 13:22 #3403 Trader7777: 伙计们,请帮忙。我想写一个函数,使每个下一个开仓的订单以2倍于前一个的手数开仓。这个函数给出了错误的值...它有什么问题呢?提前感谢! extern double LotBuy = 0.01; double GetLotBuy() { for(int n = 1; n<=CountBuy(); n++) { LotBuy=LotBuy*2; } return (LotBuy); } 试试这个。 double OrderLotsSB(string sy="", int op=-1, int mn=-1) { datetime o; int i, k=OrdersTotal(); double r=-1; if (sy=="0") sy=Symbol(); for (i=0; i<k; i++) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol()==sy || sy=="") { if ( OrderType()==OP_SELL||OrderType()==OP_BUY) { if (op<0 || OrderType()==OP_SELL||OrderType()==OP_BUY) { if (mn<0 || OrderMagicNumber()==Magic) { r=OrderLots()*2; } } } } } } return(r); } Victor Nikolaev 2013.12.14 13:41 #3404 TarasBY: 对于一个开始。 extern double LotBuy = 0.01; double GetLotBuy() { double ld_Lot = LotBuy; for(int n = 1; n<=CountBuy(); n++) {ld_Lot = LotBuy * n * 2;} return (ld_Lot); } 你在跟我开玩笑吗? forexman77 2013.12.14 13:43 #3405 在我自己的指标基础上做了一个EA。 开盘交易在指标相对于昨天的上升时买入,在指标的下降时卖出。 问题是,交易通过一个或更多的条形图打开和关闭。 该指标被设定为忽略在某一设定值上的移动。 如果没有多余的,指标值仍与前一栏相同(我认为问题出在这里)。 指标代码。 //+------------------------------------------------------------------+ //| EMAF.mq4 | //| Kamil Gazizullin | //| forexman77@yandex.ru | //+------------------------------------------------------------------+ #property copyright "Kamil Gazizullin" #property link "forexman77@yandex.ru" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Red //--- input parameters //--- buffers double ExtMapBuffer1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE,0,1); SetIndexBuffer(0,ExtMapBuffer1); IndicatorDigits(Digits+1); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(), limit; double raznica,raznica_static, MA_1_t, MA_2_t; if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=0;i<limit;i++) { static double MA_otshet; MA_1_t=iMA(NULL,0,7,0,MODE_EMA,PRICE_CLOSE,i+0); MA_2_t=iMA(NULL,0,7,0,MODE_EMA,PRICE_CLOSE,i+1); raznica=MA_1_t-MA_2_t; raznica_static=MA_1_t-MA_otshet; if(raznica_static > -0.003 && raznica_static < 0.003) { ExtMapBuffer1[i]=MA_otshet; } else if(raznica > -0.003 && raznica < 0.003) { ExtMapBuffer1[i]=MA_2_t; MA_otshet=MA_2_t; } if((raznica > 0.003) || (raznica <- 0.003)) { ExtMapBuffer1[i]=MA_1_t; } } return(0); } //+------------------------------------------------------------------+ EA的交易标准。 // Торговые критерии EMAF_1=iCustom(NULL, 0, "EMAF",0,0,i+0); EMAF_2=iCustom(NULL, 0, "EMAF",0,0,i+1); static datetime t; if (EMAF_1 > EMAF_2) { Opn_B=true; t=Time[0]; } if (EMAF_1 < EMAF_2) { if(Time[0]>t) { Cls_B=true; } } [删除] 2013.12.14 13:54 #3406 klop: 你好! 需要一个这样的脚本。 是 欧元/英镑/1手/开盘312.25/下滑559.45/最高价454.55 yui/ghf / 1 lot / open 3.28 / sl 5.65 / tp 4.65 .../... / 1手 / 打开 ...... / sl ...... / tp ....... 成为 欧元/英镑/1.02手/开盘312.25/最低价559.45/最高价454.55 yui/ghf / 1.02 lot / open 3.28 / sl 5.65 / tp 4.65 .../... / 1.02 lot / open ...... / sl ...... / tp ....... 什么会关闭具有一定数量(手)的挂单,并以另一种数量开立新的订单,但同样的进入水平、停止和采取。 我不知道......也许有人做过。 如果你正在寻找一个具有这种功能的脚本,你可以使用本网站的搜索引擎。 [删除] 2013.12.14 14:00 #3407 max020780: 我不明白这里的一切...... 我希望如果第二个单向订单被打开,手数以几何级数 增加(乘数为2)。 TarasBY 2013.12.14 14:03 #3408 Vinin: 你是在开玩笑吗? 解决办法往往由几个 "步骤 "组成。第1步是减少地段面积的指数 增长。一路走来,我们至少给循环的使用赋予了一些意义。既然我们不知道 "起点在哪里",进一步的步骤就留给作者。;) [删除] 2013.12.14 14:15 #3409 TarasBY: 解决办法往往由几个 "步骤 "组成。第1步是减少地段面积的指数增长。同时,我们至少要给循环的使用赋予一些意义。既然我们不知道 "起点在哪里",那么进一步的步骤就取决于作者了。;) 这当然很好,但仍旧是,如何表达如何打开下一个比前一个多出一倍的单向订单?已经有两个工作函数CountBuy()和CountSell()。 TarasBY 2013.12.14 14:41 #3410 Trader7777: 是什么阻止了你做这样的检查(脚本)? 附加的文件: check_lots.mq4 1 kb 1...334335336337338339340341342343344345346347348...1178 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
伙计们,请帮忙。我想写一个函数,使每个下一个开仓的订单的手数比前一个大2倍。这个函数给出了错误的值...它有什么问题呢?提前感谢!
extern double LotBuy = 0.01;
double GetLotBuy()
{
for(int n = 1; n<=CountBuy(); n++)
{
LotBuy=LotBuy*2;
}
return (LotBuy);
}
伙计们,请帮忙。我想写一个函数,使每个下一个开仓的订单的手数比前一个大2倍。这个函数给出了错误的值...它有什么问题呢?提前感谢!
extern double LotBuy = 0.01;
double GetLotBuy()
{
for(int n = 1; n<=CountBuy(); n++)
{
LotBuy=LotBuy*2;
}
return (LotBuy);
}
对于初学者来说。
extern double LotBuy = 0.01;
double GetLotBuy()
{
double ld_Lot = LotBuy;
for(int n = 1; n<=CountBuy(); n++)
{ld_Lot = LotBuy * n * 2;}
return (ld_Lot);
}
伙计们,请帮忙。我想写一个函数,使每个下一个开仓的订单以2倍于前一个的手数开仓。这个函数给出了错误的值...它有什么问题呢?提前感谢!
extern double LotBuy = 0.01;
double GetLotBuy()
{
for(int n = 1; n<=CountBuy(); n++)
{
LotBuy=LotBuy*2;
}
return (LotBuy);
}
试试这个。
对于一个开始。
extern double LotBuy = 0.01;
double GetLotBuy()
{
double ld_Lot = LotBuy;
for(int n = 1; n<=CountBuy(); n++)
{ld_Lot = LotBuy * n * 2;}
return (ld_Lot);
}
你在跟我开玩笑吗?
在我自己的指标基础上做了一个EA。
开盘交易在指标相对于昨天的上升时买入,在指标的下降时卖出。
问题是,交易通过一个或更多的条形图打开和关闭。
该指标被设定为忽略在某一设定值上的移动。
如果没有多余的,指标值仍与前一栏相同(我认为问题出在这里)。
指标代码。
EA的交易标准。
你好!
需要一个这样的脚本。
是
欧元/英镑/1手/开盘312.25/下滑559.45/最高价454.55
yui/ghf / 1 lot / open 3.28 / sl 5.65 / tp 4.65
.../... / 1手 / 打开 ...... / sl ...... / tp .......
成为
欧元/英镑/1.02手/开盘312.25/最低价559.45/最高价454.55
yui/ghf / 1.02 lot / open 3.28 / sl 5.65 / tp 4.65
.../... / 1.02 lot / open ...... / sl ...... / tp .......
什么会关闭具有一定数量(手)的挂单,并以另一种数量开立新的订单,但同样的进入水平、停止和采取。
我不知道......也许有人做过。
我不明白这里的一切......
我希望如果第二个单向订单被打开,手数以几何级数 增加(乘数为2)。
你是在开玩笑吗?
解决办法往往由几个 "步骤 "组成。第1步是减少地段面积的指数增长。同时,我们至少要给循环的使用赋予一些意义。既然我们不知道 "起点在哪里",那么进一步的步骤就取决于作者了。;)
这当然很好,但仍旧是,如何表达如何打开下一个比前一个多出一倍的单向订单?已经有两个工作函数CountBuy()和CountSell()。