ICE Data Services -

Strategy.isShort() Back Testing Functions

isShort() is a method of the Strategy Object that returns a Boolean (true/false) value to indicate that the strategy is currently holding a short position.  The Strategy Object is for back testing purposes only and is not intended for real time trading.



Return Value(s)
Boolean (true/false)

Strategy.isShort() returns true if a short position is currently being held.  This method is a logic function used to control back testing logic within conditional statements.  For example, a user may want to check to see if the strategy is currently in a short position before evaluating a short exit condition. 

Code Examples
function main()  {
	if (Strategy.isShort() == true) {		// Evaluate short exit condition		if (/* Your Exit Condition */) {			//Strategy.doCover(...);		}	} 

See Also
Back Testing Functions
EFS Library:  Back Testing
Strategy Analyzer
eSignal Bulletin Board Search Engine
Help Guides