×

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
Open main menu

Changes

Portfolio MaxOpenPositionPotentialLoss

300 bytes added, 12:26, 23 March 2017
no edit summary
Returns a dollar value indicating the combined potential loss (not including margin, commision commission or slippage) for the traded symbolssymbol' s open position within the portfolio.
==== Usage ====
<syntaxhighlight>SetStopPosition;
SetStopLoss(Portfolio_MaxOpenPositionPotentialLoss);</syntaxhighlight>
==== Notes ==== * This function can only be used in signals intended to be used with the Portfolio BacktesterTrader.* The value is returned in the currency specified in Portfolio Trader: '''Portfolio Settings -> Base Currency.'''* Use [[Portfolio SetMaxPotentialLossPerContract]] to set the maximum potential for a given symbol, and [[Portfolio CalcMaxPotentialLossForEntry]] to calculate the maximum potential loss for a specified entry.
==== Example ====
<syntaxhighlight>value1 = Portfolio_MaxOpenPositionPotentialLoss;
SetStopLoss (value1);
end; </syntaxhighlight>
<syntaxhighlight>Portfolio_MaxOpenPositionPotentialLoss</syntaxhighlight>
* Will return a value of 0 if there are currently no open positions within a portfolio,
* Will return a value of 100 if the combined potential loss for all open positions within a portfolio is ¤100 since the positions were entered.
Portfolio_MaxOpenPositionPotentialLoss will return a value of 0 if there are currently no open
positions within a portfolio.
Portfolio_MaxOpenPositionPotentialLoss will return a value of 100 if the combined potential loss for
all open positions within a portfolio is $100 since the positions were entered.</syntaxhighlight>
[[Category:Portfolio Strategy Position]]