Custom Moving average indicator changing parameters as per TF

 

Hi,

I am new to MQ4 coding. Can somebody please guide me for writing a code for following:

 

I need a Custom moving average indicator which would plot moving average line based on chart timeframe.

e.g.: If M15 chart is open, it should plot avg line using Linear wt avg method on Open price w/o shift and Avg period: 14

and if I switch to M30 or higher TF, it will compute avg line using Exponential avg method on HLCC/4 price with shift-2 and Avg period: 14 

 

Gist: It is Moving Average indicator, which switches parameters internally based on chart TF and accordingly plot avg line.

I am not able to write code fr this condition. Appreciate any help in this regard.

 

Thanks

 
Either you learn to code by reading the Book and the Documentation (links are above) with their examples or you pay a freelance (link as well above)
 
Best to ask here ... https://www.mql5.com/en/job
 
TradingForLife: I am not able to write code fr this condition.
  1. Why not?
  2. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 

TradingForLife:

 

If M15 chart is open, it should plot avg line using Linear wt avg method on Open price w/o shift and Avg period: 14

and if I switch to M30 or higher TF, it will compute avg line using Exponential avg method on HLCC/4 price with shift-2 and Avg period: 14  

if you are unable to code it

Why not simply add your first MA to the chart and in the visualization tab, set it to only show on M15 and any other tf that you want it displayed

Then add the 2nd and have it displayed only on M30 and higher. 

Reason: