[存档!]我将免费撰写任何专家或指标。 - 页 89 1...828384858687888990919293949596...110 新评论 Виктор 2011.08.27 16:52 #881 Vinin: 不容易。缓冲区不够。 就没有足够的缓冲区了。但作者只想要直方图:)) "我的意思是3个具有不同价值的直方图" [删除] 2011.08.27 16:59 #882 granit77: 这还不够好。但作者只想要直方图:)) "我的意思是3个具有不同价值的直方图" 所以做3个直方图是不现实的?我只是在浪费我的代码时间吗? [删除] 2011.08.27 17:03 #883 我已经用这个作为基础。我不知道如何添加第三个直方图。我不知道该怎么做。除了站在我的头上。 Виктор 2011.08.27 17:05 #884 alkeon: 所以做3个直方图是不现实的?我刚才费了那么大劲儿破解密码,难道是白费力气? 没有什么是白费的。经验比结果更有价值。 在这种特殊情况下,这取决于你需要的MACD副本的数量。一份拷贝需要两个缓冲区(直方图和信号线),你总共需要八个缓冲区。也就是说,三份拷贝将占用六个缓冲区,而且还能剩下一些。 你的痛苦怎么样了?代码在哪里? P.S. 我不喜欢你的原型。这不是两个MACD,是顺序平滑。最好是拿一个简单的经典MACD来做三倍。 附加的文件: macd.mq4 3 kb [删除] 2011.08.27 17:08 #885 主要的欺凌行为在于在电脑上工作。 但这没有问题,我已经折磨了他很久,我可以用心记住要重复的内容。 [删除] 2011.08.27 17:09 #886 只是它更容易(如我所想)。谢谢你提供的指标,我现在要开始掌握它了。 [删除] 2011.08.27 17:42 #887 这里是我离开的地方。 完全搞不懂这些公式。怎么了? 这是最新的版本,没有错误。但这也是一个混乱。 附加的文件: macd_3.mq4 5 kb Виктор 2011.08.27 17:55 #888 总的来说,方向是正确的,修正错误就能成功。我不会纠正它,我将用文字来解释它。 //+------------------------------------------------------------------+ //| Custom MACD.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" //---- indicator settings #property indicator_separate_window #property indicator_buffers 6 #property indicator_color1 Silver #property indicator_color2 Red #property indicator_color3 Silver #property indicator_color4 Red #property indicator_color5 Silver #property indicator_color6 Red #property indicator_width1 2 //---- indicator parameters extern int FastEMA=12; extern int SlowEMA=26; extern int SignalSMA=9; extern int FastEMA1=12; extern int SlowEMA1=26; extern int SignalSMA1=9; extern int FastEMA2=12; extern int SlowEMA2=26; extern int SignalSMA2=9; //---- indicator buffers double MacdBuffer[]; //Проверить соответствие нумерации double SignalBuffer[]; double MacdBuffer1[]; double SignalBuffer2[]; double MacdBuffer3[]; double SignalBuffer4[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- drawing settings SetIndexStyle(0,DRAW_HISTOGRAM);// нумерация буферов должна идти подряд от 0 до 6 SetIndexStyle(1,DRAW_LINE); SetIndexDrawBegin(1,SignalSMA); IndicatorDigits(Digits+1); SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexStyle(1,DRAW_LINE); SetIndexDrawBegin(1,SignalSMA); IndicatorDigits(Digits+1); SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexStyle(1,DRAW_LINE); SetIndexDrawBegin(1,SignalSMA); IndicatorDigits(Digits+1); //---- indicator buffers mapping SetIndexBuffer(0,MacdBuffer); SetIndexBuffer(1,SignalBuffer); SetIndexBuffer(0,MacdBuffer); SetIndexBuffer(1,SignalBuffer); SetIndexBuffer(0,MacdBuffer); SetIndexBuffer(1,SignalBuffer); //---- name for DataWindow and indicator subwindow label IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+","+FastEMA1+","+SlowEMA1+","+SignalSMA1+","+FastEMA2+","+SlowEMA2+","+SignalSMA2+")"); SetIndexLabel(0,"MACD"); SetIndexLabel(1,"Signal"); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Moving Averages Convergence/Divergence | //+------------------------------------------------------------------+ int start() { // Эта часть пишется только 1 раз int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //------------------------------- //---- macd counted in the 1-st buffer for(int i=0; i<limit; i++) MacdBuffer[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i); //---- signal line counted in the 2-nd buffer for(i=0; i<limit; i++) SignalBuffer[i]=iMAOnArray(MacdBuffer,Bars,SignalSMA,0,MODE_SMA,i); int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //---- macd counted in the 1-st buffer for(int i=0; i<limit; i++) MacdBuffer1[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i); //---- signal line counted in the 2-nd buffer for(i=0; i<limit; i++) SignalBuffer2[i]=iMAOnArray(MacdBuffer,Bars,SignalSMA,0,MODE_SMA,i); int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //---- macd counted in the 1-st buffer for(int i=0; i<limit; i++) MacdBuffer3[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i); //---- signal line counted in the 2-nd buffer for(i=0; i<limit; i++) SignalBuffer4[i]=iMAOnArray(MacdBuffer,Bars,SignalSMA,0,MODE_SMA,i); //---- done return(0); } //+------------------------------------------------------------------+ [删除] 2011.08.27 18:10 #889 日安,亲爱的kubodel,请纠正顾问在每个时间段的00分钟内打开交易的做法。 并在从蜡烛的时间框架开始的30秒后 Виктор 2011.08.27 18:17 #890 abolk: 对缓冲区的数字进行了初步的调整--然后就看你的了。 安德烈-尼古拉耶维奇,你急什么!他自己会想明白的,但他会记得更清楚。 1...828384858687888990919293949596...110 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
不容易。缓冲区不够。
"我的意思是3个具有不同价值的直方图"
这还不够好。但作者只想要直方图:))
"我的意思是3个具有不同价值的直方图"
所以做3个直方图是不现实的?我只是在浪费我的代码时间吗?
所以做3个直方图是不现实的?我刚才费了那么大劲儿破解密码,难道是白费力气?
在这种特殊情况下,这取决于你需要的MACD副本的数量。一份拷贝需要两个缓冲区(直方图和信号线),你总共需要八个缓冲区。也就是说,三份拷贝将占用六个缓冲区,而且还能剩下一些。
你的痛苦怎么样了?代码在哪里?
P.S.
我不喜欢你的原型。这不是两个MACD,是顺序平滑。最好是拿一个简单的经典MACD来做三倍。
这里是我离开的地方。 完全搞不懂这些公式。怎么了?
这是最新的版本,没有错误。但这也是一个混乱。
日安,亲爱的kubodel,请纠正顾问在每个时间段的00分钟内打开交易的做法。
并在从蜡烛的时间框架开始的30秒后
对缓冲区的数字进行了初步的调整--然后就看你的了。