why TS does not support stop limit order

Discussion in 'Retail Brokers' started by robinxing, Apr 25, 2007.

  1. It seems TS is out-dated
     
  2. If you are using TS2000i

    Vars:ONBlimit(false), ONBstop(false), ONBlimit2(false),
    ONBstop2(false), ONBlimitvalue(0), ONBstopvalue(0);

    ONBlimitvalue=High+4 points; {Replace with your own point values}
    ONBstopvalue=High+2 points; {Replace with your own point values}

    ONBlimit= Open of next Bar >= ONBlimitvalue;
    ONBstop= Open of next Bar<= ONBstopvlaue;
    ONBlimit2= Open of next Bar <= ONBlimitvalue;
    ONBstop2= Open of next Bar>= ONBstopvlaue;

    If ONBlimit then buy next bar at ONBlimitvalue limit
    else If ONBstop then buy next bar at ONBstopvlaue stop
    else if ONBlimit2 and ONBstop2 then buy next bar at market;

    --------------------------------------------------

    Above is stop limit order for Buy order, also same for Buytocover
    orders (just replace exit short with the word "buy").

    For short and sell order, everything opposite.
     
  3. and here if you are using Tradestation.8.1

    StopLimitOrder (Function)
    Disclaimer

    The StopLimitOrder function is used to configure and send a limit if touched order using the order entry macro .PlaceOrder. You can call this function directly from your own EasyLanguage code to simplify the formatting and generation of macro orders.

    NOTE Care should be exercised when calling this function as it is intended to send live orders. Confirmations for macro-generated orders can be configured by using the File -> Preferences -> TradeStation Order Entry menu sequence.

    Syntax
    StopLimitOrder(Frequency,Account,Action,SymbolCategory,Symbol,Quantity,Duration,GTDDate,StopPrice,LimitPrice)

    Returns (Integer)
    StopLimitOrder returns 1 if called on a "real-time" tick and if a trade is allowed based on the user input "Frequency". The function returns -1 (negative one) in other cases; for example, if the function is called on an historical bar. If there are errors in the order parameters a runtime error message will be generated and the order will not be placed.

    Parameters
    Name
    Type
    Description

    Frequency
    String
    Sets the number of attempts made

    Account
    String
    Sets the account to be used for this order.

    Action
    String
    Sets the order action (buy, sell, sellshort, cover, etc.).

    SymbolCategory
    String
    Sets the category of trading instrument represented by the symbol.

    Symbol
    String
    Sets the symbol to be used for this order.

    Quantity
    Numeric
    Sets the number of shares, contracts, lots, etc. to be placed for this order

    Duration
    String
    Sets the duration of the order.

    GTDDate
    String
    Sets the date, if appropriate, to be used with the specified duration.

    StopPrice
    Numeric
    Sets the Stop price to be used for this order.

    LimitPrice
    Numeric
    Sets the Limit price to be used for this order.


    Remarks
    The StopLimitOrder function uses the PlaceOrder function to format the order parameters and call the order entry macro. The PlaceOrder function is only intended to be used by this and other designated TradeStation functions.

    This function disables advanced order placement features (All or None, Buy on minus,Sell on plus, etc.).

    See .PlaceOrder command for more information on using the order entry macro for placing orders.

    Example
    Places a sell limit order of 100 shares for MSFT at a limit price of 24.35 using the order entry macro .PlaceOrder. Value1 returns a 1 if the order is valid.

    Value1 = StopLimitOrder("Once","SIM15180","Sell","Stock","MSFT",100,"Day","",24.65,24.35);
     
  4. StopLimitOrder (Function)


    can this one be used in a strategy?
     
  5. TS8 has this order type enabled in both macros and order entry window, you can click them manually or put it in a strategy.
     
  6. it can not be executed in strategy

    what a pity