Giter Site home page Giter Site logo

kw_condition's Introduction

사용상 부주의로 인한 책임은 사용자에게 있습니다

kw_condition

  • 키움 오픈 API + PyQt5 를 사용하여 console 형식으로 주식 매매를 자동으로 수행하는 프로그램
  • 키움증권의 조건 검색 기능을 이용하여 조건 검색에 해당하는 종목리스트를 얻어와 매매 수행
  • 추가 매수 기능 추가(추가 매수 수량 조절가능, 익절/손절 퍼센티지 조절 가능)
  • 엑셀로 거래 내역 저장 기능 추가
  • 키움증권 조건검색 사용 가이드

개발 환경

참고 소스

실행방법

 > python main.py 

사용방법

  1. 사용자가 설정한 조건식을 시간마다 활성화 시키기 위해서는
    • onTimerSystemTimeout 함수 참고
  2. 조건식에 만족하는 리스트의 매수할지 안할지 선택은?
    • determineBuyProcessStateEntered 함수 참고
      • 위 함수는 매입 종목 + 조건식 만족하는 종목 수 만큼 루프를 돌며 한종목당 주기는 20msec 임
  3. 매입 종목의 매도할지 안할지 선택은?
    • processStopLoss 함수 참고
      • 위 함수는 실시간 체결정보를 받을 때마다 매번 실행 됨

main.py 내의 변수 설정 내용

AUTO_TRADING_OPERATION_TIME = [ [ [8, 50], [15, 19] ] ] # 8시 50분에 동작해서 15시 19분에 자동 매수/매도 정지/ 매도호가 정보의 경우 동시호가 시간에도 올라오므로 주의

MAESU_UNIT = 100000 # 추가 매수 기본 단위

BUNHAL_MAESU_LIMIT = 5 # 분할 매수 횟수 제한

MAX_STOCK_POSSESION_COUNT = 3 # 제외 종목 리스트 불포함한 최대 종목 보유 수

BASIC_STOP_LOSS_PERCENT = -0.6 # 종목 전체 적용되는 stoploss

EXCEPTION_LIST = [''] # 장기 보유 종목 번호 리스트 ex) EXCEPTION_LIST = ['034220']

StateMachine 정의

alt tag

kw_condition's People

Contributors

coreanq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.