[R-SIG-Finance] TrailingStop chain events in macd.R

stergios marinopoulos stergenator at gmail.com
Mon Aug 4 19:46:19 CEST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20140804/52b32cae/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Macd-TrailingStop-Annotated.jpeg
Type: image/jpeg
Size: 142353 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20140804/52b32cae/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macd.R
Type: application/octet-stream
Size: 6457 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20140804/52b32cae/attachment.obj>


More information about the R-SIG-Finance mailing list