Hi all,
Just wanted to share a version snippet of my money management code from the strategy I posted here:
USDJPY trading strategy – 1minTF – SAR and EMA
The idea is to increase position sizes to a function of Live Equity balance. However, if win or loss streaks (>3) occur, significantly scale up or down position sizing.
Any questions or suggestions welcome!
//MONEY MGT//
Ratio = 1.5
Equity = (Strategyprofit+20000) //20,0000 Yen
Risk = round(Ratio*Equity/100000) //100,000 Yen
Losses = positionperf(1)<0 and positionperf(2)<0 and positionperf(3)<0
streak = positionperf(1)>0 and positionperf(2)>0 and positionperf(3)>0
if losses then
n = max(abs(round(max(3+risk-2,risk-2))),2)
elsif not losses then
n = max(abs(round(max(3+risk,risk))),2)
endif
if streak then
n = max(abs(round(max(5+risk,risk))),2)
endif
//