I've just discovered automated trading and have been trying to put a system together on IG's Prorealtime. This one is for US30 on M30 T/F and is simplicity itself.

// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
x=45
y=54
a=40
b=48
// Conditions to enter long positions
indicator1 = ExponentialAverage[x](close)
indicator2 = ExponentialAverage[y](close)
c1 = (indicator1 CROSSES OVER indicator2)

IF c1 THEN
BUY 1 PERPOINT AT MARKET
ENDIF

// Conditions to exit long positions
indicator3 = ExponentialAverage[x](close)
indicator4 = ExponentialAverage[y](close)
c2 = (indicator3 CROSSES UNDER indicator4)