Problem in giving stoporders in EL coding

Discussion in 'Strategy Building' started by Rajatheroyal, Jul 28, 2009.

  1. 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.
     
  2. thanks.But if i move the end line then it will only execute the next bar , but i want it to be executed throughout the day when that high or low is crossed.:(
     
  3. HI guys now its working.I just gave
    time>1000 and time < 1530{start and end time of our market}
    before giving orders:p