'doesn't seem to work' is't a clear explanation of your problem.

After you define the ADX18 you need to include a trade condition.