예제 #1
0
 // Methods for individual states. Should be private or protected to hide them since they don't need to be called directly.
 // NOTE: NAMES NEED TO MATCH STATES EXACTLY OR EXCEPTIONS WILL BE GENERATED!
 #region State Methods
 private void GetHeadTimeStamp(FSM_EventArgs.GooContract_With_Payload e)
 {
     TWS.RequestHeadTimeStamp(e.Contract);
 }
예제 #2
0
 private void DownloadHistoricalData(FSM_EventArgs.GooContract_With_Payload e)
 {
     // Submit a request for 24 hours of 1-min data
     TWS.RequestHistoricalData(e.Contract, e.Contract.HistRequestTimeStamp, TWSInfo.HistoricalDataStepSizes.Day_1, TWSInfo.BarSizeSetting.Min_1);
 }
예제 #3
0
 private void FailedConnection(FSM_EventArgs.Payload_Only e)
 {
     TWS.Disconnect();
     FireEvent(Events.Disconnected);
 }
예제 #4
0
 private void Connected(FSM_EventArgs.Payload_Only e)
 {
     TWS.Connected();
 }
예제 #5
0
 private void TryConnection(FSM_EventArgs.Payload_Only e)
 {
     TWS.Connect();
 }
예제 #6
0
 private void btnReqData_Click(object sender, RoutedEventArgs e)
 {
     TWS.GetHistoricalData(sp500);
     TWS.GetHistoricalData(nq100);
 }
예제 #7
0
 private void btnReqContracts_Click(object sender, RoutedEventArgs e)
 {
     sp500 = TWS.GetContractDetails("ES", "FUT", TWSInfo.Exchanges.Globex);
     nq100 = TWS.GetContractDetails("NQ", "FUT", TWSInfo.Exchanges.Globex);
 }