?> QuantXpress – Deliver high performance automated trading and connectivity solutions



Synchronize Data Series with Trading Client Framework


Some time it is required to synchronize some important moving state data information (DataSeries) of server to client for visual display. That gives more inutive UI interface to monitor the strategy at run-time. For instance, server hosted strategy is maintaing a runtime state of technical indicator and its trading signal decision on every bar close event. The trader needs to visualize the live state of indicator and signal in some graphical presentation. The BlitzTrader framework provides mechanism that strategy can define a dataseries that can hold information of type: integer, long, double or BarData(OHLC). This series is updated at server end and automatically synchronize at the client end. The strategy client plugin have access of these data series and can use and present the information as it required.

The framework provides following type of dataseries.

BlitzDoubleDataSeries: Holds a data of type Double
BlitzIntDataSeries: Holds a data of type Integer
BlitzLongDataSeries: Holds a data of type Long
BlitzBarDataSeries: Holds a data of type BarData (OHLC)
The seroes is registerd to framework by call of a API function RegisterDoubleBlitzDataSeries providing a unique name identifier. The framework creates a image of the series at the client end and any change in data is also reflected at client end.
 
private BlitzDoubleDataSeries _mtmDataSeries = null;
protected override void OnInitialize()
{
    .......................................
    .......................................
    string errorString = string.Empty;
    if (!base.RegisterDoubleBlitzDataSeries("MTMSeries", out _mtmDataSeries, out errorString))
    {
        TraceLogWarning("BlitzDataSeries [MTMSeries] registration failed. : Reason" + errorString);
    }
}
....................
....................
double currentMTM = GetCurrentTransactionMTM(); 
_mtmDataSeries.Add(currentMTM);