Transformer Pipeline Module API Reference  7.1.1.311110
Symbol open status

Detailed Description

The mktstate package provides the functionality to determine whether a symbol update has been received within the trading hours of its parent market.

There are three sorts of market CloseType handled by this package:

These types sould be defined in the CloseType field, for example for Market AAA with a "next" closetype, the following pipeline configuration option should be used

database-insert "/TRADEGROUP/AAA" "CloseType" "next"

For market BBB which is of type "wait" whereby field "Status" has a value of "C" when the symbol has a close price, the following configuration options would be used:

database-insert "/TRADEGROUP/BBB" "CloseType" "wait"
database-insert "/TRADEGROUP/BBB" "CloseField" "Status"
database-insert "/TRADEGROUP/BBB" "CloseValue" "C"

Functions

 mktstate.handle (var updatepkt, var inname, var mkt)
 Handle the market status for equities. More...
 
 mktstate.force_reclose (var symname, var mkt)
 Force a symbol to reclose. More...
 
 mktstate.snapshot_close (var symname, var closename, var pricefieldname, var closefieldname)
 Create and send a snapshot close. More...
 
 mktstate.close_symbol (var mkt, var symname, var pricefieldname, var closefieldname)
 Handle closing a symbol. More...
 

Function Documentation

mktstate.close_symbol ( var  mkt,
var  symname,
var  pricefieldname,
var  closefieldname 
)

Handle closing a symbol.

Parameters
mkt- Market that the symbol belongs to
symname- Symbolname that we wish to close
pricefieldname- Name of the output field used for price (data dictionary name)
closefieldname- Name of the output field used for closing price (data dictionary name)
Return values
nil- Next updates will close
Returns
- An update packet containing closing values

This function exists solely to handle the snapshot close markets

mktstate.force_reclose ( var  symname,
var  mkt 
)

Force a symbol to reclose.

Parameters
symname- (incoming) Symbolname that we want to force to be open
mkt- Market
Return values
nil- No further action required
1- Create a snapshot now
mktstate.handle ( var  updatepkt,
var  inname,
var  mkt 
)

Handle the market status for equities.

Parameters
updatepkt- Incoming update
inname- Symbol name that we want to handle the market status of
mkt- Market that this symbol belongs to
Note
In this implementation, the symbol name is the incoming feed symbol
Return values
mktstate.CLOSED- Market is closed (don't send updates)
mktstate.OPEN- Market is open (send updates)
mktstate.LASTUPDATE- This is the last update
mktstate.snapshot_close ( var  symname,
var  closename,
var  pricefieldname,
var  closefieldname 
)

Create and send a snapshot close.

Parameters
symname- Normalised name
closename- Name to be used for the closing symbol
pricefieldname- Name of the output field used for price (data dictionary name)
closefieldname- Name of the output field used for closing price (data dictionary name)
Returns
An update packet containing the closing values

Generated on Fri Mar 23 2018 18:29:26 for Transformer Pipeline Module API Reference