[R-SIG-Finance] Need help getting stop-loss and take-profit orders to work with indicators

Mark Knecht markknecht at gmail.com
Wed Aug 6 00:40:31 CEST 2014


On Tue, Aug 5, 2014 at 2:58 PM, Ilya Kipnis <ilya.kipnis at gmail.com> wrote:
> Okay, so my issue is that I'm trying to debunk a trading system I found
> online, and it involves using an indicator for a stop-loss and a
> take-profit type of order. I based my syntax on the luxor demo, aside from
> using an order.price argument, but I'm not sure of how to make the exact
> syntax work.
>
> Here's a minimum reproducible example.

The email was apparently sent as HTML, got wrapped and the commented
out sections are causing problems.

There also seems to be a missing comma in the add.rule(strategy.st,
name="ruleSignal" are at the end of the order.price line.

I suggest you try cleaning those code issue up  - shorten the lines so
they don't wrap, and sending the clean code in text mode.

Good luck,
Mark



More information about the R-SIG-Finance mailing list