Please tell me how to trade GOLD with EA.

 
I am new to mql5 and I'm trying to trade GOLD.
I tested some sample EA but it doesn't execute any buy or sell positions. 
I tested with MA and MACD code made by MQL5 wizard.
It works at currencies but it doesn't work at GOLD.

It doesn't execute any trade because of [Invalid stops] error.


I'm using XMtrading.
I can trade GOLD with some simple sample code using CTrade.

But the sample code generated by MQL5 wizard, which is using CExpert didn't work.

Please tell me what should I do?