<div dir="ltr">Hi,<div><br><div>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. </div>
<div><img src="cid:ii_13e50e8a1af0a9ff" alt="Inline image 1" width="443" height="41"><br clear="all"><div><br></div><div style>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.</div>
<div style>Any insights? The code in the graph is the only part I changed. </div><div style><br></div><div style>Thanks a lot.</div>-- <br><div dir="ltr"><div><br></div>Sincerely,<div>John Han</div></div>
</div></div></div>