Thanks! I tried also to enter limit orders and had to enter 9500<priceOpen(0) in the if statement as well, otherwise it opened too many trades again.
Still one issue remained that why not enterred buy trade 1 bar before (e.g. the bearish long candle piercing through level 9500)?
function run()
{
StartDate = 20151001;
EndDate = 20151005;
LookBack = 105;
static var BuyLimit,SellLimit;
EntryTime = 50;
ExitTime = 2;
set(PARAMETERS+TICKS);
if(!NumOpenLong && !NumPendingLong && priceClose(0)<9500 && 9500 < priceOpen(0)) //
{
enterLong(1,9500);
}
}
