Hiya, If I want to implement Algorithmic trading with IB broker, what approach have the highest performance and best of the best accuracy and lowest latency, and overall best results regarding: 1- If a single Algorithmic trading language is used to achieve the results, and what is that? 2- If a combination of few programming languages is used to achieve the results and what are these? 3- If a Technical analysis and Trading platform connected to the IB and the Algorithmic trading code is developed and run by that Algorithmic trading programming language and code compiled, and executed by that language and platform, then orders send to the IB. If this method is used, what is the best of the best Technical analysis and trading platform to develop the Algorithmic trading code and send the orders through it to the IB to execute the orders? 4- What are the other low latency and high-performance Algorithmic trading approaches to be used on IB broker? Tnx and best of luck
Obviously, C++, Java, and C# are the fastest. The best choices if writing everything from scratch are (IMO) Java, C#, and Python. Things to consider: Java and C# are crazy fast, you probably don't need this. You can run thousands of systems, processing every trade/bid-ask change, and only use a small percentage of CPU on an old machine. If you want to use the Python libraries, Python is the obvious choice. If you don't know why you don't want to use Python and its libraries, then you should probably use Python. If you find a trading platform that uses one of these languages then you may want to use the same language. If I was a C# programmer I might use C#. If I were a Python programmer I might use Python. Python is a non-starter for me. Some of you will know why others are fine with Python. I use Java. If I were starting today I would use either Java15 or Kotlin (another JVM language) with the Akka library. If you're not a programmer you may want to use Python and cobble something together with the many libraries and example code available.
IB is not a really a low-latency platform. You can expect to work in milliseconds. If you want low-latency you have to pay for a cage at the exchange. The best you can do with IB is pay them to run your algos on their servers. Then you'll get better execution times--but you'll still be slower than anyone with a cage. Also, are you planning on paying for a private line, or connecting over the Internet? If you're connecting to IB through your ISP then forget about LL. The language doesn't matter. Use what you know best. If you're learning start with Python. If you had a cage at the exchange and needed to beat others with cages to some alpha, then you'll need the speed of C.
Hiya @dholliday I'd like Java but there aren't any materials on the internet about algorithmic trading with IB on Java, thus I can't progress. Would you mind sharing information on how shall I algorithmic trading programming with Java, please? I mean I want the programming development part and not the strategy? And I want to use Java with IB broker, please? I want to be able to see the candlesticks and markup my entry and exit on the candlestick chart and if possible, the chart shows my total analysis and chart items to highlight the candles and draw the lines, while alongside trading my posiions. How can I do this with Java on IB? May please advise me? What SDK are you using for Java and how do you configure it for fast execution, please? How do you tune the performance of the order execution based on your strategy on Java, please? Is your strategy if its TA based or does it have sentiment analysis too? And if you have sentiment analysis, how do you implement sentiment analysis on the Java programming on IB, please? Do you think you may able to modify the IB's SDK as a basic Moving-average that draws on a candlestick window and then places orders on the Moving-average cross etc and highlight the candles on the chart alongside the drawing Moving-average on the chart and highlighting candles place that is selected as entry and exit on the chart to show the precise entry as an example to help me progress in this? I don't think if you are an expert Java and algorithmic trading developer, it takes more than 15-minute of your time overall it's like a hobby developing? I'm sorry if you think this is too much to ask I apologize. I'll do it myself but this will take a while for me. ? Tnx and best of luck
Hiya @kmiklas Do you mean IB's server that runs the remote algorithmic tradings are slower than Servers in the exchange? And by the 'cage' do you referring to these servers at the exchange? As per my knowledge, and in my opinion, the IB like every broker does have a server at the exchange and their servers will be the same as these whatever you may call it 'cage'? I don't know if the IB does offer these LL in all the countries as I don't know if it exists in Luxembourg, Switzerland? My preferences in Java, but I'm trying to decide if I use Python on TWS-API will it be faster and more capable than using Ninjatrader-8 connected to IB TWS-API and I code everything on C# on Ninjatrader-8? Thus I need to compare these two option for the things that I wouldn't be able to do in Java algorithmic trading to IB by TWS-API? This is an important decision and I need to have the best consultation with Ninjatrader-8 users who done the algorithmic trading with IB through the Ninjatrader-8 platform. Honestly, I prefer using Ninjatrader-8 for algorithmic trading with IB, but I'm worried if the native Python TWS-API can be a more robust option as Ninjarader-8 may encounter lag and disconnect or orders may send through Ninjatrader-8 does not submit or executed by TWS, and I don't know how to verify the orders that placed by Ninjatrader-8 to be sure they are accurately done on the TWS side? Tnx and best of luck
- Basically all the retail stuff is very slow. Even if your algo is running in nanoseconds, with a high-speed data feed, the communication to the IB server is in milliseconds, and your orders are generally last in line. - I think that if you want higher speeds and LL you have to sign up for their FIX CTCI service. Check this link: https://www.tradersinsight.news/ibkr-quant-news/ibkr-fix-ctci/ - You can do algorithmic trading, just not low latency trading. Low-latency setups are expensive! - So, if you know Java, use Java. It won't make any real difference, because your network and the IB OMS will take seconds to process it anyay. - By "cage" I mean co-located servers, commonly called "colo" or "in colo." These your servers running at the exchange. You lease a little 4x4 "cage," with different hook-ups, and put your stuff in there.
"""What is the most successful approach to do Algorithmic trading with IB(mostly FX margin account)?""" Define "successful" in this context? Fastest to market? Most profitable? (if so, you're asking the wrong question) Most elegant? Most internet points when you show off your completed work? Also, you're asking about 'the right tool' without giving us an idea of your objectives.. how will you be trading? How often? What types of tech (stats models, approaches like ML or AI, massively parallel workflows, etc..) are you planning on using now? What tech do you want to experiment with in the future? How do you see yourself growing over the next 2-3 years? Aside from that, more often than not for a home based algo trader, the answer leans heavily on the tech you know and are efficient in using.
if you talking about HFT, unless you have 10s of millions (actually a lot more but let’s say this) you are dead on arrival. if other type of trading, I would not tie myself to IB. Develop in broker neutral platform, and use to to connect to any broker. We developed all our Algos in c# and using NinjaTrader. We used to trade with IB but due to stupid daily reset had to migrate to another broker. We just connected and code continues to work seamlessly. Good luck. P.S. nice avatar, doubt it is real, but nice
InteractiveBrokers has documentation on how to use their Java API. https://interactivebrokers.github.io/tws-api/introduction.html
Hiya @kmiklas Thanks. By: Could you elaborate on who are the first ones before me? My goal is to develop a Robot that can manage orders by FIX API in the first place, but the reason I use the TWS-API or {platform-based}-API is its the first step of developing this Robot and for the FX margin trading? I develop a modular trading Robot that is low-latency by nature of programming and data structure and performance management and optimization, but for the lowering the latency in the routing and hardware specifications, when required to rent a dedicated server near to IB servers or near to exchange, I will rent a server with high-spec there? By the way as my intention of developing leveraged FX trading Robot is to run on FX market, which exchange location do you referring to while speaking of lowering distance to the exchange location? Considering my Robot will be trading Spot-FX on financial markets, these financial markets are decentralized by nature. MAybe CFD FX trading is centralized in some levels or the Futures market is centralized in some levels or Spread-betting markets is centralized in some levels, but are you sure these Spot-FX markets can gain a low latency advantage by being in proximity location to some specific big-exchange locations? If yes, could you please provide a technical reference for this as I'm personally thinking that being in close proximity to the IB server is providing the lowest latency for me and not the actual exchange as the IB(any clearing broker) is the one who matches the buy and sells orders in the IB server, thus this trade is not routed outside of the IB as this future for order routing is for Stock, Options, Bonds, etc and does not apply to the Spot-FX market? Also, I have doubt if it can be applicable to Gold and Silver too, as the Spot-FX and Gol and Silver contract and order matching is done on the IB platform not on the exchange, as there is no routing for Spot-FX trades, or if there are order routing options available, there are not giving better fill than what I get when trades match in the IB servers? Can someone professional and insightful comment on this topic of server proximity location for Spot-FX trading with IB be calculated to IB's servers or the big-exchanges e.g. Eurex? In case if my Robot only trading Spot-FX Major pairs on leverage? @def Tnx and best of luck