EasyLanguage question: entry and stop on same bar?

Discussion in 'Trading Software' started by 1.6180340, Mar 25, 2007.

  1. Hi,

    I have the following question about EasyLanguage (TS2000i):

    If I place a buy stop and/or a sell stop together with a stoploss, it can happen that for example the buy stop is executed and stopped out on the same bar, or even a buy stop is executed, stopped out and then a sell stop is executed and stopped out all within the same bar.

    How can I know within a strategy if these trades ever occurred? The parameter 'MarketPosition' will be zero before and after this bar. I could check if the parameter 'TotalTrades' has changed (if it is higher there must have been a trade), but then I still don't know if it was a long- or a short trade. This kind of info should be available within TS because the trades are also reported in the Strategy Performance Report so this information is available somewhere in TS. But I don't know how to get this information into my strategy so that I can use it.

    I hope any of you knows how to deal with this. It should be a common problem