how to modify Price on a limit order in Tradestation Easylenguaje?

Discussion in 'App Development' started by piyayo, May 11, 2012.

  1. piyayo

    piyayo

    I would appreciate any help, please:

    Programming an strategy, I want to send a limit order at open price plus a few pips in forex.

    I program:

    Vars: Entry (0);
    Entry = (Open + 0.00005)

    Condition1 = .....................................................

    if Condition1 then
    SellShort x Contract next bar at (open+ 0.00005) limit;

    How should I programm it??, to send an order next bar at open, but adding a few more pips to the open price.

    I want to add 5 forex pips for example.

    Many thanks.
     
  2. Depending on the settings, for as long as condition1 is true you don't have to change anything.

    If the condition is only for that bar, ask TS to code a flag that'll allow the order to remain active until the final tick of the bar, then wait for condition1 again.

    This strategy since it is using limit orders won't work, by the way.

    Your strategy testing in TS will never be able to identify bids or asks, and just because price trades through, don't assume that necessarily means that your order will be filled. That assumption is valid for stops only.