论坛全局菜单下方 - exness285X70 - 韬客社区论坛全局菜单下方 - 荔枝返现285X70 - 韬客社区论坛全局菜单下方 - ThinkMarkets285X70 - 韬客社区论坛全局菜单下方 - TICKMILL 285X70 - 韬客社区
查看:589回复:0
草龙韬客社区韬客社区
注册时间2004-12-17
[MT4指标]Bezier指标
韬客社区
楼主发表于:2014-02-08 16:45只看该作者倒序浏览
1楼 电梯直达
电梯直达
[backcolor=rgb(251, 251, 252)]指标是一个移动平均数的选择,但速度较慢。[/backcolor]
[backcolor=rgb(251, 251, 252)]period - 平均时间周期; [/backcolor]
[backcolor=rgb(251, 251, 252)]t -敏感系数必须在 0到 1的范围内;[/backcolor]
[backcolor=rgb(251, 251, 252)]shift - 图表平移;[/backcolor]
[backcolor=rgb(251, 251, 252)]price - 指标建造的价格 (0-close, 1-open, 2-high, 3-low,4-(High[n]+Low[n])/2, 5-(High[n]+Low[n]+Close[n])/3, 6-High[n]+Low[n]+Close[n]+Close[n])/4)[/backcolor]
主图指标 mt4指标类型:趋势指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| Bezier.mq4 | //| Copyright 2007, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright 2007, MetaQuotes Software Corp." #property link "Lizhniyk E" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Aqua //---- input parameters extern int period=8; extern double t=0.5; extern int shift=0; extern int Price=0; double Ext; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,Ext); SetIndexLabel(0,"Bezier("+period+","+t+")"); SetIndexShift(0,shift); SetIndexDrawBegin(0,period); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; if(counted_bars==0) limit-=1+period; //---- for(int j=0;j=0;i--) { r+=pr(Price,j+i) * (fact(period)/(fact(i)*fact(period-i))) * MathPow(t,i) * MathPow(1-t,period-i); } Ext[j]=r; } //---- return(0); } //+------------------------------------------------------------------+ double fact(int value) { double res=1; for(double j=2;jBezier_orig.jpg
TK29帖子1楼右侧xm竖版广告90-240
个性签名

阅尽天下指标
搬砖开始,始于2014

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]