Profile Picture

Trailing Stop Loss for positions with negative price

Posted By jbx1 4 Years Ago
Posted Friday May 30 2014

I have a problem with my trailing stop losses not being registered/proccessed for positions with negative prices. I have negative prices when using back-adjusted futures continuations, e.g. Gasoline for the whole 90's.

When opening long position on symbol that has negative price, I set TrailingStopType to RelativePrice and TrailingStop to some positive number. However, in the OrderFilled event, the corresponding Trailing Stop Loss order has value of 0.0. In addition, 0 is probably interpreted as null, as the position is not stopped out even when the price crosses zero few years later. Interestingly, when the prices are then in positive territory, it gets stopped after first correction of size of the initially set stop loss value.

I haven't found this issue in forums, but on some other thread I've read that setting negative stop loss causes using the default stop loss (which is 0 in my case). Although I haven't set negative stop loss, I can imagine the application converts it to negative in this case when I have negative price.

So my question is how can I use trailing stop losses on series with negative prices?

Many thanks,

Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems