论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1173回复:11
dlwyd
注册时间2005-03-26
请问老正
楼主发表于:2005-05-28 02:22只看该作者倒序浏览
1楼 电梯直达
电梯直达
请问老正:: 1hour图表交易系统在MT4里可以用吗?谢谢!! [ Last edited by dlwyd on 2005-5-28 at 10:35 ]
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
老正
注册时间2003-09-21
365热心助人奖
发表于:2005-05-28 23:47只看该作者
2楼
除非有朋友把指标转换成mt4的...........
Zukunft
注册时间2005-05-12
发表于:2005-05-29 01:16只看该作者
3楼
//+------------------------------------------------------------------+ //| T3MACO.mq4 | //| Perky_z | //| http://groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/ | //+------------------------------------------------------------------+ #property copyright "Perky_z hack of Mojos Program" #property link "http://groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/" #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red extern int MA_Period = 5; extern double b = 0.7; double MapBuffer; extern int FastEMA=5; extern int SlowEMA=8; double e1,e2,e3,e4,e5,e6; double c1,c2,c3,c4; double n,w1,w2,b2,b3; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators setting SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,Red); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)); IndicatorShortName("T3_ MACO "+MA_Period); SetIndexBuffer(0,MapBuffer); //---- variable reset e1=0; e2=0; e3=0; e4=0; e5=0; e6=0; c1=0; c2=0; c3=0; c4=0; n=0; w1=0; w2=0; b2=0; b3=0; b2=b*b; b3=b2*b; c1=-b3; c2=(3*(b2+b3)); c3=-3*(2*b2+b+b3); c4=(1+3*b+b3+3*b2); n=MA_Period; if (n<1) n=1; n = 1 + 0.5*(n-1); w1 = 2 / (n + 1); w2 = 1 - w1; //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit=Bars; //---- indicator calculation for(int i=limit; i>=0; i--) { e1 = w1*(iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_OPEN,i)) + w2*e1; e2 = w1*e1 + w2*e2; e3 = w1*e2 + w2*e3; e4 = w1*e3 + w2*e4; e5 = w1*e4 + w2*e5; e6 = w1*e5 + w2*e6; MapBuffer=c1*e6 + c2*e5 + c3*e4 + c4*e3; } //---- return(0); } //+------------------------------------------------------------------+ [ Last edited by 老正 on 2005-5-30 at 09:32 ]
Zukunft
注册时间2005-05-12
发表于:2005-05-29 01:19只看该作者
4楼
//+------------------------------------------------------------------+ //| Custom Aroon_v1.mq4 | //| rafcamara | //| Has corrected - Ramdass | //+------------------------------------------------------------------+ #property copyright "rafcamara" #property link "[email protected]" //---- indicator settings #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 DodgerBlue #property indicator_color2 Red //---- indicator parameters extern int AroonPeriod=10; extern int CountBars=300; //---- indicator buffers double AroonUpBuffer; double AroonDnBuffer; int HighBarBuffer; int LowBarBuffer; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- 2 additional buffers are used for counting. IndicatorBuffers(2); SetIndexBuffer(0, AroonUpBuffer); SetIndexBuffer(1, AroonDnBuffer); //---- drawing settings SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1); IndicatorDigits(1); //---- indicator buffers mapping if(!SetIndexBuffer(0,AroonUpBuffer) && !SetIndexBuffer(1,AroonDnBuffer)) Print("cannot set indicator buffers!"); //---- name for DataWindow and indicator subwindow label IndicatorShortName("Aroon Up & Dn_v1("+AroonPeriod+")"); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Aroon Up & Dn | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+AroonPeriod+1); SetIndexDrawBegin(1,Bars-CountBars+AroonPeriod+1); double AroonUp,AroonDn; int ArPer,limit,i; int UpBarDif,DnBarDif; // int HighBarBuffer; // int LowBarBuffer; int counted_bars=IndicatorCounted(); ArPer=AroonPeriod; //Short name //---- check for possible errors if(counted_bars<0) return(-1); if(AroonPeriod<1) return(-1); //---- initial zero if(counted_bars<1) { for(i=1;i<=ArPer;i++) AroonUpBuffer[CountBars-i]=0.0; for(i=1;i<=ArPer;i++) AroonDnBuffer[CountBars-i]=0.0; } //---- last counted bar will be recounted //if(counted_bars>0) counted_bars--; limit=CountBars-AroonPeriod; //----Calculation--------------------------- for( i=0; i
个性签名

韬客社区www.talkfx.co

广告
论坛谏言--外汇交易不应是你投资的全部,交易外汇也不应是你生活的全部
Zukunft
注册时间2005-05-12
发表于:2005-05-29 01:19只看该作者
5楼
//+------------------------------------------------------------------+ //| mc.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 2 #property indicator_color1 Blue #property indicator_color2 Red //---- indicator parameters extern int FastEMA=12; extern int SlowEMA=26; extern int SignalSMA=9; //---- indicator buffers double ind_buffer1; double ind_buffer2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- drawing settings SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1); SetIndexDrawBegin(1,SignalSMA); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+1); //---- indicator buffers mapping if(!SetIndexBuffer(0,ind_buffer1) && !SetIndexBuffer(1,ind_buffer2)) Print("cannot set indicator buffers!"); //---- name for DataWindow and indicator subwindow label IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+")"); SetIndexLabel(0,"MACD"); SetIndexLabel(1,"Signal"); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Moving Averages Convergence/Divergence | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- check for possible errors if(counted_bars<0) return(-1); //---- 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
Zukunft
注册时间2005-05-12
发表于:2005-05-29 01:23只看该作者
6楼
//+------------------------------------------------------------------+ //| AltrTrend_Signal_v2_2.mq4 //| Ramdass - Conversion only //+------------------------------------------------------------------+ #property copyright "Author - OlegVS, GOODMAN" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 Crimson //---- input parameters extern int K=30; extern double Kstop=0.5; extern int Kperiod=150; extern int PerADX=14; extern int CountBars=350; //---- buffers double val1; double val2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,108); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,108); SetIndexBuffer(0,val1); SetIndexBuffer(1,val2); //---- return(0); } //+------------------------------------------------------------------+ //| AltrTrend_Signal_v2_2 | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+PerADX); SetIndexDrawBegin(1,Bars-CountBars+PerADX); int i,shift,counted_bars=IndicatorCounted(); int i1,i2; double Range,AvgRange,smin,smax,SsMax,SsMin,SSP,price; bool uptrend,old; //---- if(Bars<=PerADX+1) return(0); //---- initial zero if(counted_bars=0; shift--) { SSP=MathCeil(Kperiod/iADX(NULL,0,PerADX,PRICE_CLOSE,MODE_MAIN,1)); Range=0; AvgRange=0; for (i1=shift; i1<=shift+SSP; i1++) {AvgRange=AvgRange+MathAbs(High[i1]-Low[i1]); } Range=AvgRange/(SSP+1); SsMax=High[shift]; SsMin=Low[shift]; for (i2=shift;i2<=shift+SSP-1;i2++) { price=High[i2]; if(SsMax=price) SsMin=price; } smin = SsMin+(SsMax-SsMin)*K/100; smax = SsMax-(SsMax-SsMin)*K/100; val1[shift]=0; val2[shift]=0; if (Close[shift]smax) { uptrend = true; } if (uptrend!=old && uptrend==true) {val1[shift]=Low[shift]-Range*Kstop;} if (uptrend!=old && uptrend==false) {val2[shift]=High[shift]+Range*Kstop;} old=uptrend; } return(0); } //+------------------------------------------------------------------+ [ Last edited by 老正 on 2005-5-30 at 09:32 ]
Zukunft
注册时间2005-05-12
Zukunft
注册时间2005-05-12
发表于:2005-05-29 01:30只看该作者
8楼
//+------------------------------------------------------------------+ //| NRTR.mq4 | //| | //| Ramdass - Conversion only | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Aqua #property indicator_color2 Violet //---- input parameters extern int AveragePeriod=10; extern int CountBars=300; //---- buffers double value1; double value2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,159); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159); SetIndexBuffer(0,value1); SetIndexBuffer(1,value2); //---- //---- return(0); } //+------------------------------------------------------------------+ //| NRTR | //+------------------------------------------------------------------+ int start() { if (CountBars>Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+1); SetIndexDrawBegin(1,Bars-CountBars+1); int i,counted_bars=IndicatorCounted(); double value; double trend=0,dK,AvgRange,price; //---- if(Bars<=AveragePeriod) return(0); //---- initial zero if(counted_bars<1) { for(i=1;i<=AveragePeriod;i++) value1[Bars-i]=0.0; for(i=1;i<=AveragePeriod;i++) value2[Bars-i]=0.0; } AvgRange=0; for (i=1 ; i<=AveragePeriod ; i++) AvgRange+= MathAbs(High-Low); if (Symbol() == "USDJPY" || Symbol() == "GBPJPY" || Symbol() == "EURJPY") {dK = (AvgRange/AveragePeriod)/100;} else {dK = AvgRange/AveragePeriod;} if (Close[CountBars-1] > Open[CountBars-1]) { value1[CountBars - 1] = Close[CountBars - 1] * (1 - dK); trend = 1; value2[CountBars - 1] = 0.0; } if (Close[CountBars-1] < Open[CountBars-1]) { value2[CountBars - 1] = Close[CountBars - 1] * (1 + dK); trend = -1; value1[CountBars - 1] = 0.0; } //---- i=CountBars-1; while(i>=0) { value1=0; value2=0; if (trend >= 0) { if (Close > price) price = Close; value = price * (1 - dK); if (Close < value) { price = Close; value = price * (1 + dK); trend = -1; } } else { if (trend <= 0) { if (Close < price) price = Close; value = price * (1 + dK); if (Close > value) { price = Close; value = price * (1 - dK); trend = 1; } } } if (trend == 1) {value1=value; value2=0.0;} if (trend == -1) {value2=value; value1=0.0;} i--; } return(0); } //+------------------------------------------------------------------+ [ Last edited by 老正 on 2005-5-30 at 09:33 ]
Zukunft
注册时间2005-05-12
发表于:2005-05-29 01:31只看该作者
9楼
//+------------------------------------------------------------------+ //| NRTR WATR.mq4 | //| | //| Ramdass - Conversion only | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red //---- input parameters extern int AveragePeriod=10; extern int Variant=2; extern int CountBars=300; //---- buffers double value1; double value2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,167); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,167); SetIndexBuffer(0,value1); SetIndexBuffer(1,value2); //---- //---- return(0); } //+------------------------------------------------------------------+ //| NRTR WATR | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars - AveragePeriod - 2; // CountBars = CountBars - AveragePeriod - 3; SetIndexDrawBegin(0,Bars-CountBars+1); SetIndexDrawBegin(1,Bars-CountBars+1); int i,i2,bar,counted_bars=IndicatorCounted(); double value,WATR; double trend=1,dK,AvgRange,price,AveragePeriod_D; AveragePeriod_D=AveragePeriod; //---- if(Bars<=AveragePeriod) return(0); //---- initial zero if(counted_bars<1) { for(i=1;i<=AveragePeriod;i++) value1[Bars-i]=0.0; for(i=1;i<=AveragePeriod;i++) value2[Bars-i]=0.0; } AvgRange=0; if ((Variant == 2) || (Variant == 3)) { for (i=AveragePeriod; i>=1; i--) { dK = 1+(AveragePeriod_D-i)/AveragePeriod_D; AvgRange=AvgRange + dK*MathAbs(High-Low); } if (Symbol()=="USDJPY" || Symbol()=="GBPJPY" || Symbol()=="EURJPY") {WATR = AvgRange/AveragePeriod_D/100;} else {WATR = AvgRange/AveragePeriod_D;} } if (Variant == 1) { for (i=1; i<=AveragePeriod; i++) { dK = 1+(AveragePeriod_D-i)/AveragePeriod_D; AvgRange=AvgRange + dK*MathAbs(High[CountBars + i]-Low[CountBars + i]); } WATR = AvgRange/AveragePeriod_D; } if (Close[CountBars-1] > Open[CountBars-1]) { value1[CountBars - 1] = Close[CountBars - 1] * (1 - WATR); trend = 1; value2[CountBars - 1] = 0.0; } if (Close[CountBars-1] < Open[CountBars-1]) { value2[CountBars - 1] = Close[CountBars - 1] * (1 + WATR); trend = -1; value1[CountBars - 1] = 0.0; } //---- bar=CountBars; while(bar>=0) { value1[bar]=0.0; value2[bar]=0.0; if (Variant == 3) { AvgRange=0; for (i=1; i<=AveragePeriod; i++) { dK = 1+(AveragePeriod_D-i)/AveragePeriod_D; AvgRange=AvgRange+ dK*MathAbs(High[bar + i]-Low[bar + i]); } WATR = AvgRange/AveragePeriod_D; } if (trend == 1) { if (Close[bar] > price) price = Close[bar]; value = price * (1 - WATR); if (Close[bar] < value) { price = Close[bar]; value = price * (1 + WATR); trend = -1; } } if (trend == -1) { if (Close[bar] < price) price = Close[bar]; value = price * (1 + WATR); if (Close[bar] > value) { price = Close[bar]; value = price * (1 - WATR); trend = 1; } } if (trend == 1) {value1[bar]=value; value2[bar]=0.0;} if (trend == -1) {value2[bar]=value; value1[bar]=0.0;} bar--; } return(0); } //+------------------------------------------------------------------+ [ Last edited by 老正 on 2005-5-30 at 09:33 ]
Zukunft
注册时间2005-05-12
发表于:2005-05-29 02:49只看该作者
10楼
以上贴的源码编译的时候可能出现问题,试试加上中括号试试
dlwyd
注册时间2005-03-26
楼主发表于:2005-05-29 11:06只看该作者
11楼
谢谢!!
个性签名

韬客社区www.talkfx.co

老正
注册时间2003-09-21
365热心助人奖
发表于:2005-05-30 01:39只看该作者
12楼
Originally posted by Zukunft at 2005-5-29 10:49 以上贴的源码编译的时候可能出现问题,试试加上中括号试试
选上帖子下面选项的 禁用smilies和discuz! 代码
个性签名

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

本站免责声明:

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

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

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

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

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

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