How to display only the discounted price products in a specific CMS page?

I want to display only discounted price product in specific cms page for magento 1 I have follow this link [] and I have try same thing in Magento 2 but its not working I can able to display only discounted product using this method prepareProductCollection($collection) in \Magento\Catalog\Model\Layer\Category but toolbar section display wrong count and left side filter also not display correct count.