FX HMA calculation