コード例 #1
0
ファイル: MA_5.cs プロジェクト: segara/singijeon
 public void Init(AxKHOpenAPILib.AxKHOpenAPI _axKHOpenAPI1, double percent)
 {
     axKHOpenAPI1 = _axKHOpenAPI1;
     screenNumber = Form1.GetScreenNum().ToString();
     axKHOpenAPI1.OnReceiveTrData += AxKHOpenAPI_OnReceiveTrData;
     MA_PERCENT = percent;
     init       = true;
 }
コード例 #2
0
 public void runReceiveTrData(AxKHOpenAPILib.AxKHOpenAPI axKHOpenAPI, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveTrDataEvent e)
 {
     if (IgnoreReceiveTrData(e.sTrCode) == false)
     {
         ReceiveTrData rt = getReceiveTrData(e.sTrCode);
         rt.ReceivedData(axKHOpenAPI, e);
     }
 }
コード例 #3
0
 public StockDataCollector(AxKHOpenAPILib.AxKHOpenAPI api)
 {
     this.proxy        = new KiwoomApiProxy(api);
     this.kiWoomApi    = api;
     this.dbController = new DatabaseController();
     this.kiWoomApi.OnReceiveTrData += this.onReceiveKiwoomApiEvent;
     this.collectorStatus            = STATUS_READY;
 }
コード例 #4
0
        public void runReceiveRealData(AxKHOpenAPILib.AxKHOpenAPI axKHOpenAPI, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveRealDataEvent e)
        {
            ReceiveRealData rt = getReceiveRealData(e.sRealType);

            if (rt != null)
            {
                rt.ReceivedData(axKHOpenAPI, e);
            }
        }
コード例 #5
0
        public void runReceiveChejanData(AxKHOpenAPILib.AxKHOpenAPI axKHOpenAPI, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveChejanDataEvent e)
        {
            ReceiveChejanData rt = getReceiveChejanData(e.sGubun.Trim(), axKHOpenAPI.GetChejanData(913).ToString().Trim());

            if (rt != null)
            {
                rt.ReceivedData(axKHOpenAPI, e);
            }
        }
コード例 #6
0
        public void setup(StockBotDlg StockBot)
        {
            StockBot_  = StockBot;
            khOpenApi_ = StockBot_.openApi();
            khOpenApi_.CreateControl();

            receivePoolLock_ = new object();
            tradingPoolLock_ = new object();

            statmentOrderPool_ = new ConcurrentQueue <StockStatement>();

            // 런 함수를 쓰레드로 계속 돌려 줍니다.
            thread_ = new Thread(this.run);
            thread_.Start();
        }
コード例 #7
0
ファイル: Form3.cs プロジェクト: segara/singijeon
        public Form3(AxKHOpenAPILib.AxKHOpenAPI _axKHOpenAPI1)
        {
            screenNumber = Form1.GetScreenNum().ToString();

            axKHOpenAPI1 = _axKHOpenAPI1;
            InitializeComponent();

            candleChart.Series["StockCandle"].CustomProperties = "PriceDownColor=Blue,PriceUpColor=Red";

            maSeries           = new Series("SMA");
            maSeries.ChartType = SeriesChartType.Line;

            maSeries_EvelopeDown           = new Series("SMA_DOWN");
            maSeries_EvelopeDown.ChartType = SeriesChartType.Line;
            maSeries_EvelopeDown.Color     = Color.Black;

            maSeriesShort           = new Series("SMA_SHORT");
            maSeriesShort.ChartType = SeriesChartType.Line;

            vwmaSeriesShort           = new Series("VWMA_SHORT");
            vwmaSeriesShort.ChartType = SeriesChartType.Line;

            axKHOpenAPI1.OnReceiveTrData += AxKHOpenAPI_OnReceiveTrData;
            candleChart.AxisViewChanged  += Chart_AxisViewChanged;

            //newTimer = new TimerJob();
            //newTimer.StartWork(1000 * 60 * 5, delegate () {
            //    if (btn.InvokeRequired)
            //    {
            //        btn.Invoke(new MethodInvoker(delegate ()
            //        {
            //            btn.PerformClick();
            //        }));
            //    }
            //    else
            //    {
            //        btn.PerformClick();
            //    }

            //});

            this.FormClosing += Form_FormClosing;
        }
コード例 #8
0
ファイル: Form2.cs プロジェクト: segara/singijeon
        public Form2(AxKHOpenAPILib.AxKHOpenAPI _axKHOpenAPI1)
        {
            InitializeComponent();
            LogListBox.DrawItem        += LogListBox_DrawItem;
            warningLogListBox.DrawItem += WarningLogListBox_DrawItem;
            coreEngine = CoreEngine.GetInstance();
            coreEngine.OnReceivedLogMessage        += OnReceiveLogMessage;
            coreEngine.OnReceivedLogWarningMessage += OnReceiveLogWarningMessage;
            coreEngine.OnReceivedLogErrorMessage   += OnReceiveLogErrorMessage;
            axKHOpenAPI1 = _axKHOpenAPI1;
            axKHOpenAPI1.OnReceiveTrData += AxKHOpenAPI_OnReceiveTrData;

            this.FormClosing += Form_FormClosing;

            logMessage = coreEngine.logMessage;

            setting.Load();
            profit_label.Text = string.Format("{0:n0}", curProfit);
            Start();
        }
コード例 #9
0
 public KiwoomApiProxy(AxKHOpenAPILib.AxKHOpenAPI api)
 {
     this.kiWoomApi = api;
 }
コード例 #10
0
ファイル: Chjan.cs プロジェクト: bluetiger20/SimSimStock
 public Chjan(AxKHOpenAPILib.AxKHOpenAPI axKHOpenAPI)
 {
     this.axKHOpenAPI = axKHOpenAPI;
     this.axKHOpenAPI.OnReceiveTrData += AxKHOpenAPI_OnReceiveTrData;
     this.axKHOpenAPI.OnReceiveTrData += AxKHOpenAPI_OnReceiveTrData1;
 }
コード例 #11
0
 public abstract int Run(AxKHOpenAPILib.AxKHOpenAPI axKHOpenAPI, SpellOpt spell);
コード例 #12
0
 public abstract void ReceivedData(AxKHOpenAPILib.AxKHOpenAPI axKHOpenAPI, AxKHOpenAPILib._DKHOpenAPIEvents_OnReceiveTrDataEvent e);
コード例 #13
0
ファイル: SaveLoadManager.cs プロジェクト: segara/singijeon
 public void SetForm(Form1 _form, AxKHOpenAPILib.AxKHOpenAPI api)
 {
     form         = _form;
     axKHOpenAPI1 = api;
 }
コード例 #14
0
 public LoginClass(AxKHOpenAPILib.AxKHOpenAPI axKHOpenAPI)
 {
     this.axKHOpenAPI = axKHOpenAPI;
     Login();
 }
コード例 #15
0
ファイル: APIManager.cs プロジェクト: kim2509/stockManager
 public APIManager(AxKHOpenAPILib.AxKHOpenAPI api)
 {
     OpenAPI = api;
 }
コード例 #16
0
 public KHConnector(AxKHOpenAPILib.AxKHOpenAPI conn)
 {
     instance      = new KHConnector();
     instance.conn = conn;
 }
コード例 #17
0
ファイル: API.cs プロジェクト: racingslab/Kiwoom-2
 public void setup_(Form1 form)
 {
     openAPI = form.open();
 }
コード例 #18
0
ファイル: CheckMaUp.cs プロジェクト: segara/singijeon
 public CheckMaUp(AxKHOpenAPILib.AxKHOpenAPI _axKHOpenAPI1)
 {
     axKHOpenAPI1 = _axKHOpenAPI1;
     axKHOpenAPI1.OnReceiveTrData += AxKHOpenAPI_OnReceiveTrData;
 }