Hi, I would be curious to hear what kind of software/hardware setups people use for their algo trading, to get some ideas how to improve mine. I believe many retail traders use existing software platforms like MetaTrader? Do people develop their own proprietary systems and can you tell some details? What made you develop your own system? Also, what kind of hardware setups do you have (e.g. run on your local PC or VPS, use server farms)? I have extensive background in C++ software development and high-performance computing, so I was naturally drawn to algo trading. Few months ago I started to develop a new algo day trading platform for personal use with C++ and IBKR TWS API + Flutter/Dart. I’m still testing & developing the platform on paper account but can hopefully roll it to my live account in not-so-distant future and start trading a small amount of real capital. The platform has a “server” which is a headless C++ application (i.e. a console app without UI) that can run on my home PC or on a VPS somewhere. The server does live trading with the algos I can write in C++, but does also parameter optimization, backtesting, fetching latest historical data from IB servers and portfolio generation & backtesting. There’s also a “viewer” app (Flutter/Dart app) that has a GUI and remotely connects to the C++ server to monitor live trading. Below is a screenshot how it looks currently. The viewer can run on desktop or mobile, which is nice to be also able to monitor the live trading while not at home. By design the viewer has minimal user interaction with the server to avoid manual meddling with the algo trading. One interesting bit is the powerful parameter optimizer which I believe provides some unique opportunities. For the algo development it’s useful to be able to iterate quickly and test algos with a large dataset. For comparison I implemented the same strategy on MetaTrader5, which runs 100x faster on my platform so that’s quite nice, and I have some plans for further improvements.
Looks great! I have used Tickblaze (which is great) in the past but have considered rolling my own in Rust to improve my Rust skills. What instruments/time frames are you trading?
Hi @fan27, Tickblaze looks nice, will get some good ideas from there I haven't used Rust but have heard some good things about it. What makes you implement your own system? I'm currently day trading only stocks, but the plan is to expand to other instruments in the future once the platform matures a bit.
Before asking such a question could you tell here little bit yourself what is your (overall) strategy for daytrading stocks ? Do you get plenty of leverage too, do you trade over a prop firm ? Otherwise I do not know whether you are new trader or already professional living solely from trading for years.
Compared to your setup is mine very simple. I use IB and their API (Java). I run my Java software on a home mini PC (Intel NUC) with a UPS to overcome short power interruptions if there are any. The NUC's power consumption is very low, so the UPS can "keep it alive" longer, up to a few hours. All relevant files (log files, CSV data files) are written to a Dropbox account so that I can see them on my desktop PC, or on my iPad while traveling. My software is sending me warning emails in case something happens that needs my attention. I start this setup on Sunday evening, then let it run the entire week, and switch it off the following weekend as IB disconnects automatically on Friday evening US time.
I started out with Metatrader 5. No experience in programming, although i can understand the flow of it (took intro C++ back in college lol). Hired few freelancers to develop my strategy. Months of headaches and failures. After 4 developers, finally got a decent working bot. I host the platform on a vps in Chicago. Few months into it I noticed that maybe about <5% of the time either the OHLC doesn't match what's printed on CME (using tradingview prices), especially during the early RTH. I was paranoid and decided to switch over to Quantower. Had one developer who coded it as an "indicator" that can take signals. Encountered intermittent issues with naked orders/positions. Gave up on that after few months. Went back to MT5. Refined the bot with the last developer. Had one error that can't be explained. At this point I accepted the fact that my bot will never be perfect. I signed up with a udemy course to learn MQL. Stopped after 6 lessons. That shit is boring as hell. I'm realizing I just don't have the motivation to learn the language which is not good on my part. Anyway, that's my algo trading journey. My strategy is basically scalping the opening range with bits of my own flair built into it. Main goal is to just capture consistent return daily. I did read few published studies on OR trading and I feel like there's something to this approach. Backtests (2019-2022) had 1 "risk of ruin" event happend (lost aobut 20%), and so far 2023 looks consistent in live trading.
Sounds good. The motivation for rolling my own platform would be to translate that experience/skills into a job opportunity.
Power interruptions are the main reason for me to think of running the live trading on VPS (and stable internet and hopefully lower internet latency to reduce slippage). The interruptions are pretty common here where I live. I run my software currently on a laptop which survives the interruptions, but the internet goes out too because my router is connected to the grid + I don't know what other out-of-my-control components rely on the grid too even if I would put the router behind UPS. I have built "quick restart" functionality to my trading software so that if the compute goes down or the software crashes or I have to terminate it for whatever reason, I can then quite quickly restart it. This fetches the current positions from the IB server but caches the real-time bar data locally (which is slow to fetch from IB servers) and then gets the internal trading state up-to-date so it can continue trading from where it left off.
I agree with you that there is only so much you can do with your own power backup. There might always be a piece of hardware out of your reach which is still affected by a power outage. In my case I only want to prevent the computer from crashing (hardware and software) and accept that internet connectivity might get lost. But that's a choice that each should make for himself. And might depend on the style of trading you do. I don't think there is a general rule of thumb available for that.
C++ for sure isn't the easiest language to get started with, lol. I was thinking the other day that if I was to make my platform available to others, I would add ability to define custom trading strategies without need for programming knowledge. And not just combining existing high-level indicators but have the same expression power as programmers. I currently work in an industry where this is achieved with specific tools for technical non-programmers. Did you choose Chicago VPS for a specific reason? I have been contemplating running my trading software on VPS to reduce internet latency to IB servers/exchange. It seems the real-time bar data from IB servers can also have some weird anomalies, e.g. the open price for 5sec bars can jump up and down even though it should really be fixed when a new bar starts. I have yet to debug this, but I suspect it may be related to if there has been no trades for a bar and IB servers just send bid/ask data instead, but not sure.