Hello,
Just a follow-up: This strategy is entering into a long trade when it should be entering a short trade and a short trade when it should be a long trade.
It is reacting correctly according to your rules, BUT your rule definition is exactly opposite to how a parabolic SAR works.
See previous post.
Regards,
Richard