Problem in giving stoporders in EL coding

rajatheroyal

Junior member
Messages
12
Likes
0
Hi i guys, in easy language if i give a stop order for intraday then it gets filled the next day if its not achieved that day.How to solve this problem?
I mean if i give order like

vars:hi(0),lo(0);

if time=1000 then{calculating high and low of the 10 am bar}
hi=high;
lo=low;
end;
buy next bar at hi stop;{placing orders to buy at high stop}
sellshort next bar at low stop;{placing orders to buy at low}


in this code the problem is that the orders get filled even on the next day and i dont want that.I want just the order to be filled that day itself if not then all orders should be cancelled.
how to do can anybody help pls.:?:
 
Top