C# Class XTAPI_Samples.frmStartOfDay

StartOfDay This example demonstrates using the XTAPI to monitor and set StartOfDay (SOD) records. This sample requires you have administrative risk privileges.
Inheritance: System.Windows.Forms.Form
Show file Open project: tradingtechnologies/CodeSamples_XTAPI_CSharp

Public Methods

Method Description
frmStartOfDay ( ) : System

Upon the application form loading, the TTGate, TTDropHandler, TTInstrNotify, and TTRiskManager are initialized and events are subscribed to.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

LoadSODData ( ) : void

Loads the current SOD records and publishes to the output TextBox

ResetOutput ( ) : void

Clears the output and starts anew

TryEnableSODServices ( ) : void

Enable SOD services on the form if all flags are set.

TryOpenFillConnection ( ) : void

Open connection to the fill server if all flags are set.

aboutToolStripMenuItem_Click ( object sender, EventArgs e ) : void

This function displays the About dialog box.

btnAddSod_Click ( object sender, EventArgs e ) : void

Add the SOD Record to the SOD object

btnDeleteAll_Click ( object sender, EventArgs e ) : void

Delete all SOD records

btnDelete_Click ( object sender, EventArgs e ) : void

Delete the SOD record of the contract dragged on the form from the SOD object

btnGetSodSet_Click ( object sender, EventArgs e ) : void

Display SOD records for the trader provided in the form

btnLoginRiskAdmin_Click ( object sender, EventArgs e ) : void

Called when the user attempts risk administrator authentication

btnPublish_Click ( object sender, EventArgs e ) : void

This function publishses the SOD Records after they have been saved in the Risk Manager

btnSave_Click ( object sender, EventArgs e ) : void

This functions saves the SOD Records after they have been Added to the Risk Manager

m_RiskManager_OnDataLoaded ( ) : void

Triggered when the application successfully logs into Guardian and retrieves the traders' risk limits. This occurs after calling the SetAdminLogin or Reset methods.

m_RiskManager_OnLoginFailed ( string sAdminExchange, string sAdminMember, string sAdminGroup, string sAdminTrader, string sMsg ) : void

Guardian rejected the administrator login credentials supplied in the SetAdminLogon method.

m_RiskManager_OnSODDataDownloaded ( string sExch ) : void

SOD records from the specified exchange have been successfully downloaded. Note: This occurs when the client application opens a connection to the fill server after receiving the initial OnDataLoaded event. If the connection to the fill server is established prior to the OnDataLoaded event, the event will not fire.

m_TTDropHandler_OnNotifyDrop ( ) : void

This function is called when an instrument is dragged and dropped from the Market Grid in X_TRADER.

m_TTGate_OnExchangeStateUpdate ( string sExchange, string sText, int bOpened, int bServerUp ) : void

This event is triggered when the state of a TT Gateway changes.

m_TTGate_OnStatusUpdate ( int lHintMask, string sText ) : void

This event is triggered when the connection with X_TRADER changes.

m_TTInstrNotify_OnNotifyFound ( XTAPI pNotify, XTAPI pInstr ) : void

This function is called when an instrument is located after calling m_TTInstrObj.Open()

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

frmStartOfDay() public method

Upon the application form loading, the TTGate, TTDropHandler, TTInstrNotify, and TTRiskManager are initialized and events are subscribed to.
public frmStartOfDay ( ) : System
return System