Ingenuity...
Red-rust on the Latch-pin in the photo implies the pin shown is steel, probably ~Ftu ~60-KSI.
Typically I would disposition to form the Latch-Pin in the -T4 temper [bend radius TBD]; then Age harden to -T6 per any valid aluminum alloy heat treat spec, [AMS, MIL, ASTM]. This does (2) important things: improved ductility in -T4 temper makes the part easier to form to a tighter bend radius without threat of cracks or significant Ludder's lines; and the long Aging HT is a great stress relief operation.
Why Do you really want to make the pin from aluminum?? What I am most concerned about is what You intend to use the pin for: 'sliding latch'. IF in constant use, then the pin could wear-out rapidly. IF relied on for security, then it could be more easily damaged by a vandal/burglar.
You can probably find a steel 'rifle-bolt' or pre-bent Latch Pin [5/16-Dia] at a hardware store for much less than You think... and the steel would already have a tapered tip and zinc plating.
Regards, Wil Taylor
o Trust - But Verify!
o We believe to be true what we prefer to be true. [Unknown]
o For those who believe, no proof is required; for those who cannot believe, no proof is possible. [variation,Stuart Chase]
o Unfortunately, in science what You 'believe' is irrelevant. ["Orion", Homebuiltairplanes.com forum]