PureBytes Links
Trading Reference Links
|
Dingo and Ed, these last two replies from Ed have shown me that Ed and I are really interested in the same thing, an easy way to create Interactive Brokers basket orders.
By the way Dingo, I noticed that you are subscribed to our AmibrokerNT usergroup here in Dallas. Too Bad you are too far away to attend. At last night's meeting, Vince Heiker did a presentation on Keltner channels. Vince is friends with some the big names, Larry Williams, and others in the business.
If you do proceed with designing an automated basket trading script, or whatever it is called, I would appreciate it if you would design it with the flexibility to also work with my way of trading.
I have not yet studied exactly how the Interactive Basket system works.
In my way of trading, I just load the basket
one evening, and buy everything on the open the next morning, regardless. I also create a sell basket, and sell the entire basket on the open the next morning as well.
If I get bad fills, so be it. I have read some discussions of other traders who buy MOO orders, and by and large, they like it.
BTW, my system is simple, I eyeball the charts that showup in the explorations, and place some of then in the IB MOO basket.
I then look at the charts of my existing positions, and place some of them in an IB Sell On The Open basket. Later Ron D
----- Original Message -----
From: ed nl
To: amibroker@xxxxxxxxxxxxxxx
Sent: Friday, September 10, 2004 11:25 AM
Subject: Re: [amibroker] creating a basket order file
hi Dingo,
yes I have a system. It would just be very convenient if I could export the trades that need to be sent to the the exchange to a file.
So your pointers would be very welcome,
rgds, Ed
----- Original Message -----
From: dingo
To: amibroker@xxxxxxxxxxxxxxx
Sent: Friday, September 10, 2004 6:20 PM
Subject: RE: [amibroker] creating a basket order file
do you have a system you've tested and trying to trade? If not then maybe
you need to concentrate on that before you spend a lot of time on this part.
If you do then I can probably give you some guidance/pointers/whatever.
d
_____
From: ed nl [mailto:ed2000nl@xxxxxxx]
Sent: Friday, September 10, 2004 11:19 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] creating a basket order file
hi,
I am still working on the making of a file that contains order lines for
Interactive Brokers "basket" trading. I have been playing with a test system
in AFL (see result below). But the problem still is that I want to know
exactly what to sell and how many. Also I have problems starting a "fresh"
file for each new backtest. But I am afraid that with only using AFL it is
not possible to make this file.
I guess the solution is to use scripting and create data objects and derive
the info from them. In the archives there is some stuff I found and maybe if
I plough real deep something will surface ..... but could somebody direct me
how to best learn to use this scripting. There is some in the manual but if
there is some other place to learn this please let me know (especially about
which objects and methods that can be used).
rgds, Ed
function
order_func(Buy,Sell,Short,Cover,buyLimit,shortLimit,stop_long,stop_Short) {
filepath = "C:\\IBorders\\order.txt";
orderLine =
WriteIf(LastValue(Buy) != 0,"BUY",
WriteIf(LastValue(Short) != 0,"SHORT",
WriteIf(LastValue(Sell) != 0,"SELL",
WriteIf(LastValue(Cover) != 0,"COVER",""))))
+
", "
+
Name()
+
", "
+
"STK"
+
", "
+
"SMART"
+
", "
+
"LMT"
+
", "
+
WriteIf(LastValue(Buy) != 0,NumToStr( LastValue(buyLimit), format = 1.2),
WriteIf(LastValue(Short) != 0,NumToStr( LastValue(shortLimit), format =
1.2),
WriteIf(LastValue(Sell) != 0,NumToStr( LastValue(stop_long), format = 1.2),
WriteIf(LastValue(Cover) != 0,NumToStr( LastValue(stop_short), format =
1.2),""))))
+"\n";
fileischanged = 0;
if (LastValue(Buy) != 0 OR LastValue(Short) != 0 OR LastValue(Sell) != 0 OR
LastValue(Cover) != 0) {
if (fileischanged = 0) {
filehandle = fopen(filepath, "w");
fputs(orderLine, filehandle);
fclose(filehandle);
fileischanged=1;
} else if (fileischanged = 1) {
filehandle = fopen(filepath, "a");
fputs(orderLine, filehandle);
fclose(filehandle);
}
}
}
//fdelete("C:\\IBorders\\order.txt");
SetOption("MaxOpenPositions", 50 );
PositionSize = -15;
SetTradeDelays(0,0,0,0);
sk = StochK(8);
Buy = sk < 30;
BuyPrice = O;
Short = sk > 70;
ShortPrice = O;
Sell = 0;
Cover = 0;
ApplyStop( stopTypeNBar,stopModeBars,1,ExitAtStop = 1,Volatile = False,
ReentryDelay = 1 );
SellPrice = C;
CoverPrice = C;
Equity(1);
PositionScore = 50 - StochK(8);
Filter = (PositionScore AND Buy);
order_func(Buy,Sell,Short,Cover,BuyPrice,ShortPrice,SellPrice,CoverPrice);
[Non-text portions of this message have been removed]
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=1292h5rr5/M=295196.4901138.6071305.3001176/D=gr
oups/S=1705632198:HM/EXP=1094915973/A=2128215/R=0/SIG=10se96mf6/*http://comp
anion.yahoo.com> click here
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=
:HM/A=2128215/rand=128831960>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
* To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
b.. To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.757 / Virus Database: 507 - Release Date: 9/9/2004
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|