Discussing the strategy VECTORIAL DAX (M5)
09/21/2020 at 10:08 AM #14486609/21/2020 at 12:14 PM #144880
This has confused me too and I just figured it was allright since it looked OK in backtests…. do I need to change anything here? I’m in Norway. GMT+2, also, does daylight savings affect this?09/21/2020 at 2:39 PM #14490009/21/2020 at 4:13 PM #14490609/21/2020 at 6:52 PM #14491009/22/2020 at 5:11 PM #144997
I don’t understand why the system change from Long to Short with Reenter = 0 and Trailing Stop not triggered.
In the screenshot below i have Reenter = 0 , trade in max gain of 0.42% so trailing stop not enclenched (0.5%) , but the trade switched from Long to Short. Wich part of the code provocate it ? Can someone help ?09/22/2020 at 5:34 PM #145001
Hi, the switch from long to short is defined with this. Set to 1, it trades long & short.1once tradetype = 1 // long/short long short
re-enter means if having a long position and there’s another buy signal, the current long is closed and a new long is openend which reset the ts/sl etc.
re-enter has no influence going from long to short or visa versa.
1 user thanked author for this post.09/22/2020 at 5:50 PM #145006
Thanks Paul, so, you are explaining me that this part :123456if (tradetype=1 or tradetype=3) thenif condsell and not shortonmarket thensellshort positionsize contract at marketif tradetype=1 thenset stop %loss slsset target %profit pts
Make us sell our long position at market before sellshort? Even if there isn’t the instruction to ? Don’t need something like “if condsell and longonmarket then…” before ?09/22/2020 at 6:19 PM #145008
if you have tradetype=1, which means you can trade long & short.
If you are long and have a sell signal, it closes the long position to open a short position. That there is not shortonmarket is correct in my view.
But if you had longonmarket as you say it would be wrong.
What would happen if there’s no market position and you get a sell signal. If it’s written like you suggest no short in opened.
1 user thanked author for this post.09/22/2020 at 6:39 PM #14501009/22/2020 at 6:43 PM #145011
I like the idéa of switching but according to the switching I have seen it has been triggered to late.
I cannot see how to make the switching earlier without decreasing the SL, it is possible with less then adding a lot of code ?09/23/2020 at 12:40 AM #145025
Well if you want earlier switching that could happen by adjusting pente a little, tradeoff is more poor ?signals.
For the nice equitycurve 1% ts was used, however in general I prefer 1/3 of the stoploss of 1 or 1.5%. I did update the ts percentage, so it could use separate % for long en short. Als a switch to see the difference when using close, highlow or lowhigh. Fast meaningfull profittaking is good. Something for later.09/23/2020 at 5:04 PM #14509509/23/2020 at 5:19 PM #14509609/23/2020 at 5:23 PM #145099