Difference between revisions of "Portfolio GetMarginPerContract"

From MultiCharts
Jump to navigation Jump to search
m (Reverted edits by 176.8.90.7 (talk) to last revision by JoshM)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
Returns one of the following:  
 
Returns one of the following:  
* A numerical value indicated in the % '''of contract cost''']] box multiplied by '''-1''', if the '''Margin value''' option is selected; or:  
+
* A numerical value indicated in the [[Portfolio Settings|% of contract cost]] box multiplied by '''-1''', if the '''Margin value''' option is selected; or:  
 
* The same value as a reserved word [[Margin]] if the '''Absolute Margin Value''' option is selected.  
 
* The same value as a reserved word [[Margin]] if the '''Absolute Margin Value''' option is selected.  
 
   
 
   
Line 7: Line 7:
  
 
== Notes ==
 
== Notes ==
This function can only be used in signals intended to be used with the [[:Category:Portfolio_Backtesting|Portfolio Backtester]].  
+
* This function can only be used in signals intended to be used with the Portfolio Trader.
+
* The absolute margin value is returned in the currency specified in Portfolio Trader: '''Portfolio Settings -> Base Currency.'''
== Example ==
+
 
 +
== Examples ==
 
<syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight>
 
<syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight>
 
Will return a value of 0 if Absolute Margin Value option is selected and the margin does not exist in the QuoteManager symbol settings. Not all of the securities can be bought on margin. The margin value can be returned for futures or options.  
 
Will return a value of 0 if Absolute Margin Value option is selected and the margin does not exist in the QuoteManager symbol settings. Not all of the securities can be bought on margin. The margin value can be returned for futures or options.  
Line 18: Line 19:
 
<syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight>
 
<syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight>
 
Will return a value of -10 if the Margin Value option is selected and the % of contract cost box contains the value of 10.
 
Will return a value of -10 if the Margin Value option is selected and the % of contract cost box contains the value of 10.
 +
 +
  
 
[[Category:Portfolio Strategy Properties]]
 
[[Category:Portfolio Strategy Properties]]

Latest revision as of 12:40, 25 July 2014

Returns one of the following:

  • A numerical value indicated in the % of contract cost box multiplied by -1, if the Margin value option is selected; or:
  • The same value as a reserved word Margin if the Absolute Margin Value option is selected.

Usage

Portfolio_GetMarginPerContract

Notes

  • This function can only be used in signals intended to be used with the Portfolio Trader.
  • The absolute margin value is returned in the currency specified in Portfolio Trader: Portfolio Settings -> Base Currency.

Examples

Portfolio_GetMarginPerContract

Will return a value of 0 if Absolute Margin Value option is selected and the margin does not exist in the QuoteManager symbol settings. Not all of the securities can be bought on margin. The margin value can be returned for futures or options.

Portfolio_GetMarginPerContract

Will return a value of 25 if Absolute Margin Value option is selected and the margin box in the Edit Symbol dialog window under Future tab in QuoteManager contains the value of 25.

Portfolio_GetMarginPerContract

Will return a value of -10 if the Margin Value option is selected and the % of contract cost box contains the value of 10.