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
REQUEST - training material for Portfolio Strategy functions
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: REQUEST - training material for Portfolio Strategy funct
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:
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:OR
then the priority is equal priority
You can also do a forum search by "PortfolioEntriesPriority"-you will find a lot of useful information.
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;
If you write a script as:
Code: Select all
var: priority(0);
priority=close;
PortfolioEntriesPriority = priority;
// code
Code: Select all
// code
var: priority(0);
priority=close;
PortfolioEntriesPriority = priority;
You can also do a forum search by "PortfolioEntriesPriority"-you will find a lot of useful information.
Re: REQUEST - training material for Portfolio Strategy funct
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
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
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: REQUEST - training material for Portfolio Strategy funct
PortfolioEntriesPriority gives prority to one strategy or the other. A strategy is a set of signals.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?
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
Re: REQUEST - training material for Portfolio Strategy funct
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
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
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: REQUEST - training material for Portfolio Strategy funct
Hello Andreas,
There is no dedicated reserved word to do that. You need to design your scripts logic to achieve this goal.
There is no dedicated reserved word to do that. You need to design your scripts logic to achieve this goal.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: REQUEST - training material for Portfolio Strategy funct
That will be possible to filter/send orders in MultiCharts 9.0I think it would be very useful if a dedicated word could be created for this purpose, in a future release of MC.