| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Did you miss this one?
+------------------------------------------------------------------+ William36HistogramWalerttest.mq4 Let Willie check your swing /* original formula) WH:=HHV(HIGH,5); WL:=LLV(LOW,5); //WRD:=(( HHV( WH,36 )-c ) /( HHV(WH,36 ) - LLV( WL,36) ) ) *- 100, //WDo:=WRD+50; //WU:=IF(WDo>0,WDo,0); //WD:=IF(WDo<0,WDo,0); //{- this will give you the william's when it is below zero and it is plotted red} //LN:=0; */ #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 LimeGreen #property indicator_color2 Red #property indicator_color3 Gray #property indicator_maximum 50 #property indicator_minimum -50 #property indicator_level1 0 #property indicator_level2 15 #property indicator_level3 -15 //---- input parameters //---- buffers double WU[],WD[],W[],Zero[]; int Ssw=0,Bsw=0; //+------------------------------------------------------------------+ Here's two others, the first is a Zero lag MACD, the second a Zero lag Stochastic. Could you find the time to convert these to downloadable form please? Much appreciated. //+------------------------------------------------------------------+ //| ZeroLag MACD.mq4 | //| RD | //| marynarz15@wp.pl | //+------------------------------------------------------------------+ #property copyright "RD" #property link "marynarz15@wp.pl" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Magenta #property indicator_color2 Orange //---- input parameters extern int FastEMA=12; extern int SlowEMA=24; extern int SignalEMA=9; //---- buffers double MACDBuffer[]; double SignalBuffer[]; double FastEMABuffer[]; double SlowEMABuffer[]; double SignalEMABuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(5); SetIndexBuffer(0,MACDBuffer); SetIndexBuffer(1,SignalBuffer); SetIndexBuffer(2,FastEMABuffer); SetIndexBuffer(3,SlowEMABuffer); SetIndexBuffer(4,SignalEMABuffer); SetIndexStyle(0,DRAW_HISTOGRAM,EMPTY,2); SetIndexStyle(1,DRAW_LINE,EMPTY,2); SetIndexDrawBegin(0,SlowEMA); SetIndexDrawBegin(1,SlowEMA); IndicatorShortName("ZeroLag MACD("+FastEMA+","+SlowEMA+","+SignalEMA+")"); SetIndexLabel(0,"MACD"); SetIndexLabel(1,"Signal"); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; double EMA,ZeroLagEMAp,ZeroLagEMAq; for(int i=0; i<limit; i++) { FastEMABuffer[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i); SlowEMABuffer[i]=iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i); } for(i=0; i<limit; i++) { EMA=iMAOnArray(FastEMABuffer,Bars,FastEMA,0,MODE_E MA,i); ZeroLagEMAp=FastEMABuffer[i]+FastEMABuffer[i]-EMA; EMA=iMAOnArray(SlowEMABuffer,Bars,SlowEMA,0,MODE_E MA,i); ZeroLagEMAq=SlowEMABuffer[i]+SlowEMABuffer[i]-EMA; MACDBuffer[i]=ZeroLagEMAp - ZeroLagEMAq; } for(i=0; i<limit; i++) SignalEMABuffer[i]=iMAOnArray(MACDBuffer,Bars,SignalEMA,0,MODE_EMA,i ); for(i=0; i<limit; i++) { EMA=iMAOnArray(SignalEMABuffer,Bars,SignalEMA,0,MO DE_EMA,i); SignalBuffer[i]=SignalEMABuffer[i]+SignalEMABuffer[i]-EMA; } return(0); } //+------------------------------------------------------------------+ Zerolagstochs.mq4 //+------------------------------------------------------------------+ //| PriceVSwma.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "perky_z@yahoo.com" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 White #property indicator_color2 Red //---- input parameters double stok1=0,stok2=0,stok3=0,stok4=0,stok5=0,mov=0,stok smoothed=0,smoothing=15; int shift=0, MAType=1, cnt=0, prevbars=0,loopbegin=0; bool first=true; //---- buffers double TrendBuffer[]; double LoBuffer[]; double HiBuffer[]; double PlusSdiBuffer[]; double MinusSdiBuffer[]; double TempBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- 3 additional buffers are used for counting. IndicatorBuffers(3); //---- indicator buffers SetIndexBuffer(0,TrendBuffer); SetIndexBuffer(1,LoBuffer); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2,White); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2,Red); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)); //---- name for DataWindow and indicator subwindow label IndicatorShortName("Zero Lag Stocs"); SetIndexDrawBegin(0,TrendBuffer); SetIndexDrawBegin(1,LoBuffer); return(0); } //+------------------------------------------------------------------+ //| Average Directional Movement Index | //+------------------------------------------------------------------+ int start() { // initial checkings // check for additional bars loading or total reloading if (Bars < prevbars ) first = true; if (Bars-prevbars>1) first = true; prevbars = Bars; if (first) { // loopbegin prevent couning of counted bars exclude current loopbegin = Bars-1; if (loopbegin < 0) return(0); // not enough bars for counting first = False; } loopbegin = loopbegin+1; // Comment( loopbegin); // current bar is to be recounted too for (shift = loopbegin; shift>= 0 ;shift--) { stok1 = (iStochastic(NULL,0,8,3,3,MODE_SMA,NULL,MODE_MAIN, shift))*0.05; stok2 = (iStochastic(NULL,0,89,21,3,MODE_SMA,NULL,MODE_MAI N,shift))*0.43; stok3 = (iStochastic(NULL,0,55,13,3,MODE_SMA,NULL,MODE_MAI N,shift))*0.26; stok4 = (iStochastic(NULL,0,34,8,3,MODE_SMA,NULL,MODE_MAIN ,shift))*0.16; stok5 = (iStochastic(NULL,0,21,5,3,MODE_SMA,NULL,MODE_MAIN ,shift))*0.10; mov = stok1+stok2+stok3+stok4+stok5; stoksmoothed = mov/smoothing + LoBuffer[shift+1]*(smoothing-1)/smoothing; TrendBuffer[shift]=mov; LoBuffer[shift]= stoksmoothed; loopbegin = loopbegin-1; }} return(0); // prevent to previous bars recounting ZeroLagStochsSignals.mq4 ZLStochs SignalsWith Alert for you sleepyheads needs ZLstochs indicator saved as indicator #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LimeGreen #property indicator_color2 Red //---- input parameters extern int a=14; extern int alerty=0; // 0 for alerts 1 for no alerts //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double b4zls,nowzls,nowzlsmain; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW,EMPTY); SetIndexArrow(0,233); SetIndexBuffer(0, ExtMapBuffer1); SetIndexStyle(1,DRAW_ARROW,EMPTY); SetIndexArrow(1,234); SetIndexBuffer(1, ExtMapBuffer2); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- TODO: add your code here //ObjectDelete(""); //ObjectDelete("down cross"); //ObjectDelete(0,233); //ObjectDeleteEx(0, DRAW_ARROW,0,0,0); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- check for possible errors if(counted_bars<0) return(-1); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=1000-counted_bars; //---- macd counted in the 1-st buffer for(int i=limit; i>=0; i--) { b4zls=iCustom(NULL,0,"ZeroLagStochs",0,i+1); nowzls=iCustom(NULL,0,"ZeroLagStochs",0,i); nowzlsmain=iCustom(NULL,0,"ZeroLagStochs",1,i); if(b4zls>nowzlsmain && nowzls<nowzlsmain) { ExtMapBuffer2[i]=High[i]+7*Point; if (alerty==0 && i<2 ) Alert(Symbol()," ",Period()," ZeroLagStochs Cross SELL"); } if(b4zls<nowzlsmain && nowzls>nowzlsmain) { ExtMapBuffer1[i]=Low[i]-5*Point; if (alerty==0 && i<2) Alert(Symbol()," ",Period()," ZeroLagStochs Cross BUY"); } } //---- return(0); } Wiseman 1.mq4 |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error codes script! | codersguru | Tools and utilities | 6 | 05-03-2008 01:14 AM |
| Spam of members coming from this forum : Aegis | BrunoFX | Non Related Discussions | 5 | 04-18-2007 04:50 PM |
| need help on codes | antone | Indicators - Metatrader 4 | 15 | 03-01-2007 02:48 PM |