OpenPositionProfit: Difference between revisions
From MultiCharts
(Created page with "Returns a numerical value, indicating the current profit or loss for the open position. ==== Usage ==== <syntaxhighlight>OpenPositionProfit</syntaxhighlight> ==== Notes ...") |
Dave Masalov (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Returns a numerical value, indicating the current profit or loss for the open position. | Returns a numerical value, indicating the current unrealized profit or loss for the open position. | ||
== Usage == | |||
<syntaxhighlight>OpenPositionProfit</syntaxhighlight> | <syntaxhighlight>OpenPositionProfit</syntaxhighlight> | ||
== Notes == | |||
This function can only be used in signals. | * This function can only be used in signals. | ||
== Example == | |||
<syntaxhighlight>OpenPositionProfit | <syntaxhighlight>OpenPositionProfit</syntaxhighlight> | ||
* Will return a value of 0 if the current position is flat, | |||
* Will return a value of 10 if the value of the open position has increased by $10 since it was entered, | |||
since it was entered | * Will return a value of -5 if the value of the open position has decreased by $5 since it was entered. | ||
since it was entered | |||
[[Category:Strategy Position]] | [[Category:Strategy Position]] |
Latest revision as of 13:45, 28 May 2013
Returns a numerical value, indicating the current unrealized profit or loss for the open position.
Usage
OpenPositionProfit
Notes
- This function can only be used in signals.
Example
OpenPositionProfit
- Will return a value of 0 if the current position is flat,
- Will return a value of 10 if the value of the open position has increased by $10 since it was entered,
- Will return a value of -5 if the value of the open position has decreased by $5 since it was entered.