PaulParticipant
Master
hi nonetheless
I was curious how your code with reentry would perform. Didn’t optimise. Uses latest atr be/ts stops from vectorial dax.
This is very interesting, maybe could be worth apply the reentry also on the dax version. I’ll make some tests
how your code with reentry would perform
Thanks very much for that, not something I would have thought to do. I’ll have a closer look at it tomorrow. And as Francesco says, could also apply to the DAX which has really been the best performer in recent months.
PaulParticipant
Master
works for the dax too I think. How did your tests go Francesco?
Optimisation gets an improvement but not quite up to the original. This is odd because the ATR trail works better almost everywhere else I’ve tried it, and the reenter should help. I tried a compromise of conventional break even with ATR trail but was worse. Attached image is with these values/changes:
//if dayofweek<5 then
ctime= hour>1
//elsif dayofweek=5 then
//ctime= hour>1 and hour<t2
//endif
// breakeven stop atr
once breakevenstoptype = 1 // breakeven stop - 0 off, 1 on
once beatrperiod = 10 // atr parameter value
once beminstop = 12 // minimum breakeven stop distance
once bepointsorperct= 1 //[0]percentage [1]points
if tradetype=1 then
once bestoplong = 5 // ts atr distance
once bestopshort = 5 // ts atr distance
bepointstokeep = 3 //-(sl/2) // positive or negative //not use once
once trailingstoptype = 1 // trailing stop - 0 off, 1 on
once tsatrperiod = 10 // ts atr parameter
once tsminstop = 12 // ts minimum stop distance
if tradetype=1 then
once tsincrements = .25 // set to 0 to ignore tsincrements
once tsminatrdist = 1
once tssensitivity = 0 // [0]close;[1]high/low
elsif (tradetype=2 or tradetype=3) then
once tsincrements = .25 // set to 0 to ignore tsincrements
once tsminatrdist = 1
once tssensitivity = 1 // [0]close;[1]high/low
endif
if trailingstoptype then
if barindex=tradeindex then
if tradetype=1 then
trailingstoplong = 8 // ts atr distance
trailingstopshort = 8 // ts atr distance
elsif (tradetype=2 or tradetype=3) then
trailingstoplong = 6 // ts atr distance
trailingstopshort = 6 // ts atr distance
endif
Any other changes worth trying? Fifi’s pivots are inactive i think but I’m not sure how to bring them into play
works for the dax too I think. How did your tests go Francesco?
I’m going to take a break at the sea this weekend, i’ll put my hands on it next week 🙂
Just a question,, Are you keeping the bots open or closing all positions before weekend?
I leave positions open over the weekend. I know that lots of people close everything friday evening for fear of an adverse gap when they open again, but my tests tend to show its better to let them run. Over a length of time it’s just as likely to gap in your favour.
I close everything before the weekend . Maybe not as effective but i like to be “free”over the weekend no matter what goes on in the world
I like to clear my mind and start new every week .
PaulParticipant
Master
Any other changes worth trying?
not really a.t.m. The goal of reentry is to see quickly how stable the strategy is and it looks pretty good!
I think I misunderstood, is reentry a test rather than a part of the strategy? Something like vrt?
PaulParticipant
Master
yes a bit
often when in a position and the same entryconditions are true again, you don’t act on those. The bigger the exit criteria are (i.e. sl/pt/ts) the more signals you could have in the same direction and it’s those signals i’am interested in .
If taken version dow 1p short, set tradetype at 3, reenter at 1 and positionperftype at 0,1 or 2. Equitycurve & stats looks impressive & solid!
for long only it shows that signals are not as good as the shorts. Here is a bigger difference depending on positionperftype for the equitycurve & stats.
With reentry, the new entry is likely to have a worse price & there are extra spread costs, which makes it the more impressive if the equity curve can hold up.
I see it as an extra tool to create more robust parameters with optimisation and is something to experiment with.
PaulParticipant
Master
at the bottom of the dow version you can add this
if ctime then
if (tradetype=1 or tradetype=2) and condbuy then
buysignal=1
else
buysignal=0
endif
if (tradetype=1 or tradetype=3) and condsell then
sellsignal=-1
else
sellsignal=0
endif
endif
graph buysignal coloured(121,141,35,255)
graph sellsignal coloured(255,0,0,255)
Hey, thanks for the vote of confidence. TBH I’m amazed that it works at all, but so far not too bad. Reentry is an interesting tool, I haven’t had time to play around with it yet.