Changes

Jump to navigation Jump to search

PositionProfit

180 bytes removed, 10:36, 28 January 2014
no edit summary
:'''PosBack''' - a numerical expression, specifying the position:
::'''0''' - open position;
::'''1''' - one position back (the last position closed);
If '''PosBack''' is not specified, a value for the open position will be returned.
 
In order to return the total realized profit or loss of an open position please use [[OpenPositionProfit]] keyword.
== Notes ==
== Example ==
<syntaxhighlight>PositionProfit</syntaxhighlight>
Will return a value of 0 if the current position is flat.
 
<syntaxhighlight>PositionProfit(0)</syntaxhighlight>
Will return a value of 5 if the sum of the closed trades profit of the open position is $5.
 
<syntaxhighlight>PositionProfit(1)</syntaxhighlight>
Will return a value of -5 if the most recently closed position has generated a loss of $5.
[[Category:Strategy Position]]

Navigation menu