有一个有趣的交易想法。帮助我找到代码中的错误(mql4)。 - 页 15 1...89101112131415161718 新评论 Sergey Gritsay 2016.03.13 09:13 #141 Alexander Zakharov:请告知如何解决未识别变量的错误,我对MQL4不是很在行。// 批量计算如果(MarketInfo(Symbol(),MODE_LOTSTEP)==0.01) int digit=2;如果(MarketInfo(Symbol(),MODE_LOTSTEP)==0.10) int digit=1;如果(MarketInfo(Symbol(),MODE_LOTSTEP)==1.00) int digit=0;double _lot =NormalizeDouble(lot* MathPow(koef,totalO(-1,key)),digit);这里,它没有看到这个变量之前的条目(double min=MarketInfo(Symbol(),MODE_MINLOT);如果(_lot<min)_lot=min。这里是批量归一化函数double volume_n(string symbol,double lot) { double MinLot=SymbolInfoDouble(symbol,SYMBOL_VOLUME_MIN); double MaxLot=SymbolInfoDouble(symbol,SYMBOL_VOLUME_MAX); double LotStep=SymbolInfoDouble(symbol,SYMBOL_VOLUME_STEP); if(lot<MinLot)lot=MinLot; if(lot>MaxLot)lot=MaxLot; if(LotStep==0.001) return(NormalizeDouble(lot,3)); if(LotStep==0.01) return(NormalizeDouble(lot,2)); if(LotStep==0.1) return(NormalizeDouble(lot,1)); return(NormalizeDouble(lot,0)); }使用double _lot=volume_n(_Symbol,lot* MathPow(koef,totalO(-1,key)) Alexander Zakharov 2016.03.13 11:32 #142 Sergey Gritsay:这里是批量归一化函数申请 谢谢 Сергей Криушин 2016.03.14 12:16 #143 Sergey Gritsay: 调整了酒吧模式。在mt5的版本中,我添加了趋势指标 THV4。 我一直在从各方面旋转这个测试器--它正在失去...只有当我在购买时留下一个信号...。我一直在从各方面研究这个测试器--它正在失去......只有当我为购买留下一个信号时......它或多或少在挑选,而且拖网时间太长......它在自己后面留下零......。 Sergey Gritsay 2016.03.14 12:22 #144 Сергей Криушин: 我一直在从各个角度旋转这个测试器--它是一个失败者......只有当你留下一个买入信号时...d你的意思是它需要很长的时间,它留下了什么样的零... d你说它花的时间太长是什么意思,它留下了哪些零? Alexander Bereznyak 2016.03.14 12:29 #145 Sergey Gritsay:这里是批量归一化函数应用有一个更优雅的解决方案。double volume_step=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP); int volume_digits=(int)(MathLog(1.0/volume_step)/MathLog(10.0)); Сергей Криушин 2016.03.14 12:45 #146 Sergey Gritsay: d在触发的时间上,它留下了哪些零点?利润=0.02016.03.14 12:35:31 64321035 USDCHF sell in 0.05 0.98764 78568040 0.00 0.00 0.00 63 366.94 2016.03.14 13:00:34 64323324 GBPUSD buy in 0.01 1.43567 78570253 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:00:55 64323378 USDJPY buy in 0.01 113.688 78570307 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:00:56 64323380 NZDUSD sell in 0.01 0.67134 78570308 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:01:14 64323403 CHFJPY buy in 0.01 115.162 78570331 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:01:15 64323406 EURGBP buy in 0.01 0.77432 78570334 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:01:16 64323408 EURJPY buy in 0.01 126.363 78570336 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:01:17 64323409 EURUSD buy in 0.01 1.11148 78570337 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:01:18 64323410 GBPJPY buy in 0.01 163.208 78570338 0.00 0.00 0.00 63 366.94 exp_cci 2016.03.14 13:01:18 64323412 EURJPY sell out 0.01 126.356 78570340 0.00 0.00 -0.06 63 366.88 2016.03.14 13:01:21 64323417 USDSEK sell in 0.01 8.35246 78570345 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 13:01:21 64323418 USDZAR sell in 0.01 15.35749 78570346 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 13:07:25 64323874 GBPUSD sell out 0.01 1.43567 78570786 0.00 0.00 0.00 63 366.88 [sl 1.43567] 2016.03.14 13:09:06 64323946 USDCHF buy out 0.05 0.98764 78570855 0.00 0.00 0.00 63 366.88 [sl 0.98764] 2016.03.14 13:23:54 64324855 USDCHF sell in 0.01 0.98745 78571736 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 14:00:00 64328785 AUDUSD buy in 0.01 0.75339 78575571 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 14:00:05 64328795 GBPUSD buy in 0.01 1.43463 78575585 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 14:00:05 64328797 AUDCAD buy in 0.01 0.99889 78575587 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 14:00:07 64328802 EURJPY buy in 0.01 126.311 78575592 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 14:00:07 64328805 USDMXN sell in 0.01 17.76137 78575595 0.00 0.00 0.00 63 366.88 exp_cci 2016.03.14 14:00:08 64328807 USDZAR buy out 0.01 15.42380 78575597 0.00 0.00 -4.30 63 362.58 2016.03.14 14:00:08 64328808 EURJPY sell out 0.01 126.301 78575598 0.00 0.00 -0.09 63 362.49 2016.03.14 14:00:11 64328812 USDHKD sell in 0.09 7.75715 78575601 0.00 0.00 0.00 63 362.49 exp_cci 2016.03.14 14:00:12 64328813 USDZAR buy in 0.01 15.42351 78575602 0.00 0.00 0.00 63 362.49 exp_cci 2016.03.14 14:04:12 64329157 GBPUSD sell out 0.01 1.43463 78575943 0.00 0.00 0.00 63 362.49 [sl 1.43463] 2016.03.14 14:04:50 64329180 GBPUSD buy in 0.01 1.43462 78575964 0.00 0.00 0.00 63 362.49 exp_cci 2016.03.14 14:05:43 64329266 EURJPY buy in 0.01 126.360 78576048 0.00 0.00 0.00 63 362.49 exp_cci 2016.03.14 14:15:01 64330159 USDCAD buy in 0.01 1.32450 78576911 0.00 0.00 0.00 63 362.49 exp_cci 2016.03.14 14:15:02 64330160 EURJPY sell out 0.01 126.429 78576913 0.00 0.00 0.61 63 363.10 2016.03.14 14:15:04 64330169 USDSEK buy out 0.01 8.35081 78576922 0.00 0.00 0.20 63 363.30 2016.03.14 14:15:26 64330196 USDMXN buy out 0.01 17.76283 78576946 0.00 0.00 -0.08 63 363.22 2016.03.14 14:30:00 64331460 AUDCAD sell out 0.01 0.99792 78578213 0.00 0.00 -0.73 63 362.49 2016.03.14 14:30:02 64331464 GBPCAD sell in 0.01 1.89854 78578217 0.00 0.00 0.00 63 362.49 exp_cci 2016.03.14 14:30:04 64331472 AUDUSD sell out 0.01 0.75491 78578225 0.00 0.00 1.52 63 364.01 Sergey Gritsay 2016.03.14 13:07 #147 Сергей Криушин:利润=0.0也许你的输入参数设置错误,我很好 Сергей Криушин 2016.03.14 14:08 #148 Sergey Gritsay:也许你的输入参数设置错误,我很好这些变化如下。 input ENUM_TYPE_BALANS Type_Balanse=Balance; input double Risk=0.5; input double _Lot=0.04; input double Loading_deposit=20.0; input double Ksl=8.0; input double Ktp=2.0; input int TotalLossSeries=16; input bool TrailingStop=true; input bool CloseSignal=true; input ENUM_TYPE_INDICATOR IndicatorTrend=CCI; input int period_CCI_S=90; input int period_CCI_F=13; input int Period_ATR=35; input ENUM_TIMEFRAMES TF_ATR=PERIOD_CURRENT; input bool signal_01=true; input bool signal_02=true; input bool signal_03=true; input bool signal_04=true; input bool signal_05=true; input string CommentOrder="exp_cci"; input color ColorText=clrBlack; input string symbol_tester="EURUSD,AUDUSD,USDJPY,USDCAD"; //Уменьшил уровень до 90 - чтоб надежней срабатывал if(trend[index]==ORDER_TYPE_BUY) { if(signal_01 && cci_f[1]<-90.0)return(ORDER_TYPE_BUY); if(signal_02 && cci_f[1]<-90.0 && cci_f[0]>-90.0)return(ORDER_TYPE_BUY); if(signal_03 && cci_f[1]>-90.0 && cci_f[0]<-90.0)return(ORDER_TYPE_BUY); if(signal_04 && cci_f[1]>90.0 && cci_f[0]<90.0)return(ORDER_TYPE_BUY); if(signal_05 && cci_f[1]>90.0)return(ORDER_TYPE_BUY); } if(trend[index]==ORDER_TYPE_SELL) { if(signal_01 && cci_f[1]>90)return(ORDER_TYPE_SELL); if(signal_02 && cci_f[1]>90 && cci_f[0]<90)return(ORDER_TYPE_SELL); if(signal_03 && cci_f[1]<90 && cci_f[0]>90)return(ORDER_TYPE_SELL); if(signal_04 && cci_f[1]<-90 && cci_f[0]>-90)return(ORDER_TYPE_SELL); if(signal_05 && cci_f[1]<-90)return(ORDER_TYPE_SELL); } Sergey Gritsay 2016.03.14 14:39 #149 Сергей Криушин:这些变化如下。通过这些设置。input double Ksl=8.0; input double Ktp=2.0;可以完全关闭拖尾,因为它没有什么意义。 Sergey Gritsay 2016.03.17 13:57 #150 修正了MT5版本中的错误 附加的文件: exp_cci_mt5_v2.mq5 29 kb 1...89101112131415161718 新评论 原因: 取消 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
请告知如何解决未识别变量的错误,我对MQL4不是很在行。
// 批量计算
如果(MarketInfo(Symbol(),MODE_LOTSTEP)==0.01) int digit=2;
如果(MarketInfo(Symbol(),MODE_LOTSTEP)==0.10) int digit=1;
如果(MarketInfo(Symbol(),MODE_LOTSTEP)==1.00) int digit=0;
double _lot =NormalizeDouble(lot* MathPow(koef,totalO(-1,key)),digit);这里,它没有看到这个变量之前的条目(
double min=MarketInfo(Symbol(),MODE_MINLOT);
如果(_lot<min)_lot=min。
这里是批量归一化函数
使用
这里是批量归一化函数
申请 谢谢
调整了酒吧模式。在mt5的版本中,我添加了趋势指标 THV4。
我一直在从各个角度旋转这个测试器--它是一个失败者......只有当你留下一个买入信号时...d你的意思是它需要很长的时间,它留下了什么样的零...
这里是批量归一化函数
应用
有一个更优雅的解决方案。
d在触发的时间上,它留下了哪些零点?
利润=0.0
利润=0.0
也许你的输入参数设置错误,我很好
也许你的输入参数设置错误,我很好
这些变化如下。
这些变化如下。
通过这些设置。
可以完全关闭拖尾,因为它没有什么意义。