That's correct!
Hey, this was a little tricky, but it's worth making the point. Due to the sharp, snake-like curve of Central America, the Panama Canal actually runs
South-East
. Hence you must head easterly to get from the Atlantic to the Pacific.