Hi AndrewAMD,
Thank you so much for your reply. Script is as simple as the following. The problem is, I would expect a trade to be entered once PSAR flips above price, or flips below. However, whenever I start the script, a trade is entered. So I assume the first bar Zorro reads is either above or below PSAR, so that's why Zorro does a trade?
function tradereversetrend()
{
TimeFrame = 1;
vars Price = series(priceClose());
vars parasar = series(SAR(0.02,0.02,0.2));
if (ATR(5)>0.75){
if(crossOver(Price,parasar))
enterLong();
if(crossUnder(Price,parasar))
enterShort();
}
}