Specifies deposits and/or withdarawals to/from the current equity of a strategy
Formula expression returning an amount in dollars
This formula is evaluated once per day per strategy at the beginning of the day, before any trading signals are processed. The resulting amount is added to the "closed trade equity" of that strategy. Therefore, the formula should return a positive value for deposits or a negative value for withdrawals, and on most days will return 0.
For a multi-strategy system that uses Combined(S.Equity) as its Allocation, only one strategy should include a CashInOut formula, since they're all using a shared equity pool anyhow. You might even want to define a separate strategy (perhaps called "Cash") just for this purpose.
1. Withdraw $10,000 every month at the start of the month:
2. Withdraw half of last year's net profit at the start of each year:
3. Deposit or withdraw specific amounts on specific dates (useful with import trades for tracking actual results):
Note that in this last example, the dates specified must be dates when the market was open, i.e., dates that correspond to a bar date in the test's bar size. The transaction is then processed before the open of that bar.