Portfolio_Trader_Strategy_Examples Doubts

Questions about MultiCharts and user contributed studies.
strelow

Portfolio_Trader_Strategy_Examples Doubts

Postby strelow » 01 Oct 2014

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.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Portfolio_Trader_Strategy_Examples Doubts

Postby Henry MultiСharts » 02 Oct 2014

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).

strelow

Re: Portfolio_Trader_Strategy_Examples Doubts

Postby strelow » 02 Oct 2014

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?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Portfolio_Trader_Strategy_Examples Doubts

Postby Henry MultiСharts » 03 Oct 2014

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.


Return to “MultiCharts”