Display TradeList only once


I am trying to add custom metric to trade list. In order to show this custom metric in trade list I need to call bo.ListTrades( ); . But if I do call bo.ListTrades( ); then trade list is displayed twice. How to avoid this?

There must be some mess with my parameters and can not figure out why. It is obvious to me that I must be calling bo.ListTrades( ); twice, but for the life of me I can not find the second occurence of this using search in files etc.

Any hint how to figure this out highly appreciated.

Please read the documentation CAREFULLY

The Users' Guide:

says in Example 3:

The code is basically very similar to example 2. There are only few differences. First is that we call Backtest method with NoTradeList parameter set to 1. This way we disable default trade listing, so we can add custom per-trade metrics and list trades later by calling ListTrades method

Also the other page on custom backtester


says this:

bool Backtest( [optional] bool NoTradeList )

This high-level method performs default portfolio backtest procedure in single call. It should be used if you just need to obtain custom metrics and do not want to change the way backtest is performed. (Version 4.68.0 and above): If optional parameter NoTradeList is set to True, then trade list is not generated automatically. This is useful if you want to add some per-trade metrics. Once you add them, you can generate trade list with your metrics using ListTrades method.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.