This idea was originally from @midtownsk8rguy and since his code is proprietary and hidden I messed up with Pinescript to get exact same result.
To use this, make sure to disable wicks under Chart Properties:
-Right click chart > "Settings" > "Symbol" > Untick "Wicks"