Code Monkey home page Code Monkey logo

Comments (2)

medovarszki avatar medovarszki commented on May 28, 2024

Hey Paul! Wow, I'm really glad you find this idea interesting and are contributing to its refinement. I'll check your changes in detail in the following days and merge them back if you don't mind.

However, I'll keep the Trend Trading Strategy because it's an important example for understanding the core idea behind the concept.

from ibkrfacade.

paulmac avatar paulmac commented on May 28, 2024

Hi Mihaly, I am using IBKR facade as a library for my algo trading bot. Therefore I have not commited the skeleton, the initialise data etc. Therefore this branch does not run and can't be tested as is. I can add these artifacts after you have had a look. Again; I don't use ContractDetails nor ContractSamples. I use a SimpleContract redis-om json object :

import com.ib.client.Contract;
@DaTa
@builder
@document
public class SimpleContract {
@id
@indexed
private String id; // ULID
@nonnull
@indexed
private Integer conid;
@nonnull
@indexed
private String symbol; // ("EUR");
@nonnull
@indexed
private Types.SecType secType; // e.g "CFD";
@nonnull
@indexed
private String currency;
private String exchange;

public Contract toContract() {
    Contract con = new Contract();
    con.secType(this.secType.toString());
    con.symbol(this.symbol);
    con.currency(this.currency);
    con.exchange(this.exchange);
    return con;
}

}

I can place this in IBKR facade together with Option which makes sense IMHO

So an Option Contract becomes ....

public class SimpleContract {
@id
@indexed
private String id; // ULID
@nonnull
@indexed
private Integer conid;
private Option option
...
}

JSON allows for contained objects

from ibkrfacade.

Related Issues (2)

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.