Offline Chart Generator Communication


All offline charts generators have capability to listen and respond to custom events. It may be used to both controlling its parameters and requesting the settings. Events are coupled in REQUEST and ANNOUNCEMENT pairs.

REQUEST events are handled by the generator, which in turn transmits the ANNOUNCEMENT events. The generator replies only to a REQUEST originating in its own offline chart, and throws away other REQUESTs. So communication request sent to the feed chart with multiple generators deployed always reaches its corresponding generator.

Typical Message Flows

Scenario 1 (requesting all chart parameters)

  1. An application on the offline chart broadcasts EVENT_OFFLINE_MAINPARAM_UPDATE_REQUEST to all charts. The requested parameter value is set to zero, which forces an enquiry for all settings without their change.
  2. The corresponding generator reads events and recognizes if the REQUEST comes from its own offline chart.
  3. The generator sends a series of ANNOUNCEMENT events back to the sender’s chart:
    EVENT_OFFLINE_MAINPARAM_UPDATE_ANNOUNCEMENT
    EVENT_OFFLINE_PRODUCT_UPDATE_ANNOUNCEMENT
    EVENT_OFFLINE_SESSION_UPDATE_ANNOUNCEMENT
    and multiple EVENT_OFFLINE_CUSTOM_PAR_UPDATE_ANNOUNCEMENT
  4. All the applications on the offline chart handle ANNOUNCEMENT events.

Scenario 2 (updating chart parameters with confirmation)

  1. The application on the offline chart broadcasts a single, non-zero REQUEST (any of the below) for a parameter change to all charts.
  2. The corresponding generator reads events and recognises if the REQUEST comes from its own offline chart.
  3. The generator regenerates the chart with the parameter passed in the REQUEST
  4. The generator sends a single ANNOUNCEMENT event back to the sender’s chart.
  5. All the applications on the offline chart handle ANNOUNCEMENT event.

Scenario 3 (simple range update)

  1. The application on the offline chart broadcasts a single, non-zero EVENT_OFFLINE_MAINPARAM_UPDATE_REQUEST for a parameter change to all charts.
  2. The corresponding generator reads events and recognises if the REQUEST comes from its own offline chart.
  3. The generator regenerates the chart with the parameter passed in the REQUEST

Events Declaration (Requests are framed, announcements follow)

#define EVENT_OFFLINE_MAINPARAM_UPDATE_REQUEST 0x5f92

Main praameter requests update (
long=chart_id of sender,
double = requested parameted value,
string = “custevtmsg”)

#define EVENT_OFFLINE_MAINPARAM_UPDATE_ANNOUNCEMENT 0x5f93

Current main parameter value announcement (
long=chart_id of sender,
double = requested parameted value,
string = “custevtmsg”)

#define EVENT_OFFLINE_PRODUCT_UPDATE_REQUEST 0x5f94

type of the chart change request (
long=chart_id of source,
double=new value:

CHART_FLEXI_BAR = 3, // Flexible Time Bars
CHART_RANGE_BAR = 2, // Range Bars
CHART_RANGE_BAR_NOGAP = 9, // Aligned Range Bars (w/o Gaps)
CHART_RENKO = 5, // Renko
CHART_RENKO_NOWICK = 10, // Renko w/o wicks
CHART_MEANRENKO = 4, // Mean Renko
CHART_POINTO = 8, // Point O Chart
CHART_TICK = 6, // Tick (Constant Volume)
CHART_HYBRID_RENKO = 11 // Hybrid Renko
CHART_POINT_FIGURE = 12 // Point & Figure

string=”custevtmsg”
)

#define EVENT_OFFLINE_PRODUCT_UPDATE_ANNOUNCEMENT 0x5f95

current type of the chart announcement (
long=chart_id of source,
double=new value:

CHART_FLEXI_BAR = 3, // Flexible Time Bars
CHART_RANGE_BAR = 2, // Range Bars
CHART_RANGE_BAR_NOGAP = 9, // Aligned Range Bars (w/o Gaps)
CHART_RENKO = 5, // Renko
CHART_RENKO_NOWICK = 10, // Renko w/o wicks
CHART_MEANRENKO = 4, // Mean Renko
CHART_POINTO = 8, // Point O Chart
CHART_TICK = 6, // Tick (Constant Volume)
CHART_HYBRID_RENKO = 11 // Hybrid Renko
CHART_POINT_FIGURE = 12 // Point & Figure

string=”custevtmsg”
)

#define EVENT_OFFLINE_SESSION_UPDATE_REQUEST 0x5f96

session settings change request (
long=chart_id of source,
double=0 (session off), non-zero (session on)
string=”custevtmsg”
)

#define EVENT_OFFLINE_SESSION_UPDATE_ANNOUNCEMENT 0x5f97

current session settings announcement (
long=chart_id of source,
double=0 (session off), non-zero (session on)
string=”custevtmsg”
)

#define EVENT_OFFLINE_CUSTOM_PAR_UPDATE_REQUEST 0x5f9f

requests  for additional param change (
long=chart_id of sender,
double = param requested value,
string – “custevtmsg” followed by parameter_name)

#define EVENT_OFFLINE_CUSTOM_PAR_UPDATE_ANNOUNCEMENT 0x5fa0

announcement of current param value (
long=chart_id of source,
double=param value,
string = “custevtmsg” followed by parameter_name
)