After several attempts i'm still rather at a loss to make this indicator alert me when the conditions are met. I get either an alert for EVERY signal on my chart or no alert at all. Plus getting e-mail is being a bit of a pain, don't suppose anyone could point out how? Pop-ups and sound are more important but if e-mail isn't that hard to add then i'd happily whack it in.
Also if anyone could show me how to filter out certain time's i.e. the first 2 time period bars OR the time range. I don't want to discount them in the indicator, I just don't want a signal painted during those times.
Either one would be appreciated and happy to throw a few bob if asked, I know this isn't that difficult to do but again if you don't know, ya don't know.
Also if anyone could show me how to filter out certain time's i.e. the first 2 time period bars OR the time range. I don't want to discount them in the indicator, I just don't want a signal painted during those times.
Either one would be appreciated and happy to throw a few bob if asked, I know this isn't that difficult to do but again if you don't know, ya don't know.
Inserted Code
#property indicator_chart_window #property indicator_buffers 2 extern int offset=5; // pips above/below high/low to paint arrows extern int StochK=5; // Stochastic %K extern int StochD=3; // Stochastic %D extern int StochSlowing=3; // Stochastic Slowing extern int StochMethod=MODE_SMA; // Stochastic Method extern int StochPrice=0; // Stochastic Price (0=low/high, 1=close/close) extern double PSARStep=0.03; // Parabolic SAR Step extern double PSARMax=0.2; // Parabolic SAR Maximum double SignalL[],SignalS[]; //=========================================================================================== //=========================================================================================== int init() { SetIndexBuffer(0,SignalL); SetIndexStyle(0, DRAW_ARROW,DRAW_ARROW,1,Green); SetIndexArrow(0,SYMBOL_ARROWUP); SetIndexBuffer(1,SignalS); SetIndexStyle(1, DRAW_ARROW,DRAW_ARROW,1,Red); SetIndexArrow(1,SYMBOL_ARROWDOWN); return(0); } //=========================================================================================== //=========================================================================================== int deinit() { return(0); } //=========================================================================================== //=========================================================================================== int start() { int i,imax,counted_bars=IndicatorCounted(); double ao1,ac1,ao2,ac2,sm1,ss1,sm2,ss2,sar,sar2; if(counted_bars>0) imax=Bars-IndicatorCounted(); else imax=Bars-1; for(i=imax;i>=0;i--) { SignalL[i]=EMPTY_VALUE; SignalS[i]=EMPTY_VALUE; ao1=iAO(NULL,0,i); ao2=iAO(NULL,0,i+1); ac1=iAC(NULL,0,i); ac2=iAC(NULL,0,i+1); sm1=iStochastic(NULL,0,StochK,StochD,StochSlowing,StochMethod,StochPrice,MODE_MAIN,i); sm2=iStochastic(NULL,0,StochK,StochD,StochSlowing,StochMethod,StochPrice,MODE_MAIN,i+1); ss1=iStochastic(NULL,0,StochK,StochD,StochSlowing,StochMethod,StochPrice,MODE_SIGNAL,i); ss2=iStochastic(NULL,0,StochK,StochD,StochSlowing,StochMethod,StochPrice,MODE_SIGNAL,i+1); sar=iSAR(NULL,0,PSARStep,PSARMax,i); sar2=iSAR(NULL,0,PSARStep,PSARMax,i+1); // Stochastic Notes // Main = %K = Solid/Teal Line // Signal = %D = Dashed/Red Line // sm2<limit && sm1>limit = Main line crossed above limit // sm2>limit && sm1<limit = Main line crossed below limit // ss2<limit && ss1>limit = Signal line crossed above limit // ss2>limit && ss1<limit = Signal line crossed below limit // sm1>ss1&&sm2<ss2 = Stochastic Cross Up // sm1<ss1&&sm2>ss2 = Stochastic Cross Down // AC & AO Notes // ac1>ac2 = Green AC // ac1<ac2 = Red AC // ao1>ao2 = Green AO // ao1<ao2 = Red AO if(sm1>ss1 && sar<=iOpen(NULL,0,i)) { if(ac1>ac2 && sar2>=iOpen(NULL,0,i+1)) SignalL[i]=iLow(NULL,0,i)-offset*Point; } else if(sm1<ss1 && sar>=iOpen(NULL,0,i)) { if(ac1<ac2 && sar2<=iOpen(NULL,0,i+1))SignalS[i]=iOpen(NULL,0,i)+offset*Point; } } return(0); } //=========================================================================================== //===========================================================================================