I need an ea template for mql5 with the following requirements:
- I will input 2 different contracts as text
- Will calculate the ratio of the 2 contracts and store as bars with selectable period (1m, 5m, etc...)
- Will calculate ATR of the custom bars
- Will calculate MA of ATR of the custom bars
The ea must be properly documented and include the following functions:
CreateCustomBars : takes the 2 contracts and time period as input, returns array containing ratio of the 2 contracts stored as open/high/low/close at the selected time period
ATR_Custom_Array: takes the custom array and period as input, returns the ATR value
MA_Custom_ARRAY: takes the custom array and period as input, returns the MA value
both functions need to work from the start so they need to be able access historical/past data from prior to starting the ea