Class PositionFinancialDataSet

  • All Implemented Interfaces:
    de.gsi.chart.renderer.spi.financial.PositionFinancialRendererPaintAfterEP.PositionRenderedAware, de.gsi.dataset.DataSet, de.gsi.dataset.DataSetMetaData, de.gsi.dataset.event.EventSource, ExecutionPlatformListener, java.io.Serializable, java.util.EventListener

    public class PositionFinancialDataSet
    extends de.gsi.dataset.spi.AbstractDataSet<PositionFinancialDataSet>
    implements ExecutionPlatformListener, de.gsi.chart.renderer.spi.financial.PositionFinancialRendererPaintAfterEP.PositionRenderedAware

    Example of Trading Position DataSet. Depended on the Trading Platform Position / Order Domain Objects.

    The example includes:

    • merging positions for same entry or exit time, and
    • mapping position domain object to renderer required domain object PositionRendered, and
    • full example of the position listener mechanism.
    Author:
    afischer
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class de.gsi.dataset.spi.AbstractDataSet

        axisListener, dimension
      • Fields inherited from interface de.gsi.dataset.DataSet

        DIM_X, DIM_Y, DIM_Z
      • Fields inherited from interface de.gsi.dataset.DataSetMetaData

        TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
    • Constructor Summary

      Constructors 
      Constructor Description
      PositionFinancialDataSet​(java.lang.String instrument, de.gsi.dataset.spi.financial.OhlcvDataSet ohlcvDataSet, de.gsi.dataset.spi.financial.api.attrs.AttributeModel context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double get​(int dimIndex, int index)  
      int getDataCount()  
      de.gsi.chart.renderer.spi.financial.PositionFinancialRendererPaintAfterEP.PositionRendered getPositionByTime​(long corr)  
      void orderCancelled​(OrderEvent event)
      The order was cancelled
      void orderFilled​(OrderEvent event)
      The order was filled
      de.gsi.dataset.DataSet set​(de.gsi.dataset.DataSet other, boolean copy)  
      • Methods inherited from class de.gsi.dataset.spi.AbstractDataSet

        addDataLabel, addDataStyle, autoNotification, binarySearch, binarySearch, clearMetaInfo, copyAxisDescription, copyDataLabelsAndStyles, copyMetaData, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, fireInvalidated, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getStyle, getThis, getValue, getValues, getWarningList, hashCode, isVisible, lock, recomputeLimits, removeDataLabel, removeStyle, setEditConstraints, setName, setVisible, toString, updateEventListener
      • Methods inherited from class de.gsi.dataset.spi.AbstractStylable

        getStyle, setStyle
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface de.gsi.dataset.DataSet

        getAxisDescription, getStyle, set, setStyle
      • Methods inherited from interface de.gsi.dataset.event.EventSource

        addListener, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener
    • Constructor Detail

      • PositionFinancialDataSet

        public PositionFinancialDataSet​(java.lang.String instrument,
                                        de.gsi.dataset.spi.financial.OhlcvDataSet ohlcvDataSet,
                                        de.gsi.dataset.spi.financial.api.attrs.AttributeModel context)
    • Method Detail

      • getPositionByTime

        public de.gsi.chart.renderer.spi.financial.PositionFinancialRendererPaintAfterEP.PositionRendered getPositionByTime​(long corr)
        Specified by:
        getPositionByTime in interface de.gsi.chart.renderer.spi.financial.PositionFinancialRendererPaintAfterEP.PositionRenderedAware
      • get

        public double get​(int dimIndex,
                          int index)
        Specified by:
        get in interface de.gsi.dataset.DataSet
      • getDataCount

        public int getDataCount()
        Specified by:
        getDataCount in interface de.gsi.dataset.DataSet
      • set

        public de.gsi.dataset.DataSet set​(de.gsi.dataset.DataSet other,
                                          boolean copy)
        Specified by:
        set in interface de.gsi.dataset.DataSet