Difference between revisions of "Portfolio GetMarginPerContract"
Jump to navigation
Jump to search
(Created page with "Returns: * 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...") |
|||
Line 1: | Line 1: | ||
− | Returns: | + | 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 == | |
<syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight> | <syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight> | ||
− | == | + | == 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 [[:Category:Portfolio_Backtesting|Portfolio Backtester]]. |
− | + | == Example == | |
− | <syntaxhighlight>Portfolio_GetMarginPerContract | + | <syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight> |
− | and the margin does not exist in the QuoteManager symbol settings. Not all of the securities can be | + | 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. |
− | bought on margin. The margin value can be returned for futures or options. | ||
− | Portfolio_GetMarginPerContract | + | <syntaxhighlight>Portfolio_GetMarginPerContract</syntaxhighlight> |
− | and the margin box in the Edit Symbol dialog window under Future tab in QuoteManager contains the | + | 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. |
− | value of 25. | ||
− | |||
− | |||
− | |||
− | |||
+ | <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. | ||
[[Category:Portfolio Strategy Properties]] | [[Category:Portfolio Strategy Properties]] |
Revision as of 07:02, 9 February 2012
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 Backtester.
Example
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.