Portfolio Trader - Learning how to Code

Questions about MultiCharts and user contributed studies.
trader0311
Posts: 50
Joined: 28 Sep 2014
Has thanked: 7 times

Portfolio Trader - Learning how to Code

Postby trader0311 » 30 Nov 2015

Hi,

Except for the couple of examples that MultiCharts has provided, where is the best place to learn how to code strategies that involve multiple securities which are all traded as a portfolio? I am fairly familiar with PowerLanguage, but find coding strategies that trade, select and rank multiple securities somewhat difficult. The code even looks different to me? Is it possible to learn a certain type of computer language that is very similar to the code used in Portfolio Trader?

Any resources or recommendations you can provide regarding how to program in the Portfolio Trader environment would be awesome.

Thank you!

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

Re: Portfolio Trader - Learning how to Code

Postby Henry MultiСharts » 08 Dec 2015

Hello trader0311,

The PowerLanguage syntax has not changed. New keywords have been introduced for programming Portfolio Trader strategies:
https://www.multicharts.com/trading-sof ... M_Keywords
Please refer to the Portfolio Trader documentation and strategy examples to learn how to use the new features and keywords:
https://www.multicharts.com/trading-sof ... lio_Trader
Portfolio Trader Strategy Examples:
https://www.multicharts.com/trading-sof ... y_Examples

trader0311
Posts: 50
Joined: 28 Sep 2014
Has thanked: 7 times

Re: Portfolio Trader - Learning how to Code

Postby trader0311 » 08 Dec 2015

Thank you for the resources Henry

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

Re: Portfolio Trader - Learning how to Code

Postby TJ » 08 Dec 2015

[FAQ] Portfolio Trader / Portfolio Backtester
viewtopic.php?f=16&t=47045

SudarshanS
Posts: 2
Joined: 24 Nov 2013
Has thanked: 1 time

Portfolio Trader - Learning how to Code

Postby SudarshanS » 12 Jan 2016

I have gone through many of the examples and wiki for portfolio codes. I am quite proficient in coding for powerlanguage but cannot get started with the portfolio coding.

I had a basic requirement. In a portfolio for 50 stocks, I wished to take the long signals for 5 stocks with highest momentum and short signals with five stocks with lowest momentum.

There is an example which is supposed to do this, but when I add it to the money management code section, the number of trades come down to just one or two per day.

I would be obliged if someone could give just the barest code needed to achieve this objective.

Thanks a lot.

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

Re: Portfolio Trader - Learning how to Code

Postby Henry MultiСharts » 20 Jan 2016

I have gone through many of the examples and wiki for portfolio codes. I am quite proficient in coding for powerlanguage but cannot get started with the portfolio coding.

I had a basic requirement. In a portfolio for 50 stocks, I wished to take the long signals for 5 stocks with highest momentum and short signals with five stocks with lowest momentum.

There is an example which is supposed to do this, but when I add it to the money management code section, the number of trades come down to just one or two per day.

I would be obliged if someone could give just the barest code needed to achieve this objective.

Thanks a lot.
Hello SudarshanS,

Please set the initial capital to max possible value $1 000 000 000 and make sure the Trade Size is properly configured, if it is not specified in the code (right click on the Strategy -> Show Properties-> Properties tab).


Return to “MultiCharts”