I think I can shed a little light on what I experienced.  Since I was using
30 minute bars, the transaction price was coming from the next bar, and in
particular the closing price.  When I set ruleSignal() parameter prefer to
prefer='Open', the trailing stop line no longer exhibits the drop.

And so while the open price of the next bar is not guaranteed naturally,
it's much closer in reality to the close of the current bar when compared
to waiting 30 minutes for the end of the next bar.

--
sm
Stergios Marinopoulos


On Mon, Aug 4, 2014 at 10:46 AM, stergios marinopoulos <
stergenator@gmail.com> wrote:

> Hi,
>
> I have been experimenting with trailing stops in quantstrat.  I noticed in
> the order book that ocassionaly a replacement row for the trailing stop
> order chain occurs when no recent high price has been acheived, and appears
> to replaced with a "lower" high price.  I do not think this is suposed to
> occur (but I could be wrong as I do not fully understand the replacement
> rules)
>
> My intuition tells me that a new chaining order in the order book should
> only occur when a new high price has been acheived.
>
> You can see an example of the "lowered" high price in the attached jpg
> file near 4/16/14 and 4/17/14.  I have also attached a modified macd.R I
> used to create this chart.
> (Here's a pdf version of the chart that was too big for the mailing list:
> https://dl.dropboxusercontent.com/u/56008826/Macd-TrailingStop-Annotated.pdf
> )
>
> I would appreicate any comment regarding the lowering high price.
>
> Thank you,
>
> --
> sm
> Stergios Marinopoulos
>
>

	[[alternative HTML version deleted]]

