TS2000i order problem

Discussion in 'Trading Software' started by solar, Nov 8, 2005.

  1. solar


    when you buy 1 contract and sell 1 contract on the same bar, the TS ends up with either 1 long contract or 1 short contract, depending on which order executed first.

    The first order executed without any problem, and then the second order reversed the whole existing position and opened a new position on another direction.

    This is not desired, I want overall zero position change after I have bought and sold 1 contract on the same bar.

    I have not used TS6,7,8. Is this issue solved when TS6 changed the order name to "sellshort" and "Buytocover"?
  2. riddle


    If you want to close a long position, use 'exlitlong', not sell. Likewise to close a short position, use 'exitshort'.
  3. solar


    I have multiple position long and short strategy on the same instrument.

    Sometimes, I need to open one long position, while at the same time open one short position, they just happened on the same bar, so the result is that they cancel each other, but TS's way is to let the last executed order decide the position direction, which caused the problem.
  4. Set flags in the code when Buy or Short conditions are met. If both Buy and Short flags are set simultaneous don't place any order for that bar, otherwise issue Buy or Sell Orders depending upon which flag is set.
  5. solar


    Thanks! That is a work around.