Well, first off, there is no need to make it caster level 4, so you might as well make it at effective caster level 3.
So, the cost is:
Spell Level X Caster Level X 2000 (for continuous) X duration penalty (for continuous effects) X affinity penalty (for location of misc item)
so it's...
2X3X2000X2 (spell duration in minutes/round)X1 (amulet has protection affinity, so no penalty) = 24000 gold
24000/2 = 12000 gp construction cost
24000/25 = 960 XP
If you really want to make it caster level 4 for some reason, multiply all costs by 4/3.
You might also want to add an additional cost of X1.1 to X1.5 because the duration penalty doesn't take into account that there is a limit to the damage the spell can stop before ending.
(but really, DR is kind of like attack bonus, AC bonus, resistances, and skill bonuses, in that I would probably come up with some formula involving the bonus squared instead of just making a spell continuous - that would make something silly like DR 10/magic prohibitively expensive except at higher levels. I mean, I certainly wouldn't let someone get continual true strike for 8000 gp, and while this isn't that abusive, it's still kind of imbalanced.)