# example rule definition
## Not run:
# add.rule(strategy.name, 'rulePctEquity',
# arguments=list(rebalance_on='months',
# trade.percent=.02,
# refprice=quote(last(getPrice(mktdata)[paste('::',curIndex,sep='')])[,1]),
# digits=0
# ),
# type='rebalance',
# label='rebalance')
# ## End(Not run)
Run the code above in your browser using DataLab