William's Percent Range with Moving Average indicator.

GreenPoint
54
GreenPoint  

Hi,

I'm looking for indicator that includes William's Percent Range and Moving Average on one indicator similar to attached screenshot.

Thanks in advance for help. 

Thanks

GreenPoint 

 

 

Alain Verleyen
42232
Alain Verleyen  
GreenPoint:

Hi,

I'm looking for indicator that includes William's Percent Range and Moving Average on one indicator similar to attached screenshot.

Thanks in advance for help. 

Thanks

GreenPoint 


This is natively in MT4. Add Williams %R, then drag and drop MA on it, change settings Apply to : previous indicator's data.



GreenPoint
54
GreenPoint  

Hi Angevoyageur, 

Thanks for your quick answer.

Could you please help me to identify why I'm getting following error message in Strategy settings: "Invalid integer number as parameter 3 for iMA function"? I believe that everything is due to the 3 parameter of iMA variable that is: Second_MA. If this is incorrect what do I need to insert to use Previous Indicator's Data in my EA?

int limit = 2;

double First_MA [];

double Second_MA []; 

double MA1 = iMA (NULL,0,Second_MA,0,MODE_SMA,PRICE_MEDIAN,1); 

double MA2 = iMA (NULL,0,Second_MA,0,MODE_SMA,PRICE_MEDIAN,2);

for(int i=0; i<limit; i++)

   First_MA [i] = iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,i);

for(i=0; i<limit; i++)

   Second_MA [i] = iMAOnArray(First_MA,0,14,0,MODE_SMA,i); 

Regards

GreenPoint 

Simon Gniadkowski
17401
Simon Gniadkowski  
GreenPoint:

Hi Angevoyageur, 

Thanks for your quick answer.

Could you please help me to identify why I'm getting following error message in Strategy settings: "Invalid integer number as parameter 3 for iMA function"? I believe that everything is due to the 3 parameter of iMA variable that is: Second_MA. If this is incorrect what do I need to insert to use Previous Indicator's Data in my EA?

<CODE DELETED>

Please read some other posts before posting . . .

Please edit your post . . .    please use the   SRC   button to post code: How to use the   SRC   button. 

Simon Gniadkowski
17401
Simon Gniadkowski  
GreenPoint:

Hi Angevoyageur, 

Thanks for your quick answer.

Could you please help me to identify why I'm getting following error message in Strategy settings: "Invalid integer number as parameter 3 for iMA function"? I believe that everything is due to the 3 parameter of iMA variable that is: Second_MA. If this is incorrect what do I need to insert to use Previous Indicator's Data in my EA?


Please check the documentation,  iMA()  the 3rd parameter is an int and is the period not an array of type double.