EL Code doubt

Discussion in 'Strategy Development' started by Rajatheroyal, Jul 16, 2009.

  1. Hi i am a newbie in coding.I want to test a simple strategy :

    buy if this bar crosses the high of last bar high
    sell short if this bar low crosses the last bar low

    but my doubt is how to give order that it buys few ticks above the last bar high and sell few ticks below last bar low.

    The order is executing only on the closing price of the bar or the next bar at open.

    how to solve this problem?
  2. lynx


    It's been a while since I wrote any serious easy language code, so I hope someone else will jump in with more details.

    EL strategies are only checked once per bar, which is why you only get executions at the close/open.

    What you need is called "Intrabar order generation" which will cause your strategy to be checked on every tick.

    Here's a good starting place:

  3. thank you lynx.I have read that pdf but solution to my problem is nothere.Can u explain how to use "intrabarordergeneration"reserve word?
  4. lynx


    Sorry that's about all I can remember right now.