This commit is contained in:
38
CPRobotDlg.h
38
CPRobotDlg.h
@@ -7,9 +7,11 @@
|
||||
#include "Trader.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <hash_map>
|
||||
#include <fstream>
|
||||
|
||||
using std::vector;
|
||||
using stdext::hash_map;
|
||||
using std::string;
|
||||
using std::ofstream;
|
||||
|
||||
@@ -22,6 +24,23 @@ struct CP_BUYINFO
|
||||
|
||||
};
|
||||
|
||||
struct CP_UNITINFO
|
||||
{
|
||||
string m_Code;
|
||||
int m_iCnt;
|
||||
float m_fBoughtPrice;
|
||||
float m_fHighestPrice;
|
||||
CTime m_Time;
|
||||
int m_iOrderNum;
|
||||
};
|
||||
|
||||
struct CP_PRICEINFO
|
||||
{
|
||||
float m_afAskPrice[5];
|
||||
float m_afBidPrice[5];
|
||||
};
|
||||
|
||||
|
||||
enum CP_STATE
|
||||
{
|
||||
CPS_WAIT=0,
|
||||
@@ -43,14 +62,14 @@ public:
|
||||
enum { IDD = IDD_CPROBOT_DIALOG };
|
||||
|
||||
afx_msg void OnBnClickedButtonRefreshBalance();
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
afx_msg void OnDestroy();
|
||||
|
||||
afx_msg void OnBnClickedButtonStartDeal();
|
||||
afx_msg void OnBnClickedButtonSearch();
|
||||
|
||||
afx_msg void OnHotKey(UINT nHotKeyId, UINT nKey1, UINT nKey2);
|
||||
|
||||
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
||||
|
||||
virtual void ReceivedSysDib();
|
||||
virtual void ReceivedDib();
|
||||
|
||||
@@ -90,6 +109,7 @@ private:
|
||||
float m_fLossCutTick;
|
||||
float m_fTrailingTick;
|
||||
int m_iCancelDelay;
|
||||
int m_iWindUpDelay;
|
||||
BOOL m_bBuyOnBid1;
|
||||
BOOL m_bPutOption;
|
||||
|
||||
@@ -101,6 +121,12 @@ private:
|
||||
int m_iOrderNum;
|
||||
CTime m_BoughtT;
|
||||
|
||||
|
||||
vector<CP_UNITINFO> m_OrderList;
|
||||
vector<CP_UNITINFO> m_ConclusionList;
|
||||
vector<CP_UNITINFO> m_WindUpList;
|
||||
hash_map<string, CP_PRICEINFO> m_CurPriceList;
|
||||
|
||||
CpDib::IDibPtr m_pCpFConclusion;
|
||||
CEventHandlerDib m_EventHandlerDib;
|
||||
|
||||
@@ -114,12 +140,12 @@ private:
|
||||
void Unsubscribe(void);
|
||||
|
||||
void BuyThis(const string& Code, const float fBid1Price, const int iBid1Cnt, float afAskPrice[5]);
|
||||
void CorrectToCurrent(const string& Code);
|
||||
void SellThis(const string& Code);
|
||||
void WindUp(const string& Code);
|
||||
void CancelOrder(const string& Code);
|
||||
|
||||
inline void SwitchState(const CP_STATE enState);
|
||||
|
||||
void CPLog(const std::string fmt, ...);
|
||||
|
||||
|
||||
// winding-up 청산
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user