MTF stochastic
Created at 23 Apr 2015, 06:35
MTF stochastic
23 Apr 2015, 06:35
//+------------------------------------------------------------------+ //| Stochastic_MTF.mq4 | //| Copyright © 2011 Forex-indikatoren.com. All rights reserved | //| http://www.forex-indikatoren.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2011 Forex-indikatoren.com." #property link "http://www.forex-indikatoren.com" //---- #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 DodgerBlue #property indicator_color2 Tomato #property indicator_level1 80 #property indicator_level2 20 extern string TimeFrameNote="TimeFrame =0 - Current Timeframe, =1 - 1MIN, =2 - 2MIN, =3 - 3MIN, =5 - 5MIN, =6 - 6MIN, =10 - 10MIN, =15 - 15MIN, =30 - 30MIN, =60 - 1H, =240 - 4H, =480 - 480MIN, =1440 - D1, =10080 - W1, =43200 - MN1"; extern int TimeFrame=0; extern int KPeriod=8; extern int DPeriod=3; extern int Slowing=3; extern int MAMethod=0; extern int PriceField=0; // PriceField: 0=Hi/Low 1=Close/Close double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicator line SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(1,ExtMapBuffer2); SetIndexStyle(1,DRAW_LINE,STYLE_DOT); //---- name for DataWindow and indicator subwindow label switch(TimeFrame) { case 1 : string TimeFrameStr="Period_M1"; break; case 2 : TimeFrameStr="Period_M2"; break; case 3 : TimeFrameStr="Period_M3"; break; case 5 : TimeFrameStr="Period_M5"; break; case 6 : TimeFrameStr="Period_M6"; break; case 10 : TimeFrameStr="Period_M10"; break; case 15 : TimeFrameStr="Period_M15"; break; case 30 : TimeFrameStr="Period_M30"; break; case 60 : TimeFrameStr="Period_H1"; break; case 240 : TimeFrameStr="Period_H4"; break; case 480 : TimeFrameStr="Period_H8"; break; case 1440 : TimeFrameStr="Period_D1"; break; case 10080 : TimeFrameStr="Period_W1"; break; case 43200 : TimeFrameStr="Period_MN1"; break; default : TimeFrameStr="Current Timeframe"; } IndicatorShortName("Stochastic ("+KPeriod+","+DPeriod+","+Slowing+") "+TimeFrameStr); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { datetime TimeArray[]; int i,shift,limit,y=0,counted_bars=IndicatorCounted(); // Plot defined timeframe on to current timeframe ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame); //---- limit=Bars-counted_bars; for(i=0,y=0;i<limit;i++) { if (Time[i]<TimeArray[y]) y++; ExtMapBuffer1[i]=iStochastic(NULL,TimeFrame,KPeriod,DPeriod,Slowing,MAMethod,PriceField,0,y); ExtMapBuffer2[i]=iStochastic(NULL,TimeFrame,KPeriod,DPeriod,Slowing,MAMethod,PriceField,1,y); } //---- return(0); } //+------------------------------------------------------------------+
Can someone make this work? I copied and pasted in the cAlgo and hit build but it keeps saying source file not found!
Spotware
18 Jun 2015, 17:55
Dear Trader,
We do not provide coding assistance services. We more than glad to assist you with specific questions about cAlgo.API. You also can contact one of our Partners or post a job in Development Jobs section for further coding assistance.
@Spotware