Hey there,
I have again some problems with the system. In backtest/demo it switched from 5 long to 1 short on thursday. In live account it only closed the 5 long but didn’t start the short trade. The problem seems to be the same like a few weeks ago with the “limited risk” account (no opposite trades possible) so the changes seem not to work.
Yesterday the system opened 3 long contracts in backtest/demo but in live account niothing happened (also no denied orders). This is a new problem. So where is the difference between live and demo?
rebParticipant
Master
Hallo Wisko
I use the strat in live on DAX and I had +5 closed and -1 opened
Now i have +3 opened at 12231
Hey reb and rejo,
thanks for feedback. Seems to be a special german problem. :-/
rebParticipant
Master
Hello could you confirm the position you have open on Dax strat ?
Live I have +3 and on backtest 6 (?)
Thanks
rebParticipant
Master
ok thanks guys
I will check what sort of pbm happened
EricParticipant
Master
+3
12 069 on demo
but the strange thing is that the system has stopped because of a preloadbar issue (not enough historical data) and the position is still open (and i have set the option to close if the system is stopped)
i suppose this is a demo problem? because i have never had this problem when running prorder live
an idea that comes to me. why, on election weekend, do not open a long position and a short with stop guaranteed very close to the close on Friday. in order to enjoy a potential gap. opinions?
Sorry, it’s not the good place on forum to post this.
rebParticipant
Master
Hello,
I have understood where the issue was, thks
But I discovered a bug too. The strat is well adapted for someone who has 10k capital and uses 1 mini contract.
But if you want to increase positionsize from 1 to 1.5 or 5, it won’t multiply your P&L by the multiplicator factor and remain at the same level!!
Instead of the code given by Reiner :
// define position and money management parameter
ONCE positionSize = 1
ONCE maxDynamicPositionSize = 2 // >1 with dynamic position sizing; 1 without
ONCE maxPositionSizeLong = 10
ONCE maxPositionSizeShort = 10
// dynamic position sizing based on weekly performance
ONCE profitLastWeek = 0
if DayOfWeek <> DayOfWeek[1] and DayOfWeek = 1 then
if strategyProfit > profitLastWeek + 1 then
positionSize = min(maxDynamicPositionSize, positionSize + 1) // increase risk
else
positionSize = max(1, positionSize-1) // decrease risk
endif
profitLastWeek = strategyProfit
endif
I would propose this solution
// define position and money management parameter
ONCE positionSize = 1 // default start size
ONCE trendMultiplier = 2*positionsize // >1 with dynamic position sizing; 1 without
ONCE maxPositionSizeLong = 10*positionsize // maximu size for a long position
ONCE maxPositionSizeShort = 10*positionsize // maximum size for a short position
// dynamic position sizing based on weekly performance
ONCE profitLastWeek = 0
IF DayOfWeek <> DayOfWeek[1] and DayOfWeek = 1 THEN
IF StrategyProfit > profitLastWeek + 1 THEN
positionSize = min(trendMultiplier, positionSize + 1) // increase risk
ELSE
positionSize = max(positionsize*1, positionSize - 1) // decrease risk
ENDIF
profitLastWeek = strategyProfit
ENDIF
as attachments, you find Reiner’s code with positionsize=1, Reiner’s code with positionsize=5, and my proposal with positionsize=5
it will be more effective when we ‘ll be rich :-)))
what do you think to add to the strategy, the possibility to cut positions on Friday night and resume on Monday at 0h to avoid the gap?