[MT4指标]mt4通道修改版
mt4通道修改版
基于类似的MetaTrader通道的原则/ /设计
/ / LSQ线拟合的样本数。
/ /该趋势线是在合适的引导点;
/ /乐队的计算有所不同,检查下面的数学和适应
/ /你自己的需要适当
/ /也点估计是由几何平均值给出
/ / MathPow(HCCC,.025)(见功能“get_avg」一节),而不是
/ /更标准的估计。
/ /这是计算相当密集
#property copyright "Copyleft ? 2007, GammaRatForex" #property link "http://www.gammarat.com/Forex/" //design based on the principles similar to the MetaTrader STD Channel // LSQ line fitting to the a number of samples. // The trendline is the leading point in the fit; // the bands are calculated somewhat differently, check the math below and adapt to // your own needs as appropriate // also the point estimate is given by the geometric mean // MathPow(HCCC,.025) (see function "get_avg" below) rather than // more standard estimates. // It's computationally fairly intensive // //#property indicator_separate_window //#property indicator_minimum 0 //#property indicator_maximum 100 #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 Aqua #property indicator_color2 Aqua #property indicator_color3 Aqua #property indicator_color4 Red #property indicator_color5 Red #property indicator_style1 0 #property indicator_style2 2 #property indicator_style3 2 #property indicator_style4 2 #property indicator_style5 2 //---- input parameters extern int Samples=60; extern int LookAhead = 0; extern double StdLevel1 = 2; extern double StdLevel2 =4.; //---- buffers double LeadingEdgeBuffer; double LeadingEdgeBufferPlus1; double LeadingEdgeBufferNeg1; double LeadingEdgeBufferPlus2; double LeadingEdgeBufferNeg2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators if(LookAhead <0)LookAhead=0; SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,LeadingEdgeBuffer); SetIndexShift(0,LookAhead); SetIndexDrawBegin(0,LookAhead+Samples+1); SetIndexLabel(0,"LeadingEdge Trend"); if(MathAbs(StdLevel1) > 0) { SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,LeadingEdgeBufferPlus1); SetIndexShift(1,LookAhead); SetIndexDrawBegin(1,LookAhead+Samples+1); SetIndexLabel(1,"LeadingEdge +" + DoubleToStr(StdLevel1,1) + " STD"); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,LeadingEdgeBufferNeg1); SetIndexShift(2,LookAhead); SetIndexDrawBegin(2,LookAhead+Samples+1); SetIndexLabel(2,"LeadingEdge -" + DoubleToStr(StdLevel1,1) + " STD"); } if(MathAbs(StdLevel2) > 0){ SetIndexStyle(3,DRAW_LINE); SetIndexBuffer(3,LeadingEdgeBufferPlus2); SetIndexShift(3,LookAhead); SetIndexDrawBegin(3,LookAhead+Samples+1); SetIndexLabel(3,"LeadingEdge +" + DoubleToStr(StdLevel2,1) + " STD"); SetIndexStyle(4,DRAW_LINE); SetIndexBuffer(4,LeadingEdgeBufferNeg2); SetIndexShift(4,LookAhead); SetIndexDrawBegin(4,LookAhead+Samples+1); SetIndexLabel(4,"LeadingEdge -" + DoubleToStr(StdLevel2,1) + " STD"); } //compute(); //---- return(0); } //| Point and figure | //+------------------------------------------------------------------+ int start() { compute(); return(0); } int compute(){ int i,j,counted_bars=IndicatorCounted(); static double a[2][2],b[2][2]; double base_det,c0,c1,v1,v2,alpha,beta; static int a_loaded=0; double s0,s1; double c01,c11; //---- if(Bars=0;i--){
if(i >=Bars-Samples){
continue;
}
c0 = 0;
c1 = 0;
for(j=0;j0){
LeadingEdgeBufferPlus1 = LeadingEdgeBuffer+StdLevel1*c0*Point;
LeadingEdgeBufferNeg1 = LeadingEdgeBuffer-StdLevel1*c1*Point;
}
if(MathAbs(StdLevel2)>0){
LeadingEdgeBufferPlus2 = LeadingEdgeBuffer+StdLevel2*c0*Point;
LeadingEdgeBufferNeg2 = LeadingEdgeBuffer-StdLevel2*c1*Point;
}
}
}
double get_avg(int k){
return(MathPow((High[k]*Low[k]*Close[k]*Close[k]),1/4.)/Point);
}
double det2(double a){
return (a[0][0]*a[1][1]-a[1][0]*a[0][1]);
}
//+------------------------------------------------------------------+GRFLeadingEdge.jpg
/ / LSQ线拟合的样本数。
/ /该趋势线是在合适的引导点;
/ /乐队的计算有所不同,检查下面的数学和适应
/ /你自己的需要适当
/ /也点估计是由几何平均值给出
/ / MathPow(HCCC,.025)(见功能“get_avg」一节),而不是
/ /更标准的估计。
/ /这是计算相当密集
#property copyright "Copyleft ? 2007, GammaRatForex" #property link "http://www.gammarat.com/Forex/" //design based on the principles similar to the MetaTrader STD Channel // LSQ line fitting to the a number of samples. // The trendline is the leading point in the fit; // the bands are calculated somewhat differently, check the math below and adapt to // your own needs as appropriate // also the point estimate is given by the geometric mean // MathPow(HCCC,.025) (see function "get_avg" below) rather than // more standard estimates. // It's computationally fairly intensive // //#property indicator_separate_window //#property indicator_minimum 0 //#property indicator_maximum 100 #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 Aqua #property indicator_color2 Aqua #property indicator_color3 Aqua #property indicator_color4 Red #property indicator_color5 Red #property indicator_style1 0 #property indicator_style2 2 #property indicator_style3 2 #property indicator_style4 2 #property indicator_style5 2 //---- input parameters extern int Samples=60; extern int LookAhead = 0; extern double StdLevel1 = 2; extern double StdLevel2 =4.; //---- buffers double LeadingEdgeBuffer; double LeadingEdgeBufferPlus1; double LeadingEdgeBufferNeg1; double LeadingEdgeBufferPlus2; double LeadingEdgeBufferNeg2; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators if(LookAhead <0)LookAhead=0; SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,LeadingEdgeBuffer); SetIndexShift(0,LookAhead); SetIndexDrawBegin(0,LookAhead+Samples+1); SetIndexLabel(0,"LeadingEdge Trend"); if(MathAbs(StdLevel1) > 0) { SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,LeadingEdgeBufferPlus1); SetIndexShift(1,LookAhead); SetIndexDrawBegin(1,LookAhead+Samples+1); SetIndexLabel(1,"LeadingEdge +" + DoubleToStr(StdLevel1,1) + " STD"); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,LeadingEdgeBufferNeg1); SetIndexShift(2,LookAhead); SetIndexDrawBegin(2,LookAhead+Samples+1); SetIndexLabel(2,"LeadingEdge -" + DoubleToStr(StdLevel1,1) + " STD"); } if(MathAbs(StdLevel2) > 0){ SetIndexStyle(3,DRAW_LINE); SetIndexBuffer(3,LeadingEdgeBufferPlus2); SetIndexShift(3,LookAhead); SetIndexDrawBegin(3,LookAhead+Samples+1); SetIndexLabel(3,"LeadingEdge +" + DoubleToStr(StdLevel2,1) + " STD"); SetIndexStyle(4,DRAW_LINE); SetIndexBuffer(4,LeadingEdgeBufferNeg2); SetIndexShift(4,LookAhead); SetIndexDrawBegin(4,LookAhead+Samples+1); SetIndexLabel(4,"LeadingEdge -" + DoubleToStr(StdLevel2,1) + " STD"); } //compute(); //---- return(0); } //| Point and figure | //+------------------------------------------------------------------+ int start() { compute(); return(0); } int compute(){ int i,j,counted_bars=IndicatorCounted(); static double a[2][2],b[2][2]; double base_det,c0,c1,v1,v2,alpha,beta; static int a_loaded=0; double s0,s1; double c01,c11; //---- if(Bars
发表于:2015-04-20 11:56只看该作者
2楼
缺钱,灌水赚通宝,谢谢分享!!
发表于:2015-05-26 03:17只看该作者
4楼
看看再说
韬客社区www.talkfx.co
发表于:2015-05-31 16:20只看该作者
5楼
太牛了,祝贺你。
发表于:2015-06-04 13:23只看该作者
6楼
谢谢分享!!
韬客社区www.talkfx.co
发表于:2015-06-21 08:14只看该作者
7楼
kkkkkkkkkkkk
韬客社区www.talkfx.co
发表于:2015-06-21 10:13只看该作者
8楼
如果是双布林通道类型,直接添加两次就可以了
韬客社区www.talkfx.co
发表于:2015-06-27 05:29只看该作者
9楼
修正版的布林通道!
发表于:2015-07-01 10:52只看该作者
10楼
感谢分享
韬客社区www.talkfx.co
发表于:2016-09-20 14:49只看该作者
12楼
怎么个用法呢
韬客社区www.talkfx.co
发表于:2021-01-14 00:08只看该作者
13楼
hhhhhhhhhhhhhhhhhhhhh
韬客社区www.talkfx.co
发表于:2021-06-19 08:58只看该作者
14楼
谢谢分享mt4通道修改版
韬客社区www.talkfx.co