Steigt das System ein und aus im selben Bar? Das konnte es sein. Sonst sehe ich kein Problem.
Mit dem Print Funktion kann mann manchmal sehen, was im Code passiert. System eingeben, dann in Debugger unten bei Power Editor die Ergäbnisse sehen.
Vielleicht dies:
VarsaniDayTrade(0),MP(0); MP = MarketPosition;
if date <> Date[1] then begin DaniDayTrade = 0; counter = 0; {zählt Käufe pro Tag} counter2 = 0; {zählt Verkäufe pro Tag} end;
if DaniDayTrade = 0 then begin if buycondition then begin Print("Buycondition","MP = ",MP,"DaniDayTrade = ",DaniDayTrade,"counter = ",counter); buy; DaniDayTrade = 1; counter = counter + 1; Print("time = ",time,"MP = ",MP,"DaniDayTrade = ",DaniDayTrade,"counter = ",counter); end; if sellcondition then begin Print("Sellcondition","MP = ",MP,"DaniDayTrade = ",DaniDayTrade,"counter2 = ",counter2); sell; counter2 = counter2 + 1; DaniDayTrade = 1; Print("time = ",time,"MP = ",MP,"DaniDayTrade = ",DaniDayTrade,"counter2 = ",counter2); end; end;
grüße,
Jim
|