[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] IB Auto-Trading AFL code



PureBytes Links

Trading Reference Links









There seems to be a renewed interest in using Amibroker with automatic
trade execution lately, which is why I am posting the following.

 

I bought DynaOrder a couple of months ago and was trying to integrate
it with AB for awhile before I won a free copy of software similar to AB, and switched
to using it to trade my strategies in real time instead.

 

I did however spend considerable time trying to tie together AB and DynaOrder,
and I figure why let that go to waste.  I have attached to this message
the code that I was working on, which could form a basic structure to integrate
the two.  You need to plot it as an indicator so it will then be refreshed
continuously based on what you have your Realtime Chart Refresh Interval set to
in preferences.

 

It is far from complete, and suffers from a bug which causes it to continuously
fire new orders to DynaOrder.  If anyone wishes to use it they will have
to figure out a way to set a flag to ignore any additional orders once the
first is received.  I thought I could store the Date/Time of the current
bar when a signal is issued as a global variable in DynaOrder and then compare
any new signals issued to it.  By ignoring the same Date/Time you would
only fire once per minute if using 1 min data.  Anyway, I never got around
to doing it, because the other software worked out of the box and it was easier
for me to just my switch my trading system over for execution.

 

By the way, I wrote the enclosed code before loops and if/then
structures were available in AB.  It is therefore written in Jscript, and
I've tried to use functions wherever possible to simply following the flow of the
code.  I also code in C++ so Jscript was just easier for me.  :)

 

Please be aware that I can't support this code, and neither should
Tomasz, as it is using a third-party application of which he has no experience
with.  So, please don't ask Tomasz or myself to help you get this working. 
I’m just offering it up in the hopes that it might save some others some
time.

 

Good luck to those that decide to take up the challenge!

 

Daniel

 










Yahoo! Groups Sponsor












Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





Attachment:
AutoTrader_v2.0.afl

Attachment: Description: "Description: Binary data"