Double vision (in both eyes) that goes away when I look through a pinhole or squint my eyes, what does this mean?

Confusedandcuriois
Double vision that "goes away" when I look through a pinhole. What does this mean?
I have had vertical double vision for a while now (sometimes triple vision when I am looking at something especially vivid and bright, like the display on our microwave, for example). It is in both eyes. When I close my left eye, it is present in my right, and when I close my right eye, it is present in my left. When I squint, it gets much better, but sometimes squinting makes it worse when my eyes are watery. It also gets better when I get closer to whatever I am looking at.

Recently, I saw something on a site about the "pinhole test," where you poke a small hole about 2mm on a piece of paper or an index card and look through it. If you see clearly, then it apparently rules out any neurological problems. I have done this test, and my symptoms do improve. Actually, the double vision completely goes away when I do the test. But I am wondering, is it true that the test rules out neurological problems? If so, then what does that mean for my eyes? Do I just need glasses or is there some other problem that I could have? What are the other possibilities?

Thanks in advance for any help.
Double vision (in both eyes) that goes away when I look through a pinhole or squint my eyes, what does this mean?
2 Opinion