Money management snippet
- This topic has 2 replies, 2 voices, and was last updated 6 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
Similar topics:
Forums › ProRealTime forum Français › Support ProOrder › Money management snippet
Tagged: money management, position size
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
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 |
Find exclusive trading pro-tools on