Custom period PERIOD_Y1

 

Hi,

I want to ask you how I can use a custom period that is not present in ENUM_TIMEFRAMES, for example PERIOD_Y1 (= 1 Year), in calls to indicators like MACD:

 

iMACD(NULL, PERIOD_Y1, 12, 26, 9, PRICE_CLOSE, MODE_MAIN, 1);
 
No but you can take 12 * MN1 and calculate Y1 
 
static int PERIOD_Y1 = 518400; //43200 * 12

(something like this)

 

No i meant call the indicator 12 times each for every month and then process the result to see where it's at after those 12 months.

Or depending on the indicator used and the data you are looking for it can sometimes suffice to call at the starting point once and once at the end point and then calculate the difference.

 
Ok, thank you.
Reason: