cold rolled is soft and not great material, I have made lots of pins and get material from the local cylinder rebuild shop, the hydraulic cylinder rods are good material and they usually have lots from old cylinders for decent price, its easy to machine with carbides
You "can" but the problem is its soft and weak. Ever try and remove a bent pin from a excavator.....not fun.
There are a whole lot of materials suitable. 1144 stressproof, 4140 or 4340 are excellent choices.
Usually pins are pretty hard. Like upper 50's or lower 60's on the Rc scale. Thats more for wear than strength. Sounds like you are talking about a pin for the slew cylinder.....so a non-heat treated pin wouldnt concern me as much as a pin on the main boom. Because the slew cylinder usually sees a fraction of the use the other pins do. But it still needs to be strong because its under alot of force as it has to hold the boom straight when digging