Yes, the Trainer Shiny Value and the Shiny Value are what makes your eggs hatch into a shiny. If, for example, your Trainer Shiny Value is 1262, then he eggs you are trying to hatch must have a Shiny Value of 1262 to hatch into a shiny. If your egg has another value, like 1654, then you need to trade this egg to someone who has a Trainer Shiny Value equal to 1654 and let them hatch it into a shiny for you. It's somewhat like winning a lottery, since the values must match each other in order to hatch into a shiny. It is not possible to check these values in-game.
There are tools on the internet I think (or were) that could calculate these values for you, you could calculate exactly when your egg would hatch into a value that matched your own, or which value it would hatch into so you could trade it to someone else if that value was different than yours. I never used these things because I think it kinda spoils the game and to put in your ow effort and patience is way more rewarding, fair and fun.
So, I hope you have an answer here, but isn't it more fun to hunt down shinies for yourself instead of letting the internet and "tools" spoil them for you? ;)