初学者的问题 MQL5 MT5 MetaTrader 5 - 页 777 1...770771772773774775776777778779780781782783784...1503 新评论 ax237b 2017.08.27 22:40 #7761 Aleksey Vyazmikin: 你能为OpenCL写一个内核 吗?我知道这里只有一个人声称在EA运行时使用OpenCL来进行实时优化。我不知道任何其他的例子。 我想亲自看一看。甚至要求发布一篇关于这个问题的文章,但行政部门不知道如何将其应用于实际交易。 太不可思议了,opencl已经被支持了5年,但却没有具体的交易实例,也没有文章......好吧,既然开发者自己都不知道如何应用它,那我们就把重点放在云端优化上吧。 [删除] 2017.08.28 18:19 #7762 ax237b: 太不可思议了,对opencl的支持已经存在5年了,但却没有具体的工作实例,也没有文章......好吧,如果开发者自己都不知道如何应用它,那就让我们专注于云计算的优化吧。 有什么好惊讶的呢?终端以足够的速度工作,经纪人的反应延迟。所以opencl暂时在休息。接下来会发生什么--我们将拭目以待 Aleksey Vyazmikin 2017.09.01 22:03 #7763 请帮助我们!我正在重新制作该指标,以下是绘制的代码#property indicator_separate_window #property indicator_buffers 3 #property indicator_plots 3 //--- plot Label1 #property indicator_label1 "High"; #property indicator_type1 DRAW_LINE; #property indicator_color1 clrRed; #property indicator_style1 STYLE_DOT; #property indicator_width1 1; //--- plot Label2 #property indicator_label2 "Low"; #property indicator_type2 DRAW_LINE; #property indicator_color2 clrRed; #property indicator_style2 STYLE_DOT; #property indicator_width2 1; //--- plot Label3 #property indicator_label3 "Close"; #property indicator_type3 DRAW_LINE; #property indicator_color3 clrAquamarine; #property indicator_style3 STYLE_SOLID; #property indicator_width3 1; //--- input parameters input int InpChannelPeriod=48; // Period //--- indicator buffers double ExtHighBuffer[]; double ExtLowBuffer[]; double ExtCloseBuffer[]; //--- int i,limit,start; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping SetIndexBuffer(0,ExtHighBuffer,INDICATOR_DATA); SetIndexBuffer(1,ExtLowBuffer,INDICATOR_DATA); SetIndexBuffer(2,ExtCloseBuffer,INDICATOR_DATA); //--- set accuracy IndicatorSetInteger(INDICATOR_DIGITS,_Digits); //--- set first bar from what index will be drawn PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,InpChannelPeriod); PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,InpChannelPeriod); PlotIndexSetInteger(2,PLOT_DRAW_BEGIN,InpChannelPeriod); //--- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- check for rates if(rates_total<InpChannelPeriod) return(0); //--- preliminary calculations if(prev_calculated==0) limit=InpChannelPeriod; else limit=prev_calculated; //--- the main loop of calculations for(i=limit;i<rates_total && !IsStopped();i++) { ExtHighBuffer[i]=100.0; ExtLowBuffer[i]=0.0; ExtCloseBuffer[i]=50.0; } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+风格#属性indicator_style2STYLE_DOT; - 根本不在图表上绘制样式# 属性indicator_style2STYLE_SOLID; - 在图表上以STYLE_DOT方式 绘制。这是什么反常现象,还是我的手有问题? Aleksey Vyazmikin 2017.09.01 22:15 #7764 从图形阵列中计算移动平均线 的最佳方式是什么--这里还是指标中?是否有开发者推荐的现成的功能或库? Aleksey Vyazmikin 2017.09.01 22:43 #7765 Aleksey Vyazmikin:从图形阵列中计算移动平均线 的最佳方式是什么--这里还是指标中?也许有一些开发者推荐的现成的功能或库?甚至一个简单的变体--在地下室从iMA画出MA--我什么也没得到:(我正在通过函数调用double MA_TF(int index) { double MA[1]; ResetLastError(); if(CopyBuffer(handle_MA_TF,0,index,1,MA)<0) { PrintFormat("Failed to copy data from the handle_MA_TF indicator, error code %d",GetLastError()); return(0.0); } return NormalizeDouble(MA[0],Digits()); }但是,这是不对的--从里到外... Aleksey Vyazmikin 2017.09.01 23:03 #7766 通过向导,我对MA_TF(rate_total-i)进行了内部调用--似乎有帮助,但我看了看历史,有时与内置指标有出入(即使去掉了归一化),会是这种情况吗?还有,如何使指标输出小数点值? Alexey Viktorov 2017.09.02 18:03 #7767 Aleksey Vyazmikin:从图形阵列中计算移动平均线 的最佳方式是什么--这里还是指标中?是否有开发者推荐的现成的功能或库? 在Include文件夹里有MovingAverages.mqh... Aleksey Vyazmikin 2017.09.02 21:49 #7768 Alexey Viktorov: 在Include文件夹里有MovingAverages.mqh...谢谢,我不知道,但我可以看到一个例子,说明在哪里工作? Alexey Viktorov 2017.09.03 06:55 #7769 Aleksey Vyazmikin: 谢谢,我不知道,但我可以看到一个例子,说明在哪里工作?阿列克谢,搜索不工作了吗?在右上方有一个文件搜索。你可以通过点击齿轮来调整搜索区域。结果是这样的。 Aleksey Vyazmikin 2017.09.04 20:43 #7770 Alexey Viktorov:阿列克谢,搜索不再起作用了吗?在右上方有一个文件搜索。你可以通过点击齿轮来调整搜索区域。而这里是结果。的确,为什么不自己搜索一下呢------谢谢! 1...770771772773774775776777778779780781782783784...1503 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
你能为OpenCL写一个内核 吗?我知道这里只有一个人声称在EA运行时使用OpenCL来进行实时优化。我不知道任何其他的例子。
我想亲自看一看。甚至要求发布一篇关于这个问题的文章,但行政部门不知道如何将其应用于实际交易。
太不可思议了,对opencl的支持已经存在5年了,但却没有具体的工作实例,也没有文章......好吧,如果开发者自己都不知道如何应用它,那就让我们专注于云计算的优化吧。
请帮助我们!
我正在重新制作该指标,以下是绘制的代码
风格#属性indicator_style2STYLE_DOT; - 根本不在图表上绘制
样式# 属性indicator_style2STYLE_SOLID; - 在图表上以STYLE_DOT方式 绘制。
这是什么反常现象,还是我的手有问题?
从图形阵列中计算移动平均线 的最佳方式是什么--这里还是指标中?
是否有开发者推荐的现成的功能或库?
从图形阵列中计算移动平均线 的最佳方式是什么--这里还是指标中?
也许有一些开发者推荐的现成的功能或库?
甚至一个简单的变体--在地下室从iMA画出MA--我什么也没得到:(
我正在通过函数调用
但是,这是不对的--从里到外...
通过向导,我对MA_TF(rate_total-i)进行了内部调用--似乎有帮助,但我看了看历史,有时与内置指标有出入(即使去掉了归一化),会是这种情况吗?
还有,如何使指标输出小数点值?
从图形阵列中计算移动平均线 的最佳方式是什么--这里还是指标中?
是否有开发者推荐的现成的功能或库?
在Include文件夹里有MovingAverages.mqh...
谢谢,我不知道,但我可以看到一个例子,说明在哪里工作?
谢谢,我不知道,但我可以看到一个例子,说明在哪里工作?
阿列克谢,搜索不工作了吗?
在右上方有一个文件搜索。你可以通过点击齿轮来调整搜索区域。
结果是这样的。
阿列克谢,搜索不再起作用了吗?
在右上方有一个文件搜索。你可以通过点击齿轮来调整搜索区域。
而这里是结果。
的确,为什么不自己搜索一下呢------谢谢!