Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I can relate to your problem because I ran into it on a strat that had limit orders placed a bit in advance and got that ugly error message when price moved fast in thin markets shutting the strat down. But since my profit targets were larger than yours, I didn't mind taking a couple of buffer ticks to get a fill. Two ticks wasn't going to be the difference in whether it was profitable or not, since it traded about twice a day.
traderwerks - do you mean call setstoploss() function and then enterlimitlong() function for example at a price above the current ask? Could you share a code sample if you don't mind so I understand your statement better. Thanks!
Use the OnMarketData call to get the incoming price and then send the order. Also help ful if you want to trigger off the bid/ask instead of last. There is code on the web if you Google for it.
I am still in the strategy development phase and I have not yet found a strategy that I feel comfortable enough automating and letting it run on its own. However, I don't use NinjaTrader and built some of my own charting tools based on JFreeChart (java library for graphics, MyDoggy (Java Window Manager), and everything runs inside RapidMiner (#1 open source datamining platform by KDNuggets). It handles real-time data, but I'm mostly using it to look at historical data in search for a profitable strategy. Main reason that I went with a completely custom solution is because I didn't want to be limited with visualization. Secondary is because and I don't know how Ninja handles the data. It makes some great candlestick charts and pretty indicators, but I also use Linux and Ninja doesn't run too well in WINE. That said, I am surprised your friend built an HFT system on Java. I have not had any performance issues with Java, but the garbage collector / virtual machine do add some performance overhead. I really like Java and it's my favorite programming language, haven't really used C# too much (again, Linux), but it's probably very similar.