An automatic trading system have several layers as follows.
1. Real Time Market Scanner
2. Filtering ⇒ Pattern Recognition ⇒ Artificial Neural Network
3. Signal Generator
4. Order Execution
■Market Scanner : All transactions has to be monitored as they happen. This can be done by accessing DirectFN Database. I'm working on this and it seems like possible.
■Pattern Recognition/Artificial Neural Network : This is the brain of the system. I have made several posts about this in the past. Early identification of rallies is the main target.
■Signal Generator : Final authorization of Buy/Sell orders and fail safe system is implemented here.
■Order Execution : This is what all about this post
I've been working on various stages of this process for a long time.
As I thought the hardest part is accessing directfn(4 above), I started there.
It is not necessary to execute orders through DirectFN,
but as far as I know it is the only way available to retailers.
(CSE don't allow you to access their servers unless you are a broker)
Problem was DirectFN use an encrypted secure link to send/receive data to CSE.
It is there for a reason and should not hamper with that at all cost.
There are systems which give their API's to developers, but DirectFN don't do that.
API for IP brokers,
I'm pretty sure DirectFN is very much the same, but a lot of trial and error is needed to find that out and I don't have that much time.
This may not be the best way, but this is what I could come up with.
I used windows scripting to write this. (available to download here↓)
https://rapidshare.com/files/2313015938/AutoOrder.exe ★read though before downloading★
A word about the script,
Above program will not do any harm, I guarantee.
(Need some help to find out whether there are any compatibility issues)
Above program is designed to get input from ANN and execute those orders.
Since ANN is not there yet, I will try to place a demo order of NTB(100 shares at Rs.10/= )
What to do,
1. Open DirectFN
2. Click on DirectFN icon on Top Left
3. Go to options -> shortcut options
4. Scroll down to Trade and click on Buy (There is no default shortcut for buy command)
5. Create the shortcut as SHIFT + B
6. Click Assign -> Apply -> OK
7. Down load above program and double click to run it.
8. You will get a message "Proceed with Order Buy 100 shares of NTB.N0000 at Limit Price of 10.00"
9. Click No and close the New order dialog box. Even if you click Yes, that won't do any harm.
(You should be damn lucky to buy NTB at 10 )
If possible give me a feed back, I want to know
OS : Windows XP/7 etc
System : 32/64 bit
Progress : Whether you got the order confirmation dialog box.
Symbol : Sometimes it try to buy ASHA.N0000 instead of NTB.N0000
I tested AutoOrder in a Windows7 64bit system and it worked 98% of the time.
Thanks in advance and your comments/thoughts are always welcome.
Also if somebody knows about DirectFN API, please share.
(They give it to some universities)