Discussion in 'Automated Trading' started by bradypreston, Nov 25, 2007.
Does anyone know of a platform that can automate a trading system on the SP 500.
complete automation is very elusive. the problem is how to handle split fills and fills that are not the same as the system thought it got etc. there are so many problems its unreal. it can be done but the money made would have to warrant such and effort.
Theres plenty of software out there to automate trading strategies. Ninja trader is an excellent exemple and you can code strategies directly into it using the C++ programming language. We automated several strategies using esignal scripts that were sending commands to ninja trader to execute the trades.
in order to ease the task, i suggest you base your strategy as much as possible on indicators rather than visual stuff. visual stuff like pattern recognition can be extremely hard to implement unless you have really extensive knowledge of the programming language your platform uses.
if your strategy uses indicators, like resistance points, emas, channels, bands, etc etc its will be much easier to automate.
You mean C#.
I'm interested to know by which means you were able to get the esignal software to communicate with Ninjatrader?
its pretty easy actually, 1st you need to copy the NTDIRECT.DLL file from the /ninjatrader 6/bin folder to your esignal folder. You then enable the AT interface in the ninja trader control center ''file'' menu.
once that is done, there are commands you can put in your esignal .EFS file. there is an extensive explaination on the ninja trader's website.
( look at esignal integration under the ''autotated trading'' section)
heres a couple exemple of the code you add to your esignal efs script.
--> int NTCancelAllOrders()
(Cancels all orders across all connections across all accounts)
--> int NTBuyMarket(string orderId, int quantity)
(Sends a buy market order.)
--> int NTBuyStop(string orderId, int quantity, double stopPrice)
(Sends a buy stop order.)
And this last exemple adresses Markbrown's worry about your autotrader not knowing which entry price it got
--> double NTAvgEntryPrice(string acccount)
(Gets the average entry price )
Order execution is extremely fast and reliable. As fast as if it was programmed directly into ninja trader. We programmed our stuff so it sends the order to NT first and then goes on with its calculations and updating the esignal chart. we have very good fills, very little slippage.
The problems you might experience are proportional to the programming skills you have, and the type of strategy you want to automate. like i mentioned before, if you trade 100% indicators, its very easy, you can easily program lets say a ''Macd crossover'' detector, use that as a entry, send the corresponding orders to Ninja trader, (i.e : buy market, set stop and targets using limit orders, etc) and watch your trade.
The hard part is programming stuff that you recognize visually, price pattern formations, candlestick stuff, gartleys ''M'' patterns, etc etc. Inevitably your recognition algorithm will pass on some ''legit'' ones (a setup that you would have taken if you were manually trading the system) and will get in on some ''bad'' ones that are not the setup you were looking for at all.
just as a example, a accurate price swing high low detector, which is very important to those trading Fibonacci stuff and Elliot waves, is very hard to make. there are a ton of them available on every platform, but none of them is totally accurate. However its very easy to look at the price chart and draw accurate high and lows. someone who uses fib extensions for targets rely on accurate high and low detection else their targets might be totally off.
that is why i suggest to people to want to fiddle with auto trading to create entries and exits using indicators (ema crossovers, price crossing a bollinger band, etc) and then play with their stop and target size and backtest the thing in ninja trader over as long as possible. you might be surprised how easy it is to obtain a system that pays a little even after commission. It will of course not be as good profit wise as a discretionary talented trader with 20 years of experience and you might not pull the millions immediately, but it can create some income.
The problem is not the programing. I have been doing that for 7 years. The problem is finding a platform that will autotrade the pit
you can automate a strategy on the sp500 using almost any software. pick one and do it then if you know how to code.
like the pit SP 500, or the electric night
Separate names with a comma.