Hi all !
Months ago i found this “mm” snippet on this precious forum.
Q: I had to stop the strategy to tweack this last one a bit…
Then, I put it back on live but the balance was gone, like back to square 1.
Any ideas anyone may have to solve this problem ?
I do deeply understand that it may be the “happy hour” for some of you so no rush, CHEERS !
Thx.
once startpositionsize=1
once positionsize=startpositionsize
once flatoverweekends=1
once startequity=0
once Reinvest=1
if reinvest then
//------------ Fixed fraction money management ----------
once multiplier=1
once delta=200 // < == THROTTLE
once fraction=delta*pipvalue
once newlevel=delta*pipvalue
once oldlevel=delta*pipvalue
if strategyprofit+startequity>newlevel then
multiplier=multiplier+1
oldlevel=newlevel
newlevel=strategyprofit+startequity+multiplier*fraction
positionsize=multiplier*startpositionsize
elsif strategyprofit+startequity<oldlevel and multiplier>=2 then
newlevel=strategyprofit+startequity
oldlevel=strategyprofit+startequity-multiplier*fraction
multiplier=multiplier-1
positionsize=multiplier*startpositionsize
endif
Endif
if flatoverweekends then
//--------------- daylight-saving corrections ------------------
if currentmonth=3 and day>=15 then
dlc=10000
elsif currentmonth=11 and day<8 then
dlc=10000
else
dlc=0
endif
fridaynight=(currentdayofweek=5 and time>=(223000-dlc))
else
fridaynight=0
endif
if fridaynight then
if longonmarket then
sell at market
elsif shortonmarket then
exitshort at market
endif
endif
Change the “startequity” variable with the profit already made by the strategy.
Thank you for your swift answer Nicolas (as usual)! Much appreciated 😉