Portfolio_Rotation Signal how it works ?

Questions about MultiCharts and user contributed studies.
Remy
Posts: 3
Joined: 02 Sep 2021
Been thanked: 1 time

Portfolio_Rotation Signal how it works ?

Postby Remy » 07 Sep 2021

Hello,

On this page.
https://www.multicharts.com/trading-sof ... y_Examples

Code: Select all

Formula (PercentChange(close, 14));
I don't understand what this formula is for.
I'is not a condition, and the variable is not called in the rest of the code.

The value is set in

Code: Select all

pmm_set_my_named_num
But where/when i get it back ?

Thanks

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: Portfolio_Rotation Signal how it works ?

Postby Tammy MultiCharts » 17 Sep 2021

Hello Remy,

Portfolio Rotation Strategy calculates a specific indicator by using every instrument in the portfolio. Positions are opened for those instruments which have the best indicator values. The wiki article provides an example with % Change indicator used for calculation.

The Percent Change function (used for %Change indicator calculation) is specified in the Formula input.

Please note that the wiki page you are referring to offers a general explanation of how the Portfolio Money Management Signals work. To view the entire script, please open it in PowerLanguage Editor through File > Open.

Remy
Posts: 3
Joined: 02 Sep 2021
Been thanked: 1 time

Re: Portfolio_Rotation Signal how it works ?

Postby Remy » 21 Sep 2021

Enfortunately your answer is a little light to satisfy me.


Exemple

A very easy signal

Code: Select all

Input: Length(8); Vars: BuyPx(0); BuyPx = Highest(High, Length) + .02; if Close > AVERAGEFC(close ,100) then Buy ("Brk LE") next bar at BuyPx Stop; if BarsSinceEntry > 5 then begin sell 1 contracts Next bar at market;
The first on, with no portfolio system.
Every trade time is more than 1 day.

Image

If I simply add the one signal "portfolio system",
all trades are closed on the same day

Image

That's why I say that there is an element missing in the wiki explanations
Attachments
Capture d’écran du 2021-09-21 18-36-54.png
(101.78 KiB) Not downloaded yet
Capture d’écran du 2021-09-21 18-37-38.png
(100.05 KiB) Not downloaded yet

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: Portfolio_Rotation Signal how it works ?

Postby Tammy MultiCharts » 23 Sep 2021

Hello Remy,

Your Test Signal generated a Stop order for entry and a Market order for exit according to the specified conditions:

Code: Select all

if Close > AVERAGEFC(close ,100) then Buy ("Brk LE") next bar at BuyPx Stop; if BarsSinceEntry > 5 then begin sell 1 contracts Next bar at market;
Portfolio Rank Signal Base that you have added in the second screenshot generates an Entry at Market and a Market order for reversing the long position (SellShort):

Code: Select all

buy next bar market; sellshort next bar market;
If both Price (Stop/Limit/Stop-Limit) and Market orders are generated on a single strategy calculation, Market orders will have greater priority. If both Exit and Reversal orders are generated, Reversals will have greater priority.

That explains why you get different results with Test Signal alone and Test Signal + Portfolio Rank Signal Base applied together.


Return to “MultiCharts”