Skip to content
Prev 11551 / 15274 Next

Issues about "maCross" demo in Quantstrat

Hi,

I ran the demo "maCross" successfully in R. When I enable the commented
code, it works also OK and I suppose to get both long and short position
happening in the backtesting result.
[image: Inline image 1]

However, I can only see either long or short and never happen at the same
time. It seems like that the "exit" and new "entry" can not be at the same
day.
Any insights? The code in the graph is the only part I changed.

Thanks a lot.