I am trying to create a fee instead of a commission. The fee would be an annual fee as a percentage of equity and be reflected in the equity. I have attempted to use the custom backtest for this. The following works, but I am only generating the fee when in cash. bo.equity is read only so how can I accrue this fee when not in cash?
Daily Fee = (1-.01)^(1/252);
for (bar=0; bar < BarCount; ++bar)
{
bo.Cash *= Dailyfee;
}