//+------------------------------------------------------------------+ //| Custom MACD.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" //---- indicator settings #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Silver #property indicator_color2 Red #property indicator_width1 2 #property indicator_width2 2 //---- indicator parameters extern int WPR_Period=21; extern int MA_Period=14; extern string m = "--Moving Average Types--"; extern string m0 = " 0 = SMA"; extern string m1 = " 1 = EMA"; extern string m2 = " 2 = SMMA"; extern string m3 = " 3 = LWMA"; extern int MA_Type=1; //---- indicator buffers double WPR_Buffer[]; double MA_Buffer[]; int MA_Mode; string strMAType; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- drawing settings SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexDrawBegin(1,WPR_Period); IndicatorDigits(Digits+1); //---- indicator buffers mapping SetIndexBuffer(0,WPR_Buffer); SetIndexBuffer(1,MA_Buffer); //---- name for DataWindow and indicator subwindow label switch (MA_Type) { case 1: strMAType="EMA"; MA_Mode=MODE_EMA; break; case 2: strMAType="SMMA"; MA_Mode=MODE_SMMA; break; case 3: strMAType="LWMA"; MA_Mode=MODE_LWMA; break; default: strMAType="SMA"; MA_Mode=MODE_SMA; break; } IndicatorShortName( "WPR" + " (" + WPR_Period + ") " + " : " + strMAType+ " (" +MA_Period + ") "); SetIndexLabel(0,"WPR" + " (" +WPR_Period + ") "); SetIndexLabel(1,strMAType+ " (" + MA_Period + ") "); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Moving Averages Convergence/Divergence | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //---- WPR counted in the 1-st buffer for(int i=0; i<limit; i++) WPR_Buffer[i]=iWPR(NULL,0,WPR_Period,i); //---- MA line counted in the 2-nd buffer for(i=0; i<limit; i++) MA_Buffer[i]=iMAOnArray(WPR_Buffer,Bars,MA_Period,1,MA_Mode,i); //---- done return(0); } //+------------------------------------------------------------------
This indicator codes how EA can I do?
answer possible is question if words in question understandable shuffled not
meikel:
answer possible is question if words in question understandable shuffled not
answer possible is question if words in question understandable shuffled not
Hi
This indicators convert EA ?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Please Help.
Moving Average value chart of WPR was not able to draw encoding.
Can you help me do ?
Thank You
WPR' s MA