×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

Portfolio Trader

1,231 bytes added, 13:25, 24 January 2023
In MultiCharts 9.0 '''Portfolio Trading functionality Backtester''' has been added improved and became '''Portfolio Trader''' adding [[#Automated Trading|Portfolio Automation]] and [[#Forward Testing|Forward Testing]] to the list of features. Download [[Media:Portfolio_Trader_Manual.pdf]] in '''MultiCharts 9.0 Beta.PDF'''format.== Opening Portfolio Trader ==
In MultiCharts 9.0 '''Portfolio Backtester''' has been improved and became To open '''Portfolio Trader''' adding [[#Automated Trading|Portfolio Automation]] and [[#Forward Testing|Forward Testing]] to the list of features.:
* click '''Portfolio Trader Manual''' [[File:Port Trdr icon.png]] icon on the '''Main''' toolbar; or:* in the '''Main'''menu select ''.pdf'File''', then point to '''New''' format can be downloaded and click '''[https://dl.dropboxusercontent.com/u/95112551/Portfolio/Portfolio%20Trader%20Manual.pdf here]Trader'''.<br>
== Understanding Portfolio Trader ==
=== Portfolio Trading Benefits ===
* Applying a trade strategy to a number of financial instruments simultaneously offers the following advantages:
* A diverse portfolio will produce more consistent results.
* Infrequent trading opportunities will be more common across a number of symbols.
'''Portfolio Performance Report''' is available in '''Auto Trading Mode'''. A Portfolio Performance Report shows results generated from the moment it opens.
 
<br><div style="background-color: #E3FBE5;">'''NOTE:''' The report is recalculated automatically in the '''Forward Testing''' and '''Auto Trading''' modes, but not in the '''Backtesting''' mode.
Please, also note that there are 2 cases when the Report is not recalculated:
 
* when it is opened on Trade Analysis -> List of Trades page
* when it is opened on Breakdown by Symbols -> Overview -> detailed report for the symbol page. </div>
== Understanding Dynamic Portfolio ==
== Portfolio Script Calculation Diagram ==
To see '''Portfolio Script Calculation Diagram''' please click '''[[Portfolio Script Calculation Diagram|here]]'''.
== Script Calculation and Raw Order Generation ==
Here is a sequence of actions that will be performed during calculation:
# Before a portfolio is calculated, data from all instruments contained in the Instrument List are either gathered from MultiCharts database or downloaded from a data provider's server. The first instrument’s data range start date determines the start date for all instruments. The strategy is then applied to every instrument in the Portfolio Tree.# During backtesting, a single bar of each symbol's data series is evaluated by the strategy's signal scripts, starting with the first (oldest) bar. The series’ bars are evaluated in the order that the symbols appear in the symbols table of Portfolio BacktesterTrader. Based on evaluation of each series’ bar, a set of one or more orders may be generated by the scripts for each of the symbols. Order sets are generated in the same sequence as the series’ bars are evaluated.# This process is illustrated in the Raw Order Generation section of the [[Portfolio Script Calculation Diagram|diagram]]: the first bar for symbol 1 is evaluated first, and a set of orders is generated based on that bar. Then the first bar for symbol 2 is evaluated, and a set of orders is generated based on that bar. The process is repeated until the first bar for the last symbol (Symbol N) is evaluated.
# After all of the strategies have been calculated, the PMM (Portfolio Money Management) signal is initiated (if any has been applied under Portfolio Properties). The PMM signal is used to apply money management settings to the entire portfolio. It can access all of the portfolio's strategies via pmms_keywords. (Calculation-wise, the PMM signal is not copied to every signal and is always calculated on the first instrument on the same bar on which all other signals are calculated).
# The PMM signal evaluates all of the portfolio’s strategies and affects generated orders (e.g., places orders which force positions to close, prevents opening positions or modifies the number of contracts). Raw orders that pass the PMM signal evaluation are then evaluated by the MONEY & RISK management system, with priority determined by MONEY & RISK's settings (priority is set by the PortfolioEntriesPriority keyword). If priority is set the same for all strategies, higher priority is given to the strategy located on top of the Portfolio Tree. <br><div style="background-color: #E3FBE5;"> '''Note''' that the PMM signal and the '''PortfolioEntriesPriority''' keyword are both applied to the portfolio. '''PortfolioEntriesPriority''' keyword is a legacy and it can interfere with the PMM signal. We do not recommend you use it.</div>
Each strategy is designed to open and close positions of a specific instrument, i.e. the strategy calculates the moment WHEN the position should be opened/closed.
After all strategies have been calculated, the PMM (Portfolio Money Management) signal (if any PPM PMM signal has been applied) is initiated.
The '''PMM signal''' can access all the strategies within a portfolio . PMMS functionality helps to manage:
* Rotation strategy (when N “Best” instruments are traded simultaneously).
[[File:PMMS Signal window.png]]
 
Since '''MultiCharts 11''' Portfolio Money Management signals can generate '''alerts'''. To enable alerts for the PMM signals it is required to use [[Alert]] keyword in the code of the signal and enable alerts in the '''Alerts''' tab in '''Strategy properties'''.
 
<div style="background-color: #E3FBE5;">'''Note:''' It is important to understand that Money Management signals have a base resolution – this is the first symbol in your Portfolio table (the upper left cell of the table, as shown on the picture above). The data and statuses are taken from it during the PMM signal’s calculations. Even if the first strategy is disabled in Portfolio Tree, the PMM signal will refer to this symbol.</div>
<div style="background-color: #E3FBE5;">If a PMM signal references additional data series (Data2, Data3, etc) the values are also taken from the first row of the Portfolio instruments table.</div>
== Symbol Prioritization ==
If the '''PortfolioEntriesPriority''' function is specified within a strategy, the sequence of the sets of orders is rearranged based on the criteria specified.
This process is illustrated in the Symbol Prioritization section of the [[Portfolio Script Calculation Diagram|diagram]]: the resulting sequence of sets of orders begins with the set of orders for the symbol 1, followed by the set of orders for symbol N, and ends with the set of orders for symbol 2.The position of a set of orders in the sequence determines its relative priority: the set of orders for symbol 1 has the highest priority (31), set of orders for symbol N has the second highest priority (2), and the set of orders for symbol 2 has the least priority (3).
== Risk Control ==
At the risk control stage, the sequence of sets of orders is treated as one long sequence of orders. Orders are executed one-by-one from the beginning of the sequence, until all orders are executed, or until the risk control limits defined in Portfolio Settings prevent the execution of remaining orders. Any remaining orders that could not be executed are discarded.
This process is illustrated in the Risk Control section of the [[Portfolio Script Calculation Diagram|diagram]]: all of the orders for symbol 1 and symbol N are executed, while only some of the orders for symbol 2, 100 shares Long @ 55, are executed, due to risk control limits; this prevents the execution of the rest of the orders for symbol 2.
The entire process is repeated for the next bar of each of the portfolio symbol's data series.
All major strategy calculation indicators, such as Portfolio Net Profit, Gross Profit, Gross Loss, Trades Profits and Losses, etc. are calculated in the account currency, including EXISTING MaxIDDrawDown, NetProfit, MaxPositionProfit; PosTrade***;_OpenEntry***. <br>
When automated Strategy values (during backtesting, optimization, forward testing, realtime trading in the Portfolio is run by selecting Run Automate Order Execution, the currency conversion will be executed in real-time using current rates within each executed trade.When a strategy is backtested or optimized ) are converted using historical data, the . The corresponding historical rates will be used for conversion (exchange rates at the close of the previous FOREX trading session will be used, intra-day exchange rate fluctuations are not taken into account: e.g. if the trade occurs on April 30th, the close price of the April 29th FOREX trading session will be used).
Currency conversion patterns:<br>
== Portfolio Trader Strategy Examples ==
'''Portfolio Trader Strategy Examples''' for regular MultiCharts (PowerLanguage) can be found '''[https://dl.dropboxusercontent.com/u/95112551/[Portfolio%20RT%20Manual.%20Examples.pdf Trader Strategy Examples|here]]'''.
== Portfolio Money Management Keywords ==

Navigation menu