Can you please explain me how your Money management strategy works Elsborgtrading?
like risk= ? and how account works?
if it looses 3 in a row it will buy 5 contracts right ?
and if I change the
Risk = min(round(Ratio*Equity/100000)*1,MaxPositionA) from 100000 to lets say 100 I get a insane profit that I dont really understand since when I check the
orderlist it goes from lets say 5 and 10 contracts and then suddenly to 1000 contracts if I change
MaxPositionA=100 to 1000.
As I understand I tought it would go from lest say 5 contracts to 10 to 20 ect. depending on your account size. but with me it jumps really fast.
Better understanding if I just put my code up here:
//————————————————————————-
// Main code : MySystem(95)
//————————————————————————-
//————————————————————————-
// Main code : MySystem(65)
//————————————————————————-
//————————————————————————-
// Main code : MySystem(62)
//————————————————————————-
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
//defparam flatbefore = 230000
//defparam flatafter = 065500
//MGT
MaxPositionA=1000
Account=1000
Ratio=1
Equity = (Strategyprofit+account)
Risk = min(round(Ratio*Equity/100)*1,MaxPositionA)
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
PositionSize = max(abs(round(max(2+risk-2,risk-2))),2)
elsif not losses then
PositionSize = max(abs(round(max(2+risk,risk))),2)
Endif
if streak then
PositionSize = max(abs(round(max(5+risk,risk))),2)
Endif
// Conditions to enter long positions
indicator1 = TimeSeriesAverage[29](close)
indicator2 = WilderAverage[66](close)
c1 = (indicator1 >= indicator2)
indicator3 = SMI[9,6,14](close)
c2 = (indicator3 CROSSES OVER -44)
IF c1 AND c2 THEN
BUY PositionSize CONTRACT AT MARKET
ENDIF
// Conditions to enter short positions
indicator4 = TimeSeriesAverage[10](close)
indicator5 = WilderAverage[86](close)
c3 = (indicator4 <= indicator5)
indicator6 = SMI[6,1,16](close)
c4 = (indicator6 >= 45)
IF c3 AND c4 THEN
SELLSHORT PositionSize CONTRACT AT MARKET
ENDIF
//************************************************************************
//trailing stop function
trailingstart = 34 //trailing will start @trailinstart points profit
trailingstep = 1 //trailing step to move the “stoploss”
//reset the stoploss value
IF NOT ONMARKET THEN
newSL=0
ENDIF
//manage long positions
IF LONGONMARKET THEN
//first move (breakeven)
IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
newSL = tradeprice(1)+trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
newSL = newSL+trailingstep*pipsize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
newSL = tradeprice(1)-trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
newSL = newSL-trailingstep*pipsize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL>0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
//************************************************************************
SET STOP ploss 78//78
SET TARGET pPROFIT 136//98