论坛全局菜单下方 - exness285X70 - 韬客社区论坛全局菜单下方 - 荔枝返现285X70 - 韬客社区论坛全局菜单下方 - ThinkMarkets285X70 - 韬客社区论坛全局菜单下方 - TICKMILL 285X70 - 韬客社区
查看:770回复:0
草龙韬客社区韬客社区
注册时间2004-12-17
[MT4指标]EES V Speed指标
韬客社区
楼主发表于:2014-08-18 03:23只看该作者倒序浏览
1楼 电梯直达
电梯直达
附图指标, mt4指标类型:震荡指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| EES V Speed.mq4 | //| Copyright ? 2009, Elite E Services, Inc. | //| http://www.eliteeservices.net | //+------------------------------------------------------------------+ #property copyright \"Copyright ? 2009, Elite E Services, Inc.\" #property link \"http://www.eliteeservices.net\" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 DodgerBlue #property indicator_color2 Red #property indicator_style2 STYLE_DOT extern int V_Period = 5, MA_Period = 13; extern bool Draw_Value_Line = true, Display_V_On_Bar = true; extern double TextColor1 = Black; /* extern bool Export_Values_To_File = true; extern string Export_FileName = \"V_Speed\"; */ double VBuff; double MABuff; double TempBuffer; int MyDigits; double MyPoint; string short_name; int BARS; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- if(Digits==5)MyDigits=4; else if(Digits==3)MyDigits=2; else MyDigits = Digits; if (Point == 0.00001) MyPoint = 0.0001; //6 digits else if (Point == 0.001) MyPoint = 0.01; //3 digits (for Yen based pairs) else MyPoint = Point; //Normal //---- indicators //---- 1 additional buffer used for counting. IndicatorBuffers(3); //---- indicator line SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,VBuff); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,MABuff); SetIndexBuffer(1,TempBuffer); //---- name for DataWindow and indicator subwindow label short_name=\"EES V Speed(\"+V_Period+\")\"; IndicatorShortName(short_name); SetIndexLabel(0,short_name); //---- SetIndexDrawBegin(0,V_Period); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectsDeleteAll( 0, OBJ_TEXT); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i,counted_bars=IndicatorCounted(); //---- if(Bars<=V_Period) return(0); //---- initial zero if(counted_bars<1) for(i=1;i<=V_Period;i++) VBuff[Bars-i]=0.0; //---- i=Bars-counted_bars-1; BARS = Bars; while(i>=0) { double high=High; double low =Low; if(i==Bars-1) TempBuffer=(high-low)/MyPoint; else { double prevclose=Close[i+1]; TempBuffer=(high-low)/MyPoint; } i--; } //---- if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; for(i=0; i-1) { ObjectSetText(\"VBar\"+iTime(Symbol(),0,i), DoubleToStr(VBuff,1), 8, \"Tahoma\", TextColor1); } } } for(i=0; i-1) ObjectMove(\"CRBC Indicator Price Line\"+win, 0, iTime(Symbol(),0,2), C); ObjectSet(\"CRBC Indicator Price Line\"+win, OBJPROP_COLOR, LightSlateGray); } /* i=Bars-counted_bars-1; while(i>=0) { subFileWriteValuesCSV(Symbol()+\" \"+Export_FileName, TimeToStr(iTime(Symbol(),0,i),TIME_DATE|TIME_MINUTES), DoubleToStr(VBuff,MyDigits), DoubleToStr(MABuff,MyDigits)); i--; } */ return(0); } //+------------------------------------------------------------------+ /* void subFileWriteValuesCSV(string filename, string value1, string value2,string value3) { int handle =0; datetime orderOpen=TimeCurrent(); string fn = filename+\".csv\"; handle=FileOpen(fn, FILE_CSV|FILE_READ|FILE_WRITE, \',\'); if(handle<1) { FileWrite(handle, \"CURRENT TIME\", \"V SPEED VALUE\", \"MA VALUE\"); FileClose(handle); } if(handle>0) { FileSeek(handle, 0, SEEK_END); FileWrite(handle, value1, value2,value3); FileClose(handle); } } */
TK29帖子1楼右侧xm竖版广告90-240
个性签名

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

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