[Portfolio] Can someone please explain these default default MC MM signals?

Questions about MultiCharts and user contributed studies.
multichartsUser23
Posts: 15
Joined: 02 Mar 2018
Has thanked: 3 times

[Portfolio] Can someone please explain these default default MC MM signals?

Postby multichartsUser23 » 02 Mar 2018

I have a Portfolio Trader workspace containing strategies for various instruments, and each one of these strategies contains multiple signals for entering and exiting both long and short positions for these respective instruments. I only wish to execute orders when I have no other open positions (so that I will only have 1 open position at a time), but unfortunately, there are some instances where 2 positions will be opened simultaneously (the same minute) because when both of these orders execute, they don't see each other, and by the time they are able to, I am already in 2 separate positions.

Multicharts support has informed me that to accomplish my goal, I can use their default Portfolio Rank MM signal within Portfolio Trader. This signal and other such MM signals are used as examples here https://www.multicharts.com/trading-sof ... k_Strategy to describe how these signals and the PMM Keywords they rely upon (discussed here- https://www.multicharts.com/trading-sof ... M_Keywords) work.

Despite examining these resources closely, using print statements to examine the code for these symbols in the print log, and contacting support, I still cannot understand what this default MM signal is meant to do. For example, in the example code, Multicharts writes the following:
Extract indicators’ values for every instrument:

for idx = 0 to portfolioStrategies - 1 begin
BaseR[idx] = pmms_get_strategy_named_num(idx, "RankStrategyR");
end;
What is "RankStrategyR" supposed to be? Is it a declared variable within a signal under the strategy found at index "idx" (the first parameter in the pmms_get_strategy_named_num function)? For my purposes, if I want Multicharts to rank the priority of all of my orders according to a variable "value1" found in signal "Signal 1" in strategy "Strategy A", is it enough to replace "RankStrategyR" in Multichart's default code above with my variable "value1" to have the MM signal look at all open orders and only allow the one order to be executed with the highest "value1" variable in the signal of the strategy found at index "idx"?

I have desperately tried to print the value of declared variables in my strategy by replacing "RankStrategyR" with them, but nothing gets returned, making me think I'm just not understanding what this MM signal is meant to do. Can someone help me understand, and if this MM signal doesn't accomplish what I desire it to, can someone advise me on how to create one that does?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Can someone please explain these default default MC MM signals?

Postby TJ » 06 Mar 2018

...

Despite examining these resources closely, using print statements to examine the code for these symbols in the print log, and contacting support, I still cannot understand what this default MM signal is meant to do. For example, in the example code, Multicharts writes the following:
...

What did the support say?

If you post their answers, you can generate some interests to start a discussion.

User avatar
fbertram
Posts: 166
Joined: 16 Oct 2014
Location: Seattle, USA
Has thanked: 36 times
Been thanked: 76 times
Contact:

Re: Can someone please explain these default default MC MM signals?

Postby fbertram » 08 Mar 2018

What is "RankStrategyR" supposed to be? Is it a declared variable within a signal under the strategy found at index "idx" (the first parameter in the pmms_get_strategy_named_num function)? For my purposes, if I want Multicharts to rank the priority of all of my orders according to a variable "value1" found in signal "Signal 1" in strategy "Strategy A", is it enough to replace "RankStrategyR" in Multichart's default code above with my variable "value1" to have the MM signal look at all open orders and only allow the one order to be executed with the highest "value1" variable in the signal of the strategy found at index "idx"?
RankStrategyR is a named number for the strategy with the index idx. The portfolio signal can communicate with the individual strategies using these named values, you can see them as variables (well, kind of). There are 2 matching calls:
* a call to pmm_set_my_named_num in your strategy. This is where the value is set.
* a call to pmms_get_strategy_named_num in your money-management signal. This is where the value is read

Hope this helps,
Cheers


Felix

SilverQuant
Posts: 1
Joined: 07 Jul 2011
Has thanked: 2 times

[Portfolio] Can someone please explain these default default MC MM signals?

Postby SilverQuant » 02 Aug 2018

I have also done examination of the documentation but have not been able to figure it out, while having extensive programming experience. It is not clear to me what to code where and how the original strategy and the ranking / money management signal (should) interact with each other.

My objective : achieve the implementation of a simple Moving Avg crossover with a portfolio of e.g. a 20 stocks system, using ranking of stocks (lowest RSI) and a simple money management algorithm (risk 2% of available equity).

It would help if somebody makes a tutorial or step-by-step explanation how to implement this with the Portfolio Trader.


Return to “MultiCharts”