com.optstack.api

PositionsSequenceT

class PositionsSequenceT[T] extends SequenceT[T]

A sequence of zero or more positions

Linear Supertypes
SequenceT[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PositionsSequenceT
  2. SequenceT
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PositionsSequenceT(list: Seq[T])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def apply(index: Int): T

    Definition Classes
    SequenceT
    Annotations
    @FunctionInfo()
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def averageEntryPrice(implicit scriptExecContext: <error>): Double

    Calculate average entry price of the positions

    Calculate average entry price of the positions

    Annotations
    @FunctionInfo()
  9. def averageEntryPriceToUnderlyingPriceRatio(implicit scriptExecContext: <error>): Double

    Calculate the average ratio of entry price to underlying price

    Calculate the average ratio of entry price to underlying price

    Annotations
    @FunctionInfo()
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def close(comments: String = "")(implicit scriptExecContext: <error>): Unit

    Close all the positions in the sequence

    Close all the positions in the sequence

    Annotations
    @FunctionInfo()
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. final def filter(func: (T) ⇒ Boolean): SequenceT[T]

    Filter out the sequence of items based on specified criteria

    Filter out the sequence of items based on specified criteria

    val sequenceOfPositions = this.selectPosition(positionID="2212")
    
    // only select positions which are profitable (gainLoss > 0)
    val profitablePositions = sequenceOfPositions.filter({ curPosition =>
      	curPosition.gainLoss > 0
    })
    Definition Classes
    SequenceT
    Annotations
    @FunctionInfo()
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def foreach[U](func: (T) ⇒ U): Unit

    Loop through the items in a sequence, and for each item, evaluate the function that was passed in as an argument

    Loop through the items in a sequence, and for each item, evaluate the function that was passed in as an argument

    val sequenceOfPositions = this.selectPosition(orderID="2212")
    
    // for each position, get the profit / loss for that position
    sequenceOfPositions.foreach ({ curPosition =>
    	val profitLoss =  curPosition.gainLoss
    })
    Definition Classes
    SequenceT
    Annotations
    @FunctionInfo()
  17. def gainLoss(implicit scriptExecContext: <error>): Double

    Calculate the gain / loss of the positions

    Calculate the gain / loss of the positions

    Annotations
    @FunctionInfo()
  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. final def length: Int

    Get number of items in sequence

    Get number of items in sequence

    Definition Classes
    SequenceT
    Annotations
    @FunctionInfo()
  22. final def map[B](func: (T) ⇒ B): SequenceT[B]

    Transform the sequence of items (Type A) into a sequence of a different type (Type B)

    Transform the sequence of items (Type A) into a sequence of a different type (Type B)

    var positionSeq = this.selectPosition(orderID="myOrders1")
    
    // convert sequence of generic positions into a sequence of vertical spreads
    var verticalSeq = positionSeq.map({   curPosition =>
      	curPosition.asStrategy.vertical
      })
    Definition Classes
    SequenceT
    Annotations
    @FunctionInfo()
  23. def minDaysToExpiration(implicit scriptExecContext: <error>): Double

    Calculate the minimum days to expiration of the positions

    Calculate the minimum days to expiration of the positions

    Annotations
    @FunctionInfo()
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. def nearestExpirationDate(implicit scriptExecContext: <error>): Date

    Calculate the nearest expiration date of the positions

    Calculate the nearest expiration date of the positions

    Annotations
    @FunctionInfo()
  26. def netOpenQuantity(implicit scriptExecContext: <error>): Double

    Net open contracts

    Net open contracts

    Annotations
    @FunctionInfo()
  27. def netOpenQuantityDividedBy100(implicit scriptExecContext: <error>): Double

    Net open contracts divided by 100.

    Net open contracts divided by 100. Useful for converting # stock shares into # option contracts

    Annotations
    @FunctionInfo()
  28. def netOpenUnderlyingInstrumentQuantity(implicit scriptExecContext: <error>): Double

    Calculate the net open shares of the underlying instrument

    Calculate the net open shares of the underlying instrument

    Annotations
    @FunctionInfo()
  29. def netOpenUnderlyingInstrumentUncoveredQuantity(implicit scriptExecContext: <error>): Double

    * Calculate the net open shares of the underlying instrument that is NOT covered by short options

    * Calculate the net open shares of the underlying instrument that is NOT covered by short options

    Annotations
    @FunctionInfo()
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. final def toSeq: Seq[T]

    Convert the sequence into a Scala Seq object

    Convert the sequence into a Scala Seq object

    Definition Classes
    SequenceT
    Annotations
    @FunctionInfo()
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SequenceT[T]

Inherited from AnyRef

Inherited from Any

Ungrouped