MA Cross normally uses close as source in the moving averages, this script uses highs and lows as source.
In an uptrend you will see the 20 period high and 50 period low , once they cross, the indicator will switch to 20 period low and 50 period high . This gives it way less fake crosses as you see in the image on BTC .
As i said above, this is just an idea. If you change the settings, they might not cross at all.. so do your own testing.
Hope this code can help someone.