Description Usage Arguments Details See Also Examples
This rule works with
applyStrategy.rebalancing
to set the maximum
trade size by calling addPosLimit
.
1 2 |
trade.percent |
max percentage of equity to allow the strategy to trade in this symbol |
longlevels |
numeric number of levels |
shortlevels |
numeric number of short levels, default longlevels |
digits |
if not NULL(the default), will call
|
refprice |
if not NULL(the default), will divide the calculated tra |
portfolio |
text name of the portfolio to place orders in, typically set automatically |
symbol |
identifier of the instrument to cancel orders for, typically set automatically |
timestamp |
timestamp coercible to POSIXct that will be the time the order will be inserted on, typically set automatically |
... |
any other passthrough parameters |
To use it, you need to specify it as (part of) a rule of
type 'rebalance'. note that
applyStrategy.rebalancing
will expect a
'rebalance_on' argument to be included in the
arguments=list(...)
of the rule definition.
osMaxPos
,
applyStrategy.rebalancing
,
addPosLimit
, add.rule
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.