good day to everyone.
i am working on developing a setup to trade options automated with interactive brokers' api and i could use a lot of advice. i have been doing some research into this matter and i now think that c# or python are programming languages that could allow me to create a fully automated algorithmic system to trade options.
i have used tradestation and ninjatrader to develop and backtest a number of strategies but it is impossible to trade options automated using these platforms. i understand that there are a number of free, open source trading platforms based on both c# and python so i won't have to create a platform from scratch by myself, i would just need to adapt my strategies to either of these programming languages. it is my understanding that ib's api works equally well with c#, python and others, so, i would choose the programming language to work with and the platform to trade with primarily based on which language could best allow me to "dynamically" adjust the contracts to be traded and which platform produced the best results.
the most important task for my strategies would be to select the options contracts to be traded based on the current price of the underlying stock and the current date. i imagine both c# and python are capable of doing this but it is impossible to accomplish with tradestation or ninjatrader. below is an example of what i have in mind:
i imagine that it is possible to have a strategy on c# or python that can intelligently select the instrument to trade from a variety of inputs and data but neither tradestation nor ninjatrader are capable of this. ¿is this correct for c# or python? ¿would any of these programming languages be the most recommendable for tasks like these? ¿and which of the free, open source platforms available (lean, stocksharp, others) would be the most recommendable?
very well, thanks, regards.
i am working on developing a setup to trade options automated with interactive brokers' api and i could use a lot of advice. i have been doing some research into this matter and i now think that c# or python are programming languages that could allow me to create a fully automated algorithmic system to trade options.
i have used tradestation and ninjatrader to develop and backtest a number of strategies but it is impossible to trade options automated using these platforms. i understand that there are a number of free, open source trading platforms based on both c# and python so i won't have to create a platform from scratch by myself, i would just need to adapt my strategies to either of these programming languages. it is my understanding that ib's api works equally well with c#, python and others, so, i would choose the programming language to work with and the platform to trade with primarily based on which language could best allow me to "dynamically" adjust the contracts to be traded and which platform produced the best results.
the most important task for my strategies would be to select the options contracts to be traded based on the current price of the underlying stock and the current date. i imagine both c# and python are capable of doing this but it is impossible to accomplish with tradestation or ninjatrader. below is an example of what i have in mind:
Code:
pseudo code for trend following strategies
- entry -
when nvda begins uptrend buy 1 nvda call with adaptive strike price and days to expiration at mid market limit
the nvda call should be selected automatically as (nvda)(expirationdate)c(strikeprice)
where expiration date can be an input or calculated a number of days (say two weeks) after the current date
c as this system would try to buy calls on uptrends and puts on downtrends
strikeprice should be the closest contract available above the price at close when the uptrend began plus an input of a number of points (close + 1, close + 2, etc)
- exit -
when nvda ends uptrend sell nvda call at mid market limit
//in the case of downtrends, the structure would be largely the same but the strike price would be the close minus the number of points
i imagine that it is possible to have a strategy on c# or python that can intelligently select the instrument to trade from a variety of inputs and data but neither tradestation nor ninjatrader are capable of this. ¿is this correct for c# or python? ¿would any of these programming languages be the most recommendable for tasks like these? ¿and which of the free, open source platforms available (lean, stocksharp, others) would be the most recommendable?
very well, thanks, regards.