This commit is contained in:
49
CPRobotDlg.h
49
CPRobotDlg.h
@@ -8,9 +8,30 @@
|
||||
#include "Trader.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
using std::ofstream;
|
||||
|
||||
struct CP_BUYINFO
|
||||
{
|
||||
string m_Code;
|
||||
int m_iBoughtTime;
|
||||
float m_fBoughtPrice;
|
||||
float m_fHighestPrice;
|
||||
|
||||
};
|
||||
|
||||
enum CP_STATE
|
||||
{
|
||||
CPS_WAIT=0,
|
||||
CPS_LOOKING,
|
||||
CPS_LOOKING_DEAL,
|
||||
CPS_BUYING,
|
||||
CPS_WAITING_SELL,
|
||||
CPS_SELLING
|
||||
};
|
||||
|
||||
// CCPRobotDlg 대화 상자
|
||||
class CCPRobotDlg : public CDialog, public IEventHandler
|
||||
@@ -50,6 +71,8 @@ protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
private:
|
||||
CP_STATE m_enState;
|
||||
|
||||
CListBox m_ResultList;
|
||||
|
||||
vector<string> m_OpCodeList;
|
||||
@@ -63,12 +86,32 @@ private:
|
||||
int m_iAmountSet;
|
||||
float m_fMinPriceSet;
|
||||
float m_fMaxPriceSet;
|
||||
int m_iSellTick;
|
||||
int m_iLossCutTick;
|
||||
int m_iTrailingTick;
|
||||
int m_iPlusTick;
|
||||
float m_fLossCutTick;
|
||||
float m_fTrailingTick;
|
||||
int m_iCancelDelay;
|
||||
BOOL m_bPutOption;
|
||||
|
||||
string m_CurCode;
|
||||
float m_fBoughtTick;
|
||||
float m_fHighestTick;
|
||||
float m_fCurTick;
|
||||
int m_iBoughtCnt;
|
||||
int m_iOrderNum;
|
||||
|
||||
ATOM m_IdKeyFxCall;
|
||||
ATOM m_IdKeyFxPut;
|
||||
|
||||
ofstream m_LogFile;
|
||||
|
||||
void Subscribe(void);
|
||||
void Unsubscribe(void);
|
||||
|
||||
void BuyThis(const string& Code, const float fBid1Price, const int iBid1Cnt, float afOfferPrice[5]);
|
||||
void CorrectToCurrent(const string& Code);
|
||||
|
||||
void CPLog(const std::string fmt, ...);
|
||||
|
||||
public:
|
||||
afx_msg void OnHotKey(UINT nHotKeyId, UINT nKey1, UINT nKey2);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user