Thanks. I am certain there’s lots of room for improvement and optimization.
BTW not sure I understood what part was wrong with the %TrailingStop – does it matter in these versions or does it only matter if you use breakeven?
Here is the correct one :
// trailing stop percentage
once trailingstoptype2=1
if trailingstoptype2 then
once trailingpercent = 1
once steppercent = (trailingpercent/10)*1
if onmarket then
trailingstart = tradeprice(1)*(trailingpercent/100)
trailingstep = tradeprice(1)*(steppercent/100)
endif
if not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) then
newsl=0
endif
if longonmarket then
if newsl=0 and close-tradeprice(1)>=trailingstart then
newsl = tradeprice(1)+trailingstep
endif
if newsl>0 and close-newsl>trailingstep then
newsl = newsl+trailingstep
endif
endif
if shortonmarket then
if newsl=0 and tradeprice(1)-close>=trailingstart then
newsl = tradeprice(1)-trailingstep
endif
if newsl>0 and newsl-close>trailingstep then
newsl = newsl-trailingstep
endif
endif
if barindex-tradeindex>1 then
if longonmarket then
if newsl>0 then
sell at newsl stop
endif
if newsl>0 then
if low crosses under newsl then
sell at market
endif
endif
endif
if shortonmarket then
if newsl>0 then
exitshort at newsl stop
endif
if newsl>0 then
if high crosses over newsl then
exitshort at market
endif
endif
endif
endif
endif
Hi Paul, your job is amazing. I’m using your last version (v3p3) on DJ 3minutes: last week really good, but yesterday a big lost with 3 loosing trades , do you think is it normal o is there something to optimize, for bettere performace?
Thank you very much.
hi, trading is like this…go
I’m growing more and more determined that on average it’s safer to turn most strategies off around FED announcements and similar macroeconomic events, regardless of the strategies being supposed to be robust and backtested on many such events, I’ve seen them go bananas too often now and it’s not worth it.
Since I had a profitable version of DJ3-strategy running already I took the risk of running the old one as well as the new ones, both with and without MM this week. Not the best idea I’ve had 😛
I guess it would be a bit too early to say whether it should be optimized differently.
Eh, I did the same…I changed the old one (slow but profitable) with the new one..and looking the past this is really the worst week…not very lucky:-O
PaulParticipant
Master
something to optimize, for bettere performace?
Everything is optimised on the vectorial settings, the stochastic rsi is added on top of that, that’s one way to use to WF.
I’ve been sitting the whole week building different strategies just to get a feel for different indicators. Most have been crap and some has been ok, but nothing special.
Today I got a decent one that needed something else and I thought of the vector in this one. Perfect, could work. Then the money management. Then… all of a sudden, it was almost a copy of it hehe. Oh well, back to square one 🙂
Thank you Paul. I’m testing also DAX 3m Vectorial V3p4 on demo, but it has not the same behavior of backtest: total different trades. It seems that it does not close the positions, for example I’ve set weekendpostion=0 but Friday the script does not close the position. Could you help me? Maybe a new version? Thank you again for the great work.
Maybe check your time zone, any problem GMT+2, the code (DAX 3m Vectorial V3p4) is clear :
if not weekendposition then
if (dayofweek=5 and time>=215400) then
exitshort at market
sell at market
endif
endif
Even on backtest, every trades close before the week-end at 21h54min, if weekposition = 0
With backtest works well, but in demo mode total different trades. Where can I check time zone? Thanks
Where can I check time zone?
See red arrowhead on attached
PaulParticipant
Master
@danistuta hope that fixed your problem!
PaulParticipant
Master
I had a short version too and it won also. Not so nice chart so I never realised it. Anybody created a short version?
Hi Paul, time zone was oky, I can’t understand why DJ script works good and DAX version does not close positions in the right way and totally different from backtest:-(
PaulParticipant
Master
I haven’t been running that one. & will check it too