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.
-- 

Sincerely,
John Han

<<image.png>>

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to