Page 1 of 1

Portfolio_Trader_Strategy_Examples Doubts

Posted: Oct 01 2014
by strelow
Hello Fórum.

I have some doubts about this example (RANK STRATEGY):

https://www.multicharts.com/trading-sof ... y_Examples

I tryied to run this example and have msg "Portfolio Rank Signal Base needs datastream"

this code below is possible?

inputs:
BasedOnData(2),
Formula(Indicator:"Formula" plot1); ?

Can I use external Indicator to do this ? instead of Formula( (close - close[1]) / close ), ?

I have problem to index each instrument.Every time comes the same value.

What the meaning of "BasedOnData(2)"?

thanks for the support.

Re: Portfolio_Trader_Strategy_Examples Doubts

Posted: Oct 02 2014
by Henry MultiСharts
Hello strelow,

"Portfolio Rank Signal Base needs datastream" message means that the data series specified in "BasedOnData" input does not exist. If you have one data series in your portfolio (Data1 column) then you need to specify 1 in this input.

That is possible to change the Formula input to your custom formula or function (for ex. xAverage (close, 20) or a study plot (study on study).

Re: Portfolio_Trader_Strategy_Examples Doubts  [SOLVED]

Posted: Oct 02 2014
by strelow
About Study on Study I already used in Indicator and Signal but in Money Management its look like is different because we have comands with index inside looping codes to know which instrument we are working

Here one example :
for idx = 0 to portfolioStrategies - 1 begin
Value_Idx[1, idx +1] = pmms_strategy_netprofit(idx);
end;

Now if I get one study like this

Inputs:

Formula(Indicator:"Formula" plot1);

if BarN > BarN[1] then begin
R = Formula;
pmm_set_my_named_num("RankStrategyR", R);
end;


How without index the software will know which instrument we are looking?

Re: Portfolio_Trader_Strategy_Examples Doubts

Posted: Oct 03 2014
by Henry MultiСharts
strelow, a combination of a strategy (a set of signals) + instrument is treated as an individual strategy in Portfolio Trader. All strategies are calculated independently from each other. I.e. Portfolio Trader always knows the instrument, strategy and it's index in the array of the strategies it is currently calculating.