TS code for reversal

Discussion in 'Strategy Development' started by Indie Cator, Oct 4, 2002.

  1. Hi y'all,

    Does anyone know how to code easy language so that it places an order that reverses your position.

    Say I'm short one contract and hit a price where I want to reverse and go short.

    I'm trying to do it with an 'If market position = -1/1 then what??

    how do you reverse or say buy/sell 2 contracts next bar at market??


    for your help


  2. Indie there are four orders. If you are short and want to reverse, just use the term "BUY". To Ts this tells it to cover and buy.
  3. Exactly.... if you wanted to go flat you would use buytocover or sell instead of sell short or buy.
  4. Unless it's changed recently;

    'Buy' and 'Sell' will automatically cover the outstanding short or long position, resp., and enter a new position in the new direction(I've heard it call 'flip the trade').

    'ExitLong' and 'ExitShort' can be used for stops or to go flat.

    Hope this helps.
  5. m_c_a98


    If you don't know this, then I beg you not to attempt to trade off a system you create.