// Festlegen der Code-Parameter
DEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert
defparam flatafter = 173000
// Verhindert das Trading an bestimmten Wochentagen
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
ONCE TradeLong = 1
ONCE TradeShort = 1
IF IntraDayBarIndex = 0 THEN
TradeLong = 1
TradeShort = 1
ENDIF
// Bedingungen zum Einstieg in Long-Positionen
indicator1 = (DHigh(1) + DLow(1) + DClose(1))/3
c1 = (close > indicator1)
IF time = 085500 and c1 THEN
EntryPrice = close + 50 * pipsize
ENDIF
IF not onmarket and time >= 090000 AND time <= 170000 and not daysforbiddenentry and tradelong THEN
BUY 1 CONTRACT AT EntryPrice limit
tradelong = 0
ENDIF
// Bedingungen zum Einstieg in Short-Positionen
indicator2 = (DHigh(1) + DLow(1) + DClose(1))/3
c2 = (close < indicator2)
IF time = 085500 and c2 THEN
EntryPrice = close - 50 * pipsize
ENDIF
IF not onmarket and time >= 090000 AND time <= 170000 and not daysforbiddenentry and tradeshort THEN
sellshort 1 CONTRACT AT EntryPrice limit
tradeshort = 0
ENDIF
SET TARGET pPROFIT 60
SET STOP pLOSS 20