This not a bad looking pin bar and it does reject from the 200EMA.
However, a pin bar only really confirms the following day and this was positive and did break the pin bar's high intra-day but its still a weak performance. On top of that the 50EMA is now below the 20 and is sloping downwards, and the swing low potentially formed by the pin bar's low is below recent previous swing lows.
Nevertheless, the opportunity was there to take this pattern and set a buy order just above the pin-bar's high.
Note that entering or setting an entry order on the close of the pin bar itself or entering manually at the closing price of the pin bar are aggressive tactics and will have a lower win rate. I think you acknowledge that's an uncomfortable place to be in now. Waiting for confirmation sacrifices some pips from total, but gains a better win rate: given that this pair has been in a jerky uptrend since late 2016 and is miles away from all-time highs you might think the sacrifice of one day's-worth of pips in order to get a more secure entry is worth it.