let me first mention that I am really thrilled about the things I can do with the MultiCharts Portfolio Trader. It seems there is virtually nothing that can be done with Portfolio Trader - but I am stuck with a problem that seems more effort to solve than it needs to be. Unless I am missing a better way to do this, this is probably a feature request.
Here is what I would like to do:
* add some (maybe 200) instruments to the portfolio strategy
* add some signals (e.g. your readily supplied ones) to the strategy
* create my own money-management signal, which will be basing decisions on the individual instrument strategies
In order for this to work properly, I would need to report the trading performance of the individual instruments to the money-management _prior_ to enabling/ disabling/ resizing orders in the money-manager.
I have tried to set up a 'reporter signal' which reports the performance to the money-manager:
Code: Select all
variable: PortfolioValue(100);
variable: LastPosition(1);
while(LastPosition < MaxPositionsAgo) begin
var: bars_ago(0); bars_ago = MaxPositionsAgo - LastPosition;
var: myEntry (0); myEntry = EntryPrice(bars_ago);
var: myExit (0); myExit = ExitPrice (bars_ago);
PortfolioValue *= myExit / myEntry;
LastPosition += 1;
end;
if GetAppInfo(aiIsPortfolioMode) = 1 then pmm_set_my_named_num("PortfolioReporter-Value", PortfolioValue);
What I am looking for is a call like this:
Code: Select all
pmms_get_strategy_current_value(strategy_index);
I could then do something like this in my money manager code:
Code: Select all
value[strategy_index] = pmms_get_strategy_current_value(strategy_index);
performance[strategy_index] = value[strategy_index][0] / value[strategy_index][60];
There is a similar problem for resizing positions. Your PortfolioRankSignalBase code currently reports the stock price to the money manager using a named num. It would be much cleaner if the money-manager could retrieve some information on potential entry costs for positions and resize based on that.
Looking forward to your feedback and thoughts!
Thank you,
best regards, Felix