// Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Conditions to enter long positions indicator1 = Average[20](close) indicator2 = Average[50](close) c1 = (indicator1 CROSSES OVER indicator2) IF c1 THEN BUY 1 CONTRACT AT MARKET ENDIF // Conditions to enter short positions indicator3 = Average[20](close) indicator4 = Average[50](close) c2 = (indicator3 CROSSES UNDER indicator4) IF c2 THEN SELLSHORT 1 CONTRACT AT MARKET ENDIF // Stops and targets SET STOP pLOSS 15 pTRAILING 15 // Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Conditions to enter long positions indicator1 = Average[20](close) indicator2 = Average[50](close) c1 = (indicator1 CROSSES OVER indicator2) IF c1 THEN BUY 1 CONTRACT AT MARKET ENDIF // Conditions to enter short positions indicator3 = Average[20](close) indicator4 = Average[50](close) c2 = (indicator3 CROSSES UNDER indicator4) IF c2 THEN SELLSHORT 1 CONTRACT AT MARKET ENDIF // Stops and targets SET STOP pLOSS 8 pTRAILING 8