×

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 GetMaxPotentialLossPerContract

437 bytes added, 12:47, 25 July 2014
no edit summary
Returnsone of the following: * a A numerical value indicated in the % box multiplied by [['''-1''',]] if the [['''Max Potential Loss]] ''' option is selected in the Format [[Portfolio_Settings|Portfolio Settings ]] dialog window under the Portfolio Settings tab; , or: * a A numerical value indicated in the $ box, if the [['''Absolute Max Potential Loss]] ''' option is selected box in the [['''Format Settings]] ''' dialog window under the [[Portfolio Settings]] tab. ==== Usage ====
<syntaxhighlight>Portfolio_GetMaxPotentialLossPerContract</syntaxhighlight>
==== Notes ==== * This function can only be used in signals intended to be used with the Portfolio BacktesterTrader.* The absolute max potential loss value is returned in the currency specified in Portfolio Trader: '''Portfolio Settings -> Base Currency.'''* Use [[Portfolio SetMaxPotentialLossPerContract]] to set the maximum potential loss for the specified symbol, and [[Portfolio MaxOpenPositionPotentialLoss]] to get the current combined potential loss for all open positions in the portfolio. ==== Example ====<syntaxhighlight>Portfolio_GetMaxPotentialLossPerContract will </syntaxhighlight>Will return -5 if the Max Potential Loss option is selected and % box value is 5 under the Portfolio Settings tab in the Format Settings dialog window.
<syntaxhighlight>Portfolio_GetMaxPotentialLossPerContract will </syntaxhighlight>Will return 0.001 if the Absolute Max Potential Loss optionis selected and $ ¤ box value is 0.001 under the '''Portfolio Settings ''' tab in the Format Settings dialog window.</syntaxhighlight>
[[Category:Portfolio Strategy Properties]]