To be honest, I want to obtain the electorate gold badge. Some people in this site commented to do 40 votes/day in 15 consecutive days. My question is, can I vote to questions being posted long time ago, say for instance, those posted on the years 2010-2014? Are these votes credited to the electorate gold badge? OR do I have to cast my votes to recent questions only. I really don't know what to do. Sorry for this, I am new to this meta exchange.
There is no criterion the questions needs to satisfy for your vote to count towards the electorate badge, beyond it being a question post.
It can be old or new, it can be highly-vote, lowly voted or not voted at all before. It can be Community Wiki or not. Also note upvotes and downvotes count. It's also not a problem if the questions gets deleted later (and due to this I believe one could even do it in less than 15 days; that's not meant as encouragement to try it).
You see, you can vote whatever you like for the badge. It would be nice though that you still make an effort to cast the votes in a meaningful way. For example, to vote with consideration on old, low-scoring questions in your field of expertise could be a useful service.