Hallo Andreas,
so müsste es gehen (ich habe versucht, die Formeln für Sie übersichtlich darzustellen):
Enter Long:
Calc a: DatePart(h) > 10 AND DatePart(h) < 12 AND
Cross(GD(Close,5,S),GD(Close,10,S),1) = 1 ; {für vormittags}
Calc b: DatePart(h) > 15 AND DatePart(h) < 20 AND
Cross(GD(Close,5,S),GD(Close,10,S),1) = 1 ; {für nachmittags}
If(a OR b,1,0) OR DatePart(h) = 10 {das System geht um 10 Uhr automatisch long. Sonst OR DatePart(h) = 10 weglassen}
Exit Long:
0 OR (DatePart(h) >=12 AND DatePart(h) < 15)
Enter Short:
Calc c: DatePart(h) > 10 AND DatePart(h) < 12 AND
Cross(GD(Close,5,S),GD(Close,10,S),1) = - 1; {für vormittags}
Calc d: DatePart(h) > 15 AND DatePart(h) < 20 AND
Cross(GD(Close,5,S),GD(Close,10,S),1) = - 1; {für nachmittags}
If(c OR d,1,0)
Exit Short:
0 OR (DatePart(h) >=12 AND DatePart(h) < 15)
Die gleitenden Durchschnitte (oder alternativ andere Bedingungen) können Sie ja noch für vormittags und nachmittags entsprechend Ihren Vorstellungen abändern.
Viele Grüße
Ulrich Paasche