# NOT RUN {
# 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')
# }
Run the code above in your browser using DataLab