Hi,
So, ive been playing around with different types of script in purpose to get mor exeperienced in programming. Right now, im doing this following script when I saw a problem occured:
function run ()
{
StartDate = 20110601;
EndDate = 20130120;
BarPeriod = 1440;
Stop = 50*PIP;
Trail = 40*PIP;
TrailLock = 1;
vars day_low = series(priceLow());
vars day_high = series(priceHigh());
vars day_close = series(priceClose());
vars EMA50 = series(EMA(day_close, 50));
if (day_close[0] < day_low[1] && day_close[0] < EMA50[1])
enterShort();
plot ("EMA50", EMA50[0], 0, RED);
}
It looks like it "jumps over" some trades, where (as i can see) it should've executed a trade since all conditions where true. Look at following link where I marked to see what I mean.
http://postimage.org/image/kp13ttrmz/Can someone explain why this is happening?
Thanks
Beerz