Testing values vs account values

Questions about MultiCharts .NET and user contributed studies.
Talky_Zebra
Posts: 52
Joined: Mar 07 2024
Has thanked: 16 times
Been thanked: 1 time

Jun 09 2024

I would like to do a couple of things in my signals, and I am not finding examples to guide me. I'd like to:
- create a position sizing mechanism, using a variation of the Kelly Criterion, which uses pct win, loss, account size, etc
- create an account equity auto stop, for when all hope is lost

I am not looking for code examples of the Kelly Criterion or account equity stops. I am looking how to get the account information and use it for the account testing process.

Using TradeManager functions, I can get some account info, for instance, balance and equity. This is the actual account info (in my case a demo account), and does not reflect how the strategy performed in testing when applied to a chart. Such as:

Code: Select all

TradeManager.TradingData.Accounts.Items[0].Equity
But, during testing, this is not modified during the testing process, so I during backtest it cannot utilize the equity stop with this code.

How can I get this information during the testing process? The documentation is a bit confusing on the matter.