Hallo Trader
Wie programmiere ich dass z.B. nach 3 aufeinanderfolgenden Verlusttrades die Kontrakte um -1 reduziert werden? Aber nach z.B. 6 aufeinanderfolgenden Verlustrades um +1 Kontrakt erhöht wird?
Grüsse Skubi
WingParticipant
Veteran
once PositionSize = 7
once NewTrade=0
If NewTrade=1 and PositionPerf(1)<0 and PositionPerf(1)<0 and PositionPerf(3)<0 and PositionPerf(4)<0 and PositionPerf(5)<0 and PositionPerf(6)<0 then
PositionSize= PositionSize+1
NewTrade=0
elsif NewTrade=1 and PositionPerf(1)<0 and PositionPerf(1)<0 and PositionPerf(3)<0 then
PositionSize = PositionSize-1
NewTrade=0
else
endif
// Buy/sellshort code
If BuyConditions=1
Buy Positionsize lot at market
NewTrade=1
endif
WingParticipant
Veteran
Oder:
once StandardPosition= 7
once PositionSize = StandardPosition
once NewTrade=0
once change=0
If newtrade=0 and change=0 then
positionsize=7
elsif NewTrade=1 and PositionPerf(1)<0 and PositionPerf(2)<0 and PositionPerf(3)<0 and PositionPerf(4)<0 and PositionPerf(5)<0 and PositionPerf(6)<0 then
PositionSize= PositionSize+1
NewTrade=0
change=1
elsif NewTrade=1 and PositionPerf(1)<0 and PositionPerf(2)<0 and PositionPerf(3)<0 then
PositionSize = PositionSize-1
NewTrade=0
change=1
else
endif
If PositionSize=0 then
Positionsize=1
endif
if positionperf(1)>0 then
PositionSize=StandardPosition
endif
// Buy/sellshort code
If BuyConditions then
Buy PositionSize lot at market
NewTrade=1
change=0
endif