using beginning of last year as anchor point

 
hello everyone how can i find the date of previous year and use it as an anchor point 
 
You can use CopyRates() with the monthly timeframe and then you look for the Close of the last Dezember.