论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
  • 1
  • 2
  • 3
  • 4
前往
共 71 条
2000USD
注册时间2005-05-19
[MT4指标]kdj指标 mt4
发表于:2005-06-04 08:52只看该作者
21楼 电梯直达
电梯直达
Originally posted by 老正 at 2005-5-31 07:51 解压后 放入 MetaTrader 4\experts\indicators 目录里面 关闭mt4 从新打开 然后在导航的自定义指标里就可以找到了 或者 在 插入 技术指标 自定义指标 里面找到 talkforex-kdj-by-xzhy.mq4 这个指标 点击后 ...
此指标的KD数据与MT自身带的Stochastic的KD数据一个相同另一个不相同,应以哪个为准,参数都是9,3,3
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
老正
注册时间2003-09-21
365热心助人奖
发表于:2005-06-05 01:31只看该作者
22楼
4楼的那个帖子应该说的是正确的
2苹果
注册时间2005-05-12
发表于:2005-07-30 20:54只看该作者
23楼
谢谢,正班,下了研究一下.
个性签名

要止损那,大哥。

广告
论坛谏言--外汇交易不应是你投资的全部,交易外汇也不应是你生活的全部
MayMay
注册时间2005-05-09
发表于:2005-08-03 14:21只看该作者
24楼
应是: //---- name for DataWindow and indicator subwindow label IndicatorShortName("KDJ("+KPeriod+","+DPeriod+","+JPeriod+")"); SetIndexLabel(0,"K"); SetIndexLabel(1,"D"); SetIndexLabel(2,"J"); //----
老正
注册时间2003-09-21
365热心助人奖
发表于:2005-08-04 01:39只看该作者
25楼
哦 能否把所有的源码贴上来 谢谢
个性签名

遇到矛盾 先站在对方的立场上想想问题,先试着去理解别人
如何使用WinMTR查询平台连接流畅度

MayMay
注册时间2005-05-09
发表于:2005-08-04 02:33只看该作者
26楼
原帖由 老正 于 2005-8-4 09:39 发表 哦 能否把所有的源码贴上来 谢谢
//+------------------------------------------------------------------+ //| KDJ.mq4 | //| Copyright ?2005, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright ?2005, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Red #property indicator_color2 Yellow #property indicator_color3 Magenta //Aqua //---- input parameters extern int KPeriod=9; extern int DPeriod=3; extern int JPeriod=3; double ind_buffer1; double ind_buffer2; double ind_buffer3; double ind_buffer4; double HighesBuffer; double LowesBuffer; int draw_begin1=0; int draw_begin2=0; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- 2 additional buffers are used for counting. IndicatorBuffers(6); SetIndexBuffer(4, HighesBuffer); SetIndexBuffer(5, LowesBuffer); SetIndexBuffer(3, ind_buffer1); //---- indicator lines SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0, ind_buffer2); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1, ind_buffer3); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2, ind_buffer4); //---- name for DataWindow and indicator subwindow label IndicatorShortName("KDJ("+KPeriod+","+DPeriod+","+JPeriod+")"); SetIndexLabel(0,"K"); SetIndexLabel(1,"D"); SetIndexLabel(2,"J"); //---- draw_begin1=KPeriod+JPeriod; draw_begin2=draw_begin1+DPeriod; SetIndexDrawBegin(0,draw_begin1); SetIndexDrawBegin(1,draw_begin2); return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int start() { int i,k; int counted_bars=IndicatorCounted(); double price; //---- if(Bars<=draw_begin2) return(0); //---- initial zero if(counted_bars<1) { for(i=1;i<=draw_begin1;i++) ind_buffer1[Bars-i]=0; for(i=1;i<=draw_begin2;i++) ind_buffer2[Bars-i]=0; } //---- minimums counting i=Bars-KPeriod; if(counted_bars>KPeriod) i=Bars-counted_bars-1; while(i>=0) { double min=1000000; k=i+KPeriod-1; while(k>=i) { price=Low[k]; if(min>price) min=price; k--; } LowesBuffer=min; i--; } //---- maximums counting i=Bars-KPeriod; if(counted_bars>KPeriod) i=Bars-counted_bars-1; while(i>=0) { double max=-1000000; k=i+KPeriod-1; while(k>=i) { price=High[k]; if(maxdraw_begin1) i=Bars-counted_bars-1; while(i>=0) { double sumlow=0.0; double sumhigh=0.0; for(k=(i+JPeriod-1);k>=i;k--) { sumlow+=Close[k]-LowesBuffer[k]; sumhigh+=HighesBuffer[k]-LowesBuffer[k]; } if(sumhigh==0.0) ind_buffer1=100.0; else ind_buffer1=sumlow/sumhigh*100; i--; } //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; //---- signal line is simple movimg average for(i=0; i
金米
注册时间2005-04-03
发表于:2005-10-02 12:17只看该作者
27楼
好极了 有没有MT3的 KDJ啊 谢谢老师了
卡夫卡
注册时间2005-10-31
发表于:2005-11-09 07:00只看该作者
28楼
原帖由 老正 于 2005-5-31 07:51 发表 解压后 放入 MetaTrader 4\experts\indicators 目录里面 关闭mt4 从新打开 然后在导航的自定义指标里就可以找到了 或者 在 插入 技术指标 自定义指标 里面找到 talkforex-kdj-by-xzhy.mq4 这个指标 点击后 ...
装上了,三根线,请问那根是K,那根是D,那根是J:$:$:$:$:$:$
老正
注册时间2003-09-21
365热心助人奖
发表于:2005-11-09 07:33只看该作者
29楼
从新修改了下 把20楼的文件也更新成MayMay朋友的了 从新下载吧 然后在图上用鼠标放在相关的线上 就知道每根的含义了
卡夫卡
注册时间2005-10-31
发表于:2005-11-09 08:19只看该作者
30楼
原帖由 老正 于 2005-11-9 15:33 发表 从新修改了下 把20楼的文件也更新成MayMay朋友的了 从新下载吧 然后在图上用鼠标放在相关的线上 就知道每根的含义了
好,我是第一个重新下载的;P
光谱
注册时间2005-09-23
发表于:2005-12-23 06:21只看该作者
31楼
已经下载 效果不错!!!!
akhb1113
注册时间2005-12-03
leguox
注册时间2005-10-22
rsww
注册时间2006-01-12
发表于:2006-03-24 23:30只看该作者
34楼
谢谢,最近正在研究这个呢
raidsan
注册时间2005-10-29
发表于:2006-07-01 09:49只看该作者
35楼
对比过图形,与国内的KDJ还是不同。 关键是这一段代码: //---- %K line i=Bars-draw_begin1; if(counted_bars>draw_begin1) i=Bars-counted_bars-1; while(i>=0) { double sumlow=0.0; double sumhigh=0.0; for(k=(i+Slowing-1);k>=i;k--) { sumlow+=Close[k]-LowesBuffer[k]; sumhigh+=HighesBuffer[k]-LowesBuffer[k]; } if(sumhigh==0.0) MainBuffer=100.0; else MainBuffer=sumlow/sumhigh*100; i--; } 没法理解,MainBuffer 应该是RSV,按国内的KDJ中的算法, RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; 应该直接减就是了,不需要进行累加啊。主要的差异在这里,而不是新旧版本KDJ的关系吧 还有一点不清楚的,就是MT中有没有 SMA函数, iMAOnArray(MODE_SMA)应该相当于国内的MA函数, 而 iMAOnArray(MODE_LWMA), 线性加权移动平均,那个权值在哪里指定呢? 或者说,不需要指定权值,固定就是1了?
个性签名

韬客社区www.talkfx.co

raidsan
注册时间2005-10-29
发表于:2006-07-01 11:32只看该作者
36楼
//+------------------------------------------------------------------+ //| KDJ.mq4 | //| Copyright 2006, raidsan. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 White #property indicator_color2 Yellow #property indicator_color3 Magenta //---- input parameters extern int NPeriod=9; extern int KPeriod=3; extern int DPeriod=3; double RSV; double KBuffer; double DBuffer; double **uffer; double HighesBuffer; double LowesBuffer; int draw_begin_K = 0; int draw_begin_D = 0; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- 2 additional buffers are used for counting. IndicatorBuffers(6); SetIndexBuffer(4, HighesBuffer); SetIndexBuffer(5, LowesBuffer); SetIndexBuffer(3, RSV); //---- indicator lines SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0, KBuffer); //k SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1, DBuffer); //d SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2, **uffer); //j //---- name for DataWindow and indicator subwindow label string shortname = "KDJ("+NPeriod+","+KPeriod+","+DPeriod+")"; IndicatorShortName(shortname); SetIndexLabel(0,"K"); SetIndexLabel(1,"D"); SetIndexLabel(2,"J"); SetLevelValue(0,0); SetLevelValue(1,20); SetLevelValue(2,50); SetLevelValue(3,80); SetLevelValue(4,100); //---- draw_begin_K = NPeriod+KPeriod; draw_begin_D = draw_begin_K+DPeriod; SetIndexDrawBegin(0,draw_begin_K); SetIndexDrawBegin(1,draw_begin_D); SetIndexDrawBegin(2,draw_begin_D); SetIndexEmptyValue(0,0); SetIndexEmptyValue(1,0); SetIndexEmptyValue(2,0); return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int start() { int i,k; int counted_bars=IndicatorCounted(); double price; //---- if(Bars<=NPeriod) return(0); //---- initial zero if(counted_bars<1) { for(i=1;i<=draw_begin_K;i++) KBuffer[Bars-i]=0; for(i=1;i<=draw_begin_D;i++) DBuffer[Bars-i]=0; for(i=1;i<=draw_begin_D;i++) **uffer[Bars-i]=0; } //---- minimums counting i=Bars-NPeriod; if(counted_bars>NPeriod) i=Bars-counted_bars-1; while(i>=0) { double min=1000000; k=i+NPeriod-1; while(k>=i) { price=Low[k]; if(min>price) min=price; k--; } LowesBuffer=min; i--; } //---- maximums counting i=Bars-NPeriod; if(counted_bars>NPeriod) i=Bars-counted_bars-1; while(i>=0) { double max=-1000000; k=i+NPeriod-1; while(k>=i) { price=High[k]; if(max0) counted_bars--; //K if(counted_bars>=draw_begin_K) i=Bars-counted_bars-1; else i=Bars-draw_begin_K-1; while(i>=0) { KBuffer = (RSV + (KPeriod-1)*KBuffer[i+1] ) / KPeriod; //k i --; } //J if(counted_bars>=draw_begin_D) i=Bars-counted_bars-1; else i=Bars-draw_begin_D-1; while(i>=0) { DBuffer = (1* KBuffer + (DPeriod-1)*DBuffer[i+1] ) / DPeriod; //D **uffer=3*KBuffer-2*DBuffer; i--; } //---- return(0); } //+------------------------------------------------------------------+ [ 本帖最后由 raidsan 于 2006-7-1 19:33 编辑 ]
raidsan
注册时间2005-10-29
发表于:2006-07-01 11:38只看该作者
37楼
莫名奇妙,上传了几次,加, 禁用Discuz! 代码,还是有些部分被屏蔽了,自己查找:**uffer, 替换成: "J-Buffer"吧,看来是网站自动过滤了"J-B"两个字母
个性签名

韬客社区www.talkfx.co

afeng
注册时间2005-12-31
发表于:2006-11-08 22:00只看该作者
38楼
好 ,,,
个性签名

务在己安

广告
论坛谏言--外汇交易不应是你投资的全部,交易外汇也不应是你生活的全部
liujiqi
注册时间2006-09-20
发表于:2006-12-30 08:21只看该作者
39楼
谢谢
plcab
注册时间2005-02-03
发表于:2007-01-05 02:42只看该作者
40楼
多谢
  • 1
  • 2
  • 3
  • 4
前往
共 71 条

本站免责声明:

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

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

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

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

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

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