First of all, thank you for creating this script. However I am also seeing the same issue. I can see that the 20 seems to really be a DEMA, but the 50 is slightly different than a 50 DEMA.
You said that instead of being based on price, it is using the 20 DEMA to calculate. But when you calculate a 50 DEMA using 20 DEMA as the source it is much much slower moving than the 50 DEMA you use.
Can you please double check what it's using? Or explain a little deeper? I would be very grateful