PureBytes Links
Trading Reference Links
|
Charles this is for an auto trading
BT will accept trade instructions from a monitored txt file.
the txt file needs to look like this
cxlplace,BUY,1,LMT,955.00,0
cancel,,,,,0
cxlplace,BUY,1,MKT,,0
cxlplace,SELL,2,LMT,955.25,0
all I need is an example of the code required to write one of these
instructions cxplace,BUY,1,MKT,,0 to the file named C:\BTtrades.txt
>From: "Charles Stangor" <cstangor232@xxxxxxxxxxxxxxxxxx>
>Reply-To: amibroker@xxxxxxxxxxxxxxx
>To: <amibroker@xxxxxxxxxxxxxxx>
>Subject: Re: [amibroker] Writing to Bracket Trader text file
>Date: Tue, 25 Oct 2005 22:27:41 -0400
>
>
>
>
>
>I'm not sure why you need to do this, but here's an example from the help
>
>file that might get you started:
>
>
>
>fh = fopen( "quotes.csv", "w");
>
>if( fh )
>
>{
>
> fputs( "Date,Open,High,Low,Close,Volume\n", fh );
>
>
>
> y = Year();
>
> m = Month();
>
> d = Day();
>
>
>
> for( i = 0; i < BarCount; i++ )
>
> {
>
> ds = StrFormat("%02.0f-%02.0f-%02.0f,",
>
> y[ i ], m[ i ], d[ i ] );
>
> fputs( ds, fh );
>
>
>
> qs = StrFormat("%.4f, %.4f, %.4f, %.4f, %.0f\n",
>
> O[ i ], H[ i ], L[ i ], C[ i ], V[ i ] );
>
> fputs( qs, fh );
>
> }
>
>
>
> fclose( fh );
>
>}
>
>
>
>
>
>
>
>
>
>----- Original Message -----
>
>From: "Paul Yarwood" <pyarwood@xxxxxxx>
>
>To: <amibroker@xxxxxxxxxxxxxxx>
>
>Sent: Tuesday, October 25, 2005 10:00 PM
>
>Subject: [amibroker] Writing to Bracket Trader text file
>
>
>
>
>
> > My first attempt to write the buy/sells from an afl to a text file so
>that
>
> > Bracket Trader can read the file execute and manage the trades.
>
> > I have not found an example of this type of code .
>
> >
>
> > I setup a edemo account with IB
>
> > I created a notepad text file C:\"trade.txt"
>
> > I have they buy/sell and short/cover signals and the plots working
>
> >
>
> > can someone give me more than a little help to get the code going
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > Please note that this group is for discussion between users only.
>
> >
>
> > To get support from AmiBroker please send an e-mail directly to
>
> > SUPPORT {at} amibroker.com
>
> >
>
> > For other support material please check also:
>
> > http://www.amibroker.com/support.html
>
> >
>
> >
>
> > Yahoo! Groups Links
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
>
>
>
>
>
>
>
>
>
>
>
>Please note that this group is for discussion between users only.
>
>
>
>To get support from AmiBroker please send an e-mail directly to
>
>SUPPORT {at} amibroker.com
>
>
>
>For other support material please check also:
>
>http://www.amibroker.com/support.html
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> YAHOO! GROUPS LINKS
>
>
>
>
> Visit your group "amibroker" on the web.
>
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|