REQUEST - training material for Portfolio Strategy functions

Questions about MultiCharts and user contributed studies.
moses
Posts: 54
Joined: 16 Nov 2012
Has thanked: 34 times
Been thanked: 7 times

REQUEST - training material for Portfolio Strategy functions

Postby moses » 10 Mar 2013

Hello Multicharts!

I am trying to create some risk management and money management rules in PowerLanguage, using the Portfolio Strategy functions, but I can't get things to work properly.

Given that these functions are exclusive to Multicharts and that there doesn't seem to be any guidance material for them (apart from the wiki), could we please request a post or a video from Multicharts, to explain in more detail some of the basic functionality? Basically, some working code to show how things work.

For example:
1 - to limit additional number of positions if current portfolio drawdown is more than x%
2 - to reduce position size on new entries if portfolio drawdown is x
3 - to stop trading the strategy for x period of time if drawdown is y
4 - to give priority to a specific strategy over another, when there are multiple strategies running in the Portfolio Backtester

Thanks a lot
moses

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

Re: REQUEST - training material for Portfolio Strategy funct

Postby Henry MultiСharts » 15 Mar 2013

Hello moses,

At the moment that is not possible to achieve #1-3. We are going to add such functionality when a new feature "ability to auto-trade a portfolio of stocks" will be introduced in MultiCharts 9.0.

#4 can be already achieved with PortfolioEntriesPriority.
Additional info: PortfolioEntriesPriority is used for entries only, it doesn’t work for exits. If you write a script as:

Code: Select all

var: priority(0);
PortfolioEntriesPriority = priority;
// code
priority=close;
then the priority on the first calculation is zero, on the second it’s priority from the previous calculation.

If you write a script as:

Code: Select all

var: priority(0);
priority=close;
PortfolioEntriesPriority = priority;
// code
OR

Code: Select all

// code
var: priority(0);
priority=close;
PortfolioEntriesPriority = priority;
then the priority is equal priority

You can also do a forum search by "PortfolioEntriesPriority"-you will find a lot of useful information.

moses
Posts: 54
Joined: 16 Nov 2012
Has thanked: 34 times
Been thanked: 7 times

Re: REQUEST - training material for Portfolio Strategy funct

Postby moses » 15 Mar 2013

Thank you Henry, I am looking forward to MC9 for this very useful new functionality.

As regards priority of strategies, I am looking for a way for Portfolio backtester to give priority to one strategy when comparing multiple strategies, not priority to trades of the same strategy.
Is there a way to do that?

Thanks
moses

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

Re: REQUEST - training material for Portfolio Strategy funct

Postby Henry MultiСharts » 18 Mar 2013

As regards priority of strategies, I am looking for a way for Portfolio backtester to give priority to one strategy when comparing multiple strategies, not priority to trades of the same strategy. Is there a way to do that?
PortfolioEntriesPriority gives prority to one strategy or the other. A strategy is a set of signals.
On the attached screenshot you can see two strategies:
1) Bollinger Bands LE & Bollinger Bands SE
2) Channel Breakout LE & Channel Breakout SE
Attachments
PB_strat.png
(14.21 KiB) Downloaded 608 times

moses
Posts: 54
Joined: 16 Nov 2012
Has thanked: 34 times
Been thanked: 7 times

Re: REQUEST - training material for Portfolio Strategy funct

Postby moses » 22 Mar 2013

Hi Henry,

I am not sure I get it.

If I write:
PortfolioEntriesPriority = close;
this means that the code will give priority to the equities with the highest closing price.

But what if I have two signals running and they both enter trades at the end of the day. I want to give priority to signal 1, irrespective of whether signal 2 may have a trade with higher closing price. How can I achieve that?

Thank you
Andreas

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

Re: REQUEST - training material for Portfolio Strategy funct

Postby Henry MultiСharts » 26 Mar 2013

Hello Andreas,

There is no dedicated reserved word to do that. You need to design your scripts logic to achieve this goal.

moses
Posts: 54
Joined: 16 Nov 2012
Has thanked: 34 times
Been thanked: 7 times

Re: REQUEST - training material for Portfolio Strategy funct

Postby moses » 26 Mar 2013

Thank you Henry.
I think it would be very useful if a dedicated word could be created for this purpose, in a future release of MC.

Andreas

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

Re: REQUEST - training material for Portfolio Strategy funct

Postby Henry MultiСharts » 23 Oct 2013

I think it would be very useful if a dedicated word could be created for this purpose, in a future release of MC.
That will be possible to filter/send orders in MultiCharts 9.0


Return to “MultiCharts”