PureBytes Links
Trading Reference Links
|
hello Ed,
Perhaps components of what you are trying to do are in the archives. If you
run a port backtest and get your next day trades that way you can export the
backtest results and read the last few lines with afl to get all the order
information you need. An Auto-Exporting script was covered during the last
year and I am almost certain that Dingo wrote a script that does this
automatically. Also, MrDavis also shared Ninja code that may contain
valuable ideas for the file creation process. You can also use custom code
to extract the top-score tickers to trade, this code was also posted a
couple of times.
I think it may be a little more complicated than you assume because AB does
not allow us to access many Portfolio variables through afl code. Perhaps
this will get more attention after the Auto-Order fill feature is
introduced.
btw, if i remember correctly, basket orders can not be auto-loaded in the
TWS...also basket orders cannot contain all order parameters, only a few
limited parameters are possible. I looked at it once as a interim way to get
an auto-forder fill function: it couldn't do what i needed. Also, again, if
i remember correctly, it creates a new basket page on each load, which means
it cannot be used for repeated order modification. I wrote to IB about some
of these things a long time ago but they replied they have no plans on
making big changes. I guess they expect people to use the API interface...
Sometimes I think that the best way for us to make success in trading is to
take a year off, go to school and learn to program DLLs and API stuff :-)
With regards to your needs, it might help if you listed the steps required
in a 1,2,3... format. I think everything you need was covered on the list at
one time or another.
best regards,
herman.
-----Original Message-----
From: ed nl [mailto:ed2000nl@xxxxxxx]
Sent: Thursday, September 09, 2004 12:31 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] creating a basket order file
hi Dingo,
for this system I use EOD data with a Buy delay of 1.
I think the data should somehow be extracted but I do not think it can be
done with AFL yet. Maybe with scripting but I wouldn't know how to do it,
rgds, Ed
----- Original Message -----
From: dingo
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, September 09, 2004 3:09 AM
Subject: RE: [amibroker] creating a basket order file
are you working with eod? what delay are you using?
d
_____
From: ed nl [mailto:ed2000nl@xxxxxxx]
Sent: Wednesday, September 08, 2004 5:57 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] creating a basket order file
hi Dingo,
yes I know these functions but how do I use them and tell them to output
what to buy and sell on the last day of the backtest. For instance the
simple system below. How do I create this particular output using these
functions?
rgds, Ed
// simple sys
SetOption("InitialEquity", 100000 );
SetOption("MaxOpenPositions", 4 );
PositionSize = -25;
SetTradeDelays(1,1,1,1);
Buy = Cross(RSI(14),30);
Short = Cross(70,RSI(14));
BuyPrice = O;
SellPrice = O;
Sell = 0;
Cover = 0;
ApplyStop( stopTypeNBar,stopModeBars,5,ExitAtStop = 1,Volatile = False,
ReentryDelay = 1 );
ShortPrice = O;
CoverPrice = O;
PositionScore = 50-StochK(14);
----- Original Message -----
From: dingo
To: amibroker@xxxxxxxxxxxxxxx
Sent: Wednesday, September 08, 2004 11:36 PM
Subject: RE: [amibroker] creating a basket order file
File Input/Output functions
* fclose
<mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fclose.ht
ml>
(File Input/Output functions) - close a file (AFL 2.5)
* feof
<mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/feof.html
>
(File Input/Output functions) - test for end-of-file (AFL 2.5)
* fgets
<mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fgets.htm
l>
(File Input/Output functions) - get a string from a file (AFL 2.5)
* fopen
<mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fopen.htm
l>
(File Input/Output functions) - open a file (AFL 2.5)
* fputs
<mk:@MSITStore:C:\Program%20Files\Amibroker\Broker.chm::/afl/fputs.htm
l>
(File Input/Output functions) - write a string to a file (AFL 2.5)
From the help file..
d
_____
From: ed nl [mailto:ed2000nl@xxxxxxx]
Sent: Wednesday, September 08, 2004 5:29 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] creating a basket order file
hi,
I am trying to make a basket order file for Interactive Brokers. I use
a
portfolio type backtest and I would not know how to be able to
influence
the
output. The output file would contain something like this
BUY, 100, MSFT, STK, SMART, LMT, 52.85,
BUY, 100, FITB, STK, SMART, LMT, 58.25,
SELL, 100, AAPL, STK, SMART, LMT, 30.22,
COVER, 100, BRCM, STK, SMART, LMT, 15.55,
SHORT, 100, PETM, STK, SMART, LMT, 22.44,
any ideas?
thanks, Ed
[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=129rgo6f9/M=295196.4901138.6071305.3001176/
D=gr
oups/S=1705632198:HM/EXP=1094765382/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=group
s/S=
:HM/A=2128215/rand=850822541>
_____
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 Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129jv5ch6/M=295196.4901138.6071305.3001176/
D=gr
oups/S=1705632198:HM/EXP=1094767034/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=group
s/S=
:HM/A=2128215/rand=384412153>
_____
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 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]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/
|