+1 888 340 6572

Portfolio MaxOpenPositionPotentialLoss: Difference between revisions

From MultiCharts
(Created page with "Returns a dollar value indicating the combined potential loss (not including margin, commision or slippage) for the traded symbols' open position within the portfolio. ====...")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Returns a dollar value indicating the combined potential loss (not including margin, commision or slippage) for the traded symbols' open position within the portfolio.
Returns a value indicating the combined potential loss (not including margin, commission or slippage) for the traded symbol's open position within the portfolio.  


==== Usage ====
== Usage ==
<syntaxhighlight>SetStopPosition;  
<syntaxhighlight>SetStopPosition;  


SetStopLoss(Portfolio_MaxOpenPositionPotentialLoss);</syntaxhighlight>  
SetStopLoss(Portfolio_MaxOpenPositionPotentialLoss);</syntaxhighlight>  
   
   
==== Notes ====  
== Notes ==
This function can only be used in signals intended to be used with the Portfolio Backtester.  
* This function can only be used in signals intended to be used with the Portfolio Trader.
* 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 ====
== Example ==
<syntaxhighlight>value1 = Portfolio_MaxOpenPositionPotentialLoss;  
<syntaxhighlight>value1 = Portfolio_MaxOpenPositionPotentialLoss;  


Line 18: Line 20:
SetStopLoss (value1);  
SetStopLoss (value1);  


end;  
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]]
[[Category:Portfolio Strategy Position]]

Latest revision as of 12:26, 23 March 2017

Returns a value indicating the combined potential loss (not including margin, commission or slippage) for the traded symbol's open position within the portfolio.

Usage

SetStopPosition; 

SetStopLoss(Portfolio_MaxOpenPositionPotentialLoss);

Notes

  • This function can only be used in signals intended to be used with the Portfolio Trader.
  • 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

value1 = Portfolio_MaxOpenPositionPotentialLoss; 

if value1 <> 0 then begin 

SetStopPosition; 

SetStopLoss (value1); 

end;
Portfolio_MaxOpenPositionPotentialLoss
  • 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.