traderami,
First, it is not metastock. It is metatrader. They are miles apart from one another.
second, look up at any forex based forums and you will find MQ4 file.
which you can compile into ex4 for execution.
if you want to do this in ami, you will still need mq4 from which you can manually create afl.