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

RE: [amibroker] Re: Back Testing Futures



PureBytes Links

Trading Reference Links

this should get you started.. you may have to change a few lines--i use this
to get my EOD to my PF program.

 HAVE you tried renaming the symbols and do a backfill?????  Man you gotta
do it this way!!!!!  i just did it with es and it worked fine after a few
tries....  for some reason it did not stick, but i did not Shutdown the IB
plug-in, as you MUST do to use the Quote editor.  just delete the "u"
symbols.  but u better do it 2day....

hth,
ron



/*

Export EOD data to CSV files

One file for each stock

In the first line insert the directory you want to save them to, make sure
the directory exists

Select your charts to export with the "Apply to" filter in AA window

Select the timeframe period you want to save as using the AA "Settings"

Press Scan button

by Graham Kavanagh 05 Feb 2004

*/



fh = fopen( "c:\\SaveData\\"+Name()+".csv", "w");

if( fh )

{

   fputs( "Ticker,Date,Time,Open,High,Low,Close,Volume \n", fh );

   y = Year();

   m = Month();

   d = Day();



   for( i = 0; i < BarCount; i++ )

   {

      fputs( Name() + "," , fh );

      ds = StrFormat("%04.0f-%02.0f-%02.0f,",

                     y[ i ], m[ i ], d[ i ] );

      fputs( ds, fh );



      qs = StrFormat("%.3f,%.3f,%.3f,%.3f,%.0f\n",

                     O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );

      fputs( qs, fh );

   }



   fclose( fh );

}



Buy = 1;



-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On
Behalf Of me_rayme
Sent: Thursday, June 09, 2005 12:46 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Back Testing Futures


I have no idea how to export OHLC and volume from 30 days of one
minute YM data I have.

Is this possible with AB? Could do it with AIQ/mytrack as you could
edit raw data.

Ray

--- In amibroker@xxxxxxxxxxxxxxx, "me_rayme" <raycherry1@xxxx> wrote:
> Yes will try exporting them with excel and bring them back as a
EOD
> file, with a new number.
>
> I did this last year with AIQ futures and use of a macro. Had to
> copy OHLC and volume for EACH minute as I use volume and OHLC in
my
> formula, each minute.
>
> Thought AB could make it easier since afl is so powerfull.
>
> Any body else with any other ideas?
>
> Thanks ron.
>
> Ray
>
> --- In amibroker@xxxxxxxxxxxxxxx, "ronbo" <ronbo@xxxx> wrote:
> > after june expires next week i think, who cares about june---
it's
> history.
> > so just change the "m" to "u" and do a backfill.  since you just
> started
> > today---you will get the 24hrs of backfill.
> >
> > I have not tried this, but   IF you had started last week, then
> the data
> > from IB will only fill 24hrs.  I would then try to export the 2
> symbols as a
> > csv's, combine them in notepad or Excel, and then Import the
> combined .csv
> > file back to AB....
> >
> > ron
> >
> >
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx]
> On
> > Behalf Of me_rayme
> > Sent: Thursday, June 09, 2005 9:34 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Back Testing Futures
> >
> >
> > Yes that is what I do BUT how can I connect to two together
(June &
> > Sept), for backtesting over 3 or more months, as a continous
stream
> > of data.
> >
> > Ray
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "ronbo" <ronbo@xxxx> wrote:
> > > save your database before trying this of coarse---
> > >
> > > since you have just started the Sept, try---
> > > in the Workspace, right click on the symbol, click Information,
> > and change
> > > the symbol "m" to "u".  it won't be and exact continuation
chart
> > because of
> > > the "time" premium.  This is how i do it....
> > >
> > > hth,
> > > ron
> > >
> > >
> > > -----Original Message-----
> > > From: amibroker@xxxxxxxxxxxxxxx
> [mailto:amibroker@xxxxxxxxxxxxxxx]
> > On
> > > Behalf Of me_rayme
> > > Sent: Thursday, June 09, 2005 8:48 AM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Back Testing Futures
> > >
> > >
> > > How can I join the June futures to the Sept futures, using one
> > > minute,so the backtesting can cover more than 3 months. The
Sept
> > > futures stared today. Using IB, AB ver 4.70.5 Prof
> > >
> > > Is this possible?
> > >
> > > At the moment I have about 25 days of the June futures, so I
now
> > > want to add the Sept futures to the June continously.I also
want
> to
> > > keep this file forever, maybe for several years.
> > >
> > > The following is what I want to store for purposes of back
> testing.
> > >
> > > 6EM5-GLOBEX-FUT
> > > 6EU5-GLOBEX-FUT
> > > ER2M5-GLOBEX-FUT
> > > ER2U5-GLOBEX-FUT
> > > ESM5-GLOBEX-FUT
> > > NQM5-GLOBEX-FUT
> > > NQU5-GLOBEX-FUT
> > > YM   JUN 05-ECBOT-FUT
> > > YM   SEP 05-ECBOT-FUT
> > > ZB   JUN 05-ECBOT-FUT
> > > ZB   SEP 05-ECBOT-FUT
> > >
> > > Ray
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > No virus found in this incoming message.
> > > Checked by AVG Anti-Virus.
> > > Version: 7.0.322 / Virus Database: 267.6.2 - Release Date:
> 6/4/2005
> > >
> > > --
> > > No virus found in this outgoing message.
> > > Checked by AVG Anti-Virus.
> > > Version: 7.0.322 / Virus Database: 267.6.2 - Release Date:
> 6/4/2005
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.322 / Virus Database: 267.6.2 - Release Date:
6/4/2005
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.322 / Virus Database: 267.6.2 - Release Date:
6/4/2005





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







--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 267.6.2 - Release Date: 6/4/2005

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 267.6.2 - Release Date: 6/4/2005



------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/