// Definitie van code parameters
DEFPARAM CumulateOrders = False // Opstapelen posities gedeactiveerd
Defparam flatbefore = 000000
Defparam flatafter = 000000
// Condities om long posities te openen
// Settings
once n = 5
once m= 29
// Parameters for the StochasticMomentumIndicator
c1=SMI[14,3,5](close)>40
c11=SMI[14,3,5](close)>-40
// Parameters for the CommodityChannelIndex
c2= CCI[n](typicalPrice)>100
c21=CCI[n](typicalPrice)<-100
//Parameters for the Relative StrenghtIndex
c3=RSI[m](close)>60
c31=RSI[m](close)<40
//Test for each Indicator
if c1 then
ZLS1= 1
elsif c11 then
ZLS1=-1
endif
if c2 then
ZLS2=1
elsif c21 then
ZLS2=-1
endif
If c3 then
ZLS3=1
elsif c31 then
ZLS3=-1
endif
//Summary of the results
TFI = sin(atan(ZLS1+ZLS2+ZLS3))
K1= TFI CROSSES OVER 0
IF k1 THEN
BUY 1 CONTRACT AT market
ENDIF
// Condities om long posities te sluiten
IF TFI crosses under 0 THEN
SELL AT MARKET
ENDIF
// Condities om short posities te openen
k3 = TFI CROSSES UNDER 0
IF k3 THEN
SELLSHORT 1 CONTRACT AT market
ENDIF
// Condities om short posities te sluiten
IF TFI crosses over 0 THEN
EXITSHORT AT MARKET
ENDIF
// Stops en targets
SET STOP ploss 50
SET TARGET pPROFIT 1250