论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1237回复:9
fcz
注册时间2006-03-29
[MT4指标]请懂程序的高手帮忙改一下这个超强指标的一个小问提,先谢!
楼主发表于:2006-05-13 06:44只看该作者倒序浏览
1楼 电梯直达
电梯直达
谢谢!能不能把显示的两条线改成细线.第二能不能改两条线的颜色?谢谢!!指标见下面 //+------------------------------------------------------------------+ //| SilverTrend .mq4 | //| SilverTrend rewritten by CrazyChart | //| http://viac.ru/ | //+------------------------------------------------------------------+ #property copyright "SilverTrend rewritten by CrazyChart" #property link "http://viac.ru/ " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue //---- input parameters extern int CountBars=300; extern int SSP=7; extern double Kmin=1.6; extern double Kmax=50.6; //24 21.6 21.6 //---- buffers double ExtMapBuffer1; double ExtMapBuffer2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,0,2,Red); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE,0,2,Blue); SetIndexBuffer(1,ExtMapBuffer2); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+SSP); SetIndexDrawBegin(1,Bars-CountBars+SSP); int i, i2,loopbegin,counted_bars=IndicatorCounted(); double SsMax, SsMin, K, val1, val2, smin, smax, price; if(Bars<=SSP+1) return(0); //---- initial zero //K=33-RISK; /* if (firstTime==true) { loopbegin = CountBars; if (loopbegin>(Bars-2*SSP+1)) loopbegin=Bars-2*SSP+1; firstTime=False; }; 痼滂戾眚 耱囵铋 镳钽疣祆? */ if(Bars<=SSP+1) return(0); //---- initial zero //+++++++ if(counted_bars=0;i--) { SsMax = High[Highest(NULL,0,MODE_HIGH,SSP,i-SSP+1)]; SsMin = Low[Lowest(NULL,0,MODE_LOW,SSP,i-SSP+1)]; smin = SsMin-(SsMax-SsMin)*Kmin/100; smax = SsMax-(SsMax-SsMin)*Kmax/100; ExtMapBuffer1[i-SSP+6]=smax; ExtMapBuffer2[i-SSP-1]=smax; val1 = ExtMapBuffer1[0]; val2 = ExtMapBuffer2[0]; if (val1 > val2) Comment("镱牦镪?buy ",val1); if (val1 < val2) Comment("镳钿噫?sell ",val2); } //---- return(0); } //+------------------------------------------------------------------+
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
行知合一
注册时间2005-05-11
发表于:2006-05-13 07:00只看该作者
2楼
//+------------------------------------------------------------------+ //| SilverTrend .mq4 | //| SilverTrend rewritten by CrazyChart | //| http://viac.ru/ | //+------------------------------------------------------------------+ #property copyright "SilverTrend rewritten by CrazyChart" #property link "http://viac.ru/ " #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue //---- input parameters extern int CountBars=300; extern int SSP=7; extern double Kmin=1.6; extern double Kmax=50.6; //24 21.6 21.6 //---- buffers double ExtMapBuffer1; double ExtMapBuffer2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,0,1,Red); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE,0,1,Blue); SetIndexBuffer(1,ExtMapBuffer2); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+SSP); SetIndexDrawBegin(1,Bars-CountBars+SSP); int i, i2,loopbegin,counted_bars=IndicatorCounted(); double SsMax, SsMin, K, val1, val2, smin, smax, price; if(Bars<=SSP+1) return(0); //---- initial zero //K=33-RISK; /* if (firstTime==true) { loopbegin = CountBars; if (loopbegin>(Bars-2*SSP+1)) loopbegin=Bars-2*SSP+1; firstTime=False; }; */ if(Bars<=SSP+1) return(0); //---- initial zero //+++++++ if(counted_bars=0;i--) { SsMax = High[Highest(NULL,0,MODE_HIGH,SSP,i-SSP+1)]; SsMin = Low[Lowest(NULL,0,MODE_LOW,SSP,i-SSP+1)]; smin = SsMin-(SsMax-SsMin)*Kmin/100; smax = SsMax-(SsMax-SsMin)*Kmax/100; ExtMapBuffer1[i-SSP+6]=smax; ExtMapBuffer2[i-SSP-1]=smax; val1 = ExtMapBuffer1[0]; val2 = ExtMapBuffer2[0]; if (val1 > val2) Comment("ggg?buy ",val1); if (val1 < val2) Comment("htyu?sell ",val2); } //---- return(0); } //+------------------------------------------------------------------+ 这 样行了吗?
行知合一
注册时间2005-05-11
发表于:2006-05-13 07:07只看该作者
3楼
//---- indicators IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,0,1,Red); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE,0,1,Blue); SetIndexBuffer(1,ExtMapBuffer2); 只要改这一点,你看看吗? 另外还有简单的方法,点击右键,设置颜色菜单中有线宽,改改就行
个性签名

韬客社区www.talkfx.co

fcz
注册时间2006-03-29
楼主发表于:2006-05-13 07:19只看该作者
4楼
啊,你太强了行知合一.非常谢谢! 我试了2楼的,已成功改成细线了. 你说的"另外还有简单的方法,点击右键,设置颜色菜单中有线宽,改改就行 "这种改法我早试过,改完一切换周期就又还原了.不信你试试 再次感谢你高手!佩服
fcz
注册时间2006-03-29
楼主发表于:2006-05-13 07:42只看该作者
5楼
大侠啊.俺比了3遍,楞没看出你改了哪里...下面没改过呀! //---- indicators IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,0,1,Red); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE,0,1,Blue); SetIndexBuffer(1,ExtMapBuffer2); 只要改这一点,你看看吗?
个性签名

韬客社区www.talkfx.co

行知合一
注册时间2005-05-11
发表于:2006-05-13 07:49只看该作者
6楼
//---- indicators IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,0, 1 ,Red); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE,0, 1 ,Blue); SetIndexBuffer(1,ExtMapBuffer2); 函数有五个参数,第四位参数代表的是线型宽度。你看看。刚才你的程序是 2。第五位代表的是颜色。
fcz
注册时间2006-03-29
楼主发表于:2006-05-13 08:00只看该作者
7楼
啊,明白了俺太粗心了. 谢谢您教我, 您很厉害啊,佩服. 谢谢!!!!!!!!!!!!!!!!!!!!
行知合一
注册时间2005-05-11
发表于:2006-05-13 08:04只看该作者
8楼
我只是懂的一点点,可不是高手哦。
fcz
注册时间2006-03-29
楼主发表于:2006-05-13 08:24只看该作者
9楼
原帖由 行知合一 于 2006-5-13 16:04 发表 我只是懂的一点点,可不是高手哦。
您谦虚了.非常感谢您的帮助!祝交易好!
chenai
注册时间2005-01-26
发表于:2006-05-15 03:12只看该作者
10楼
各位高手,这个指标是什么,怎么用!!!是mt4的吗?谢谢·1
个性签名

韬客社区www.talkfx.co

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]