Skip to content
Prev 9541 / 15274 Next

Writing sell rules with quantstrat

Brian,

I think this has to do with the fact that stop-limit order triggers
whenever the price is below the threshold. In other words, if I buy
shares for 30 and set a stop-limit order at 50 the stop-limit order
will trigger next day because the price is already below 50. It seems
that the stop-limit in its current implementation is not designed for
the case of gains. Instead, it works only for losses. When I set
threshold to say 0.9 (10% loss) I see that it behaves as expected and
the order is executed only when the price goes down 10%.

/Sergey
On Wed, Feb 15, 2012 at 9:30 AM, Sergey Pisarenko <drseergio at gmail.com> wrote: