Git Product home page Git Product logo

autotrading's Introduction

AutoTrading

I'm refactoring my old AutoTrding project and open source it.

If you are looking for a profitable stock trading strategy. Unfortunately, you won't find it in here, because I don't have one. But we can work together to find one.

This project coded by c#, working in multi thread, monitoring and analysis real time marketing data from Interactive Brokers API. It can automatically place trade order by designed trading strategy. It also includes back testing function.

How to use it?

First you need create your strategy class. Then you need to register your strategy in Client.cs as following

        public static void RunStrategy()
        {
            Strategy strategy;

            strategy = new StrategySample();
            StrategyList.Add(strategy.name, strategy);
        }

You can register multiple strategy at here.

You own strategy manage a virtual account, this account include cash value and stock hold size, these information stored in a csv file.

It inherit from abstract class Strategy, in your own strategy class you need create contract(the stock) first, then you can add different bars and indicators to it.

In Decision() method you can use all attached bars and indicators with real time market data, these will help you to make trading decision and place trade order.

The Decision() method will associate with Stock.AfterPriceUpdate event, every time after the stock price be updated then it will trigger your Decision() method.

After Decision() method placed trade order, if order status be updated, it will trigger the Settle() method to update your virtual account data.

autotrading's People

Contributors

huhm1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

webclinic017

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.