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

[amibroker] how to use afl



PureBytes Links

Trading Reference Links

Title: AmiBroker User's List

Dear seniors,

 

I  am new to amibroker and need how to use afl ( load afl ) I have downloaded afls from ami site.

 

Pl send me brief method.

 

Thank you

 

Atmaram Nagargoje

Universal Metal Coating Co Ltd. ( UNICOIL).

P.O. BOX 11606, Al Jubail, Kingdom of Saudi Arabia 31961.

Office +966 3 358 8400 (271)

Cell +966 506546077, +91 9324873035


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
Sent: Tuesday, July 15, 2008 11:19 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Digest Number 8053

 

Messages In This Digest (14 Messages)

Messages

1a.

Re: Intraday data

Posted by: "Tony Hariman" thariman@xxxxxxxxx   thariman

Mon Jul 14, 2008 6:35 pm (PDT)

Tim,

I also use volume bar that required tick data. This depend also on
how far the RT provider
have historical tick data. For example I used esignal and some symbol
have only 2 days back,
and some 1 week worth of tick data. As long as you keep updating your
AB local database at least every 2 days you will be collecting all
that tick data. But if you miss some of that day you need to import
tick data from other vendor.

Tony

On Mon, Jul 14, 2008 at 5:35 PM, Tim <raven4ns@xxxxxxca> wrote:
>
> Thank you Tomasz. When you use the exploration backtest with the wait
> for backfill on, is the historical data that is gathered Daily or
> Intraday? I use tick volume to display volume charts and it is the
> historical tick data that I wish to save. Thank you.
>
> Tim
>
> --- In amibroker@xxxxxxxxxps.com, "Tomasz Janeczko" <groups@xxx> wrote:
>>
>> Hello,
>>
>> It was discussed dozen of times and all. The fact that you have
> given symbol
>> in RT quote list does not mean you have historical data. RT quote
> displays
>> only current quotes (no history).
>> If you want to have history saved in local database you need to
>> a) setup IQFeed as shown in the video:
>> http://www.amibroker.com/video/IQFeed.html
>>
>> b) access every symbol you want to have history by either
>> displaying its chart, or running scan/exploration/backtest.
>>
>> No matter how given symbol data is accessed it will trigger backfill
>> and get history from IQFeed.
>> Once data are obtained from IQFeed, it will be saved in local database
>> provided that "Local data storage" is set to "ENABLED" as in the video.
>>
>> If you are using AA to access data, make sure to run at least one scan
>> with "wait for backfill" turned ON. This is essential as it
> guarantees that AmiBroker waits
>> for IQFeed to respond with backfill data. It usually takes few
> seconds for IQFeed to
>> respond for every backfill request.
>> Otherwise AB will scan orders of magnitude faster than IQFeed is
> able to respond and you won't get data for all symbols.
>>
>> The backfill procedure does NOT differ, it is the same for
> QCollector and AB
>> (request -> wait -> IQFeed responds - transfer the data - save).
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message -----
>> From: Louis Préfontaine
>> To: amibroker@xxxxxxxxxps.com
>> Sent: Monday, July 14, 2008 9:15 PM
>> Subject: Re: [amibroker] Re: re:Intraday data
>>
>>
>> They told me the same thing. Try to contact their support and
> tell them exactly what is the problem and be sure you installed
> everything fine with AB.
>>
>> Louis
>>
>>
>> 2008/7/14 Tim <raven4ns@xx.>:
>>
>> Here is DTN's response:
>>
>> Hello Tim, with saving data onto your computer it is actually up
> to AB
>> or any other 3rd party software to do so not IQFeed. With IQFeed we
>> provide the raw data from our quote servers and the historical data
>> which is saved on our end then when you request the data, it
> will sent
>> to you. I believe that there is a way to save the data within AB but
>> not 100% sure how, so your best bet would be to contact AB
> Support to
>> know for sure.
>>
>> Thanks.
>>
>>
>>
>> --- In amibroker@xxxxxxxxxps.com, "Tim" <raven4ns@> wrote:
>> >
>> > Hi Louis,
>> > I just sent DTN a message regarding this issue. Thank you for your
>> > suggestion.
>> >
>> > Tim
>> >
>> >
>> >
>> >
>> >
>> > --- In amibroker@xxxxxxxxxps.com, "Louis Préfontaine"
> <rockprog80@>
>> > wrote:
>> > >
>> > > Hi Tim,
>> > >
>> > > I had the same problem. This is why I subscribed to QCollector (
>> > > http://www.mechtrading.com/qcollector/esignal/index.htm ) to
>> > download my
>> > > quotes from DTN.
>> > >
>> > > I contacted DTN support to tell them about this problem. I
> suggest
>> > you do
>> > > the same (the more people tell them, more quickly they will
> try to
>> > deal with
>> > > this problem) and you may consider getting QCollector as well.
>> > >
>> > >
>> > > Best of luck,
>> > >
>> > > Louis
>> > >
>> > > 2008/7/14 Tim <raven4ns@>:
>> > >
>> > > > How do I save Intraday data for my stocks? I use DTN data and
>> > for some
>> > > > reason it looks like AB is not saving the historical
> Intraday data.
>> > > > Most likely I am doing something incorrectly. I appreciate any
>> and all
>> > > > help.
>> > > >
>> > > > Kindest regards,
>> > > >
>> > > > Tim
>> > > >
>> > > >
>> > > >
>> > >
>> >
>>
>
>

1b.

Re: Intraday data

Posted by: "Tomasz Janeczko" groups@xxxxxxxxxxxxx   amibroker

Mon Jul 14, 2008 11:45 pm (PDT)

If you are using mixed EOD/intraday mode then both (EOD and 1-minute) are retrieved at the same time.

Tick-by-tick (i.e. single trade by trade) data is other story. These are *huge* data sets.
Single day can be as much as 10 MB of data and more than 200000 ticks per day is not rare.
They don't mix with EOD.
You may be quickly running out of storage space and/or 'number of bars' limit as
set in the database settings.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Tim" <raven4ns@xxxxxxca>
To: <amibroker@xxxxxxxxxps.com>
Sent: Monday, July 14, 2008 11:35 PM
Subject: [amibroker] Re: re:Intraday data

Thank you Tomasz. When you use the exploration backtest with the wait
for backfill on, is the historical data that is gathered Daily or
Intraday? I use tick volume to display volume charts and it is the
historical tick data that I wish to save. Thank you.

Tim

--- In amibroker@xxxxxxxxxps.com, "Tomasz Janeczko" <groups@xxx> wrote:
>
> Hello,
>
> It was discussed dozen of times and all. The fact that you have
given symbol
> in RT quote list does not mean you have historical data. RT quote
displays
> only current quotes (no history).
> If you want to have history saved in local database you need to
> a) setup IQFeed as shown in the video:
> http://www.amibroker.com/video/IQFeed.html
>
> b) access every symbol you want to have history by either
> displaying its chart, or running scan/exploration/backtest.
>
> No matter how given symbol data is accessed it will trigger backfill
> and get history from IQFeed.
> Once data are obtained from IQFeed, it will be saved in local database
> provided that "Local data storage" is set to "ENABLED" as in the video.
>
> If you are using AA to access data, make sure to run at least one scan
> with "wait for backfill" turned ON. This is essential as it
guarantees that AmiBroker waits
> for IQFeed to respond with backfill data. It usually takes few
seconds for IQFeed to
> respond for every backfill request.
> Otherwise AB will scan orders of magnitude faster than IQFeed is
able to respond and you won't get data for all symbols.
>
> The backfill procedure does NOT differ, it is the same for
QCollector and AB
> (request -> wait -> IQFeed responds - transfer the data - save).
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: Louis Préfontaine
> To: amibroker@xxxxxxxxxps.com
> Sent: Monday, July 14, 2008 9:15 PM
> Subject: Re: [amibroker] Re: re:Intraday data
>
>
> They told me the same thing. Try to contact their support and
tell them exactly what is the problem and be sure you installed
everything fine with AB.
>
> Louis
>
>
> 2008/7/14 Tim <raven4ns@xx.>:
>
> Here is DTN's response:
>
> Hello Tim, with saving data onto your computer it is actually up
to AB
> or any other 3rd party software to do so not IQFeed. With IQFeed we
> provide the raw data from our quote servers and the historical data
> which is saved on our end then when you request the data, it
will sent
> to you. I believe that there is a way to save the data within AB but
> not 100% sure how, so your best bet would be to contact AB
Support to
> know for sure.
>
> Thanks.
>
>
>
> --- In amibroker@xxxxxxxxxps.com, "Tim" <raven4ns@> wrote:
> >
> > Hi Louis,
> > I just sent DTN a message regarding this issue. Thank you for your
> > suggestion.
> >
> > Tim
> >
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxps.com, "Louis Préfontaine"
<rockprog80@>
> > wrote:
> > >
> > > Hi Tim,
> > >
> > > I had the same problem. This is why I subscribed to QCollector (
> > > http://www.mechtrading.com/qcollector/esignal/index.htm ) to
> > download my
> > > quotes from DTN.
> > >
> > > I contacted DTN support to tell them about this problem. I
suggest
> > you do
> > > the same (the more people tell them, more quickly they will
try to
> > deal with
> > > this problem) and you may consider getting QCollector as well.
> > >
> > >
> > > Best of luck,
> > >
> > > Louis
> > >
> > > 2008/7/14 Tim <raven4ns@>:
> > >
> > > > How do I save Intraday data for my stocks? I use DTN data and
> > for some
> > > > reason it looks like AB is not saving the historical
Intraday data.
> > > > Most likely I am doing something incorrectly. I appreciate any
> and all
> > > > help.
> > > >
> > > > Kindest regards,
> > > >
> > > > Tim
> > > >
> > > >
> > > >
> > >
> >
>

------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

2a.

Re: Back testing only some results showing

Posted by: "Mike" sfclimbers@xxxxxxxxx   sfclimbers

Mon Jul 14, 2008 7:16 pm (PDT)

Sounds like you have a very loose strategy with a fixed maximum
number of positions allowed (see Settings), and that you are not
using a PositionScore value to alter the default prioritization
(which is either alphabetical or perhaps order of appearance in the
watchlist, I don't recall).

That being the case, any of the following would help; Make your Buy
crieria more restrictive, or work with a smaller number of symbols,
or increase the number of allowable positions, or add PositionScore
logic to your code, or ...

Mike

--- In amibroker@xxxxxxxxxps.com, "tridean34" <tridean34@x..> wrote:
>
> Hi Guys,
> I recently bought the standard version and I noticed when I
backtest
I
> a getting a low of results from tickers starting with 'A', and then
> jsut a trickle of some others.
>
>
> For example, there are around 160 results for tickers starting with
A,
> and the other 40 go only up to G, and then nothing.
>
> I've gone through the Automatic Analysis settings and I can not
find
> anything that tells me what is doing this
>
> Cheers
> Dean
>

2b.

Re: Back testing only some results showing

Posted by: "Grant Noble" gruntus@xxxxxxxxxxx   gruntusnomore

Mon Jul 14, 2008 7:25 pm (PDT)

Maybe your system runs out of funds in which case AA will not show more signals. Try using an
exploration to check signals and equity. G

tridean34 wrote:
> Hi Guys,
> I recently bought the standard version and I noticed when I backtest I
> a getting a low of results from tickers starting with 'A', and then
> jsut a trickle of some others.
>
>
> For example, there are around 160 results for tickers starting with A,
> and the other 40 go only up to G, and then nothing.
>
> I've gone through the Automatic Analysis settings and I can not find
> anything that tells me what is doing this
>
> Cheers
> Dean
>
>
> ------------------------------------
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> 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 - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.4.10/1552 - Release Date: 7/14/2008 6:28 PM
>
>
>

2c.

Re: Back testing only some results showing

Posted by: "tridean34" tridean34@xxxxxxxxx   tridean34

Mon Jul 14, 2008 9:04 pm (PDT)

That's OK - I was hoping the answer would have been an obvious one. I
did a scan and that does fine, scanning all tickers no probs.

I changed the Max# number of postions to 1000 and stil did nothing.

I'll have to go thorugh the help files again...

--- In amibroker@xxxxxxxxxps.com, "Mike" <sfclimbers@...> wrote:
>
> Sounds like you have a very loose strategy with a fixed maximum
> number of positions allowed (see Settings), and that you are not
> using a PositionScore value to alter the default prioritization
> (which is either alphabetical or perhaps order of appearance in the
> watchlist, I don't recall).
>
> That being the case, any of the following would help; Make your Buy
> crieria more restrictive, or work with a smaller number of symbols,
> or increase the number of allowable positions, or add PositionScore
> logic to your code, or ...
>
> Mike
>
> --- In amibroker@xxxxxxxxxps.com, "tridean34" <tridean34@> wrote:
> >
> > Hi Guys,
> > I recently bought the standard version and I noticed when I
> backtest
> I
> > a getting a low of results from tickers starting with 'A', and
then
> > jsut a trickle of some others.
> >
> >
> > For example, there are around 160 results for tickers starting
with
> A,
> > and the other 40 go only up to G, and then nothing.
> >
> > I've gone through the Automatic Analysis settings and I can not
> find
> > anything that tells me what is doing this
> >
> > Cheers
> > Dean
> >
>

2d.

Re: Back testing only some results showing

Posted by: "Sidney Kaiser" skbiker@xxxxxxxxx   skbiker

Mon Jul 14, 2008 9:16 pm (PDT)

Your backtest is running out of money because so many stocks are meeting your criteria. Increase the funds to $100k or $1M.
Sid

tridean34 <tridean34@xxxxxxcom> wrote:
That's OK - I was hoping the answer would have been an obvious one. I
did a scan and that does fine, scanning all tickers no probs.

I changed the Max# number of postions to 1000 and stil did nothing.

I'll have to go thorugh the help files again...

--- In amibroker@xxxxxxxxxps.com, "Mike" wrote:
>
> Sounds like you have a very loose strategy with a fixed maximum
> number of positions allowed (see Settings), and that you are not
> using a PositionScore value to alter the default prioritization
> (which is either alphabetical or perhaps order of appearance in the
> watchlist, I don't recall).
>
> That being the case, any of the following would help; Make your Buy
> crieria more restrictive, or work with a smaller number of symbols,
> or increase the number of allowable positions, or add PositionScore
> logic to your code, or ...
>
> Mike
>
> --- In amibroker@xxxxxxxxxps.com, "tridean34" wrote:
> >
> > Hi Guys,
> > I recently bought the standard version and I noticed when I
> backtest
> I
> > a getting a low of results from tickers starting with 'A', and
then
> > jsut a trickle of some others.
> >
> >
> > For example, there are around 160 results for tickers starting
with
> A,
> > and the other 40 go only up to G, and then nothing.
> >
> > I've gone through the Automatic Analysis settings and I can not
> find
> > anything that tells me what is doing this
> >
> > Cheers
> > Dean
> >
>

------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

3.

Visit each symbol, like a slide show

Posted by: "Daniel LaLiberte" daniel.laliberte@xxxxxxxxx   liberte721

Mon Jul 14, 2008 9:28 pm (PDT)

Here is my script for stepping through each symbol in the list of all
symbols. It could be modified in several different ways, and I would like
to hear your suggestions. (email directly if you like).

By the way, posting afl code to this yahoo group is difficult. I think it
would work OK using Outlook (and maybe some other email programs), and
maybe if I select "Copy as HTML" in the AmiBroker Editor Preferences. But I
am forced to use gmail or yahoo's awful interface, and there doesn't appear
to be any option to preserve the indentation, coloring, and without adding
redundant new lines. I hope the following is at least indented correctly,
as it appears to me now.

dan

// VisitEachSymbol.afl

// Visit each symbol in the list of All symbols.
// You can use this like a slide show.

// Written by Daniel LaLiberte (daniel.laliberte@gmail.com), July 2008.
// You are free to use this however you want.

// Instructions for use:
// Select a symbol in your list of all symbols.
// Use the "Start" trigger parameter to begin stepping at the current
symbol.
// It will stop automatically at the end of the list, or you can "Stop" at
any time,
// and "Start" again to continue (not restart).
// If you start in a watchlist, or switch charts while stepping, interesting
things will happen.

if ( ParamTrigger( "Start Stepping", "Step" ) )
{
StaticVarSetText( "gotoSymbol", "" );
StaticVarSetText( "stepping", "yes" );
}

if ( ParamTrigger( "Stop Stepping", "Stop" ) )
{
StaticVarSetText( "gotoSymbol", "" );
StaticVarSetText( "stepping", "" );
}

// Number of seconds to delay between each step.
delaySeconds = 5;

// Implementation note:
// You can't use a loop over all symbols like the following within one
script.
// It would cause an infinite loop because the chart updates as a result of
changing the symbol,
// thus executing this script again and restarting the loop.
/*
for (i=0; i<numTickers; i++)
{
ticker = tickers.getKey(i);
JS.setTicker(ticker);
}
*/

// Instead of a simple loop, we must use static vars, stepping to the next
symbol
// each time the script is executed. We add a delay using a refresh loop.
// Jscript is used to get the list of all symbols, and to go to the next
symbol.

AB = CreateStaticObject( "Broker.Application" );

EnableScript( "jscript" );

< %

var AB = AFL( "AB" );
function setTicker( ticker )
{
AB.ActiveDocument.Name = ticker;
}

function KeyList ( keys )
{
this.keys = keys; // ordered list of the keys
this.keyIndex = {}; // map from key to index.

for ( var i = 0; i < keys.length; i++ )
this.keyIndex[keys[i]] = i;
}

KeyList.prototype.getIndex = function( key )

{
return this.keyIndex[ key ];
}

KeyList.prototype.getKey = function( index )
{
return this.keys[ index ];
}

KeyList.prototype.getLength = function ()
{
return this.keys.length;
}

function getAllTickers ()
{
var stocks = AB.stocks;
var tickerList = stocks.getTickerList( 0 ); // 0 for list of All
symbols?
var tickers = tickerList.split( ',' );

if ( !tickers[tickers.length - 1] )
delete tickers[tickers.length - 1]; // Last element is empty due to
extra comma.

var tickerKeyList = new KeyList( tickers );

return tickerKeyList;
}

% >
JS = GetScriptObject();

function doneWithSymbol ()
{
// In this test, simply check if the symbol we were supposed to go to is
what we see now.
// Special case: no gotoSymbol is OK.
gotoSymbol = StaticVarGetText( "gotoSymbol" );
atSymbol = ( gotoSymbol == "" ) OR ( gotoSymbol == Name() );

// Now delay for some period of time.
// One way to cause a delay is to use the IBController Sleep function,
as in the following.
// But this disrupts normal processing in other windows, not completely,
but enough to destroy interactivity.
/*
ibc = GetTradingInterface( "IB" );
ibc.sleep(5000);
*/

// Another slightly simpler way is to call RequestTimedRefresh( ) with
the desired sleep time.
// The time will be rounded to the nearest whole multiple, so it is not
exactly a delay time.
RequestTimedRefresh( delaySeconds );
// But setting the symbol also causes an immediate refresh, which we
want to ignore.
refreshed = Status( "redrawaction" ) == 1;
//_Trace("doneWithSymbol refreshed: " + refreshed);

done = atSymbol and refreshed;
return done;
}

function gotoNextSymbol ()
{
// Reconstruct the list of all symbols (aka tickers). Yes, every time.
tickerKeyList = JS.getAllTickers();

// Get the index of the next symbol.
nextIndex = 1 + tickerKeyList.getIndex( Name() );

if ( tickerKeyList.getLength() - 1 > nextIndex ) // Is the index in
range?
{
// OK, so get the next symbol and go to it.
nextSymbol = tickerKeyList.getKey( nextIndex );
StaticVarSetText( "gotoSymbol", nextSymbol );
JS.setTicker( nextSymbol );
}
else
{
// No more symbols, so stop stepping.
stepping = "";
StaticVarSetText( "stepping", stepping );
// RequestTimedRefresh(0); // this is not the way to stop the
refresh loop.
}
}

stepping = ( "yes" == StaticVarGetText( "stepping" ) );

if ( stepping )
{
// If done with this symbol, go to next symbol.
if ( doneWithSymbol() )
{
gotoNextSymbol();
}
}

Plot( Close, "Close", colorBlack, styleCandle );

--
Daniel LaLiberte
liberte@xxxxxxxxxxorg
daniel.laliberte@gmail.com

4a.

Re: A stupid problem - any help appreciated.

Posted by: "Barry Scarborough" razzbarry@xxxxxxxxxxxx   razzbarry12000

Mon Jul 14, 2008 10:00 pm (PDT)

The symbol name can not be modified by Symbol > Information. As far
as I know there is no easy way to do this. I have done this before
but it takes so long I just decided I liked lower case.

This is one way to do it.
1. Save your symbol list using AmiQuote > Tools > Get tickers from
AB. Save this as a csv file.
2. Use Word to change the case.
3. Save your database using an export program. I added one to the AFL
formulas on the AB site. Search on export. There are a number of
export programs there. The one I added will export EOD or intraday
data to a directory on your C drive.
4. Create a new database.
5. Import the uppercase symbols using Symbol > Watchlist > select a
watchlist number and then import the ticker list. Don't just import
the data you saved since it has the lower case names.
6. Use Import Wizard to import the data. It doesn't care what the
case is now. You may be able to import all the files at once. I never
tried 6000+ but it is worth a try.

I tried to use a script to change it but it seems the object model
will not allow the change. Makes sense that you couldn't change the
name of an object. The script I used is below. I can see the case
changed but when I read back the ticker name after "changing" it, it
was not changed.

Barry

/*
** AmiBroker/Win32 Scripting Program
**
** File: None
** Created: Barry Scarborough - 7/14/08
** Purpose: Change the case of symbols to upper case
** Language: JScript (Windows Scripting Host)
*/

var oAB = WScript.CreateObject("Broker.Application");
var fso = new ActiveXObject("Scripting.FileSystemObject");
var oStocks = oAB.Stocks;
var Qty = oStocks.Count;

WScript.Echo("Change name of start" );
for( i = 0; i < Qty; i++ )
{
oStock = oStocks( i );
var ticker = oStock.Ticker;
var ucTicker = ticker.toUpperCase();
oStock.Ticker = ucTicker;
WScript.Echo("Original ticker is " + ticker + " was changed to " +
ucTicker + " but updated ticker has " + oStock.Ticker );
}
WScript.Echo("Change to upper case complete." );

--- In amibroker@xxxxxxxxxps.com, Graham <kavemanperth@...> wrote:
>
> Try using Symbol-Information
>
> --
> Cheers
> Graham Kav
> AFL Writing Service
> http://www.aflwriting.com
>
>
> 2008/7/15 Louis Préfontaine <rockprog80@...>:
> > Hi,
> >
> > For the first question I don't know (but would like to know) the
answer, but
> > for the second I simply renamed the folder and it seemed to work
for me.
> >
> > Louis
> >
> >
> >
> > 2008/7/14 droskill <droskill@xx.>:
> >>
> >> Ok - I'll admit these are stupid issues that I'd love to fix but
I'm
> >> sensitive to screwing up my AB data. I'm wondering if anyone has
any
> >> idea how to fix these:
> >>
> >> 1. Symbols in lower case: When I first started putting together
my
> >> quotes, I put some in lower case (my datasource is TC2005) - I
want to
> >> have them all uppercase. I don't want to delete them and then add
> >> them back because this would require re-adding them to all my
> >> Watchlists. Any easy way around this?
> >>
> >> 2. Changing the name of a database - is there any easy way to do
this?
> >>
> >> Thanks!
> >>
>

5a.

Re: Can't Backfill IB Data on Monday while Could Last Friday

Posted by: "spaceant888" spaceant888@xxxxxxxxx   spaceant888

Mon Jul 14, 2008 10:16 pm (PDT)

The problem still persists after upgarding the IB DLL to V1.7.0....
anyone can help??

--- In amibroker@xxxxxxxxxps.com, "spaceant888" <spaceant888@...>
wrote:
>
> I thought I have upgraded to V1.7.0 by placing the DLL onto the
> folder of AmiBroker....
>
> Well, I have just downloaded V1.7.1 and place it onto the folder
> AmiBroker \ Plugins \ , I still experience the same problem.
Error
> message:
>
> "TICKER NAME, 322, Error processing request-'tb' : cause -
Duplicate
> ticker ID for API historical data query"
>
> Regards,
>
> Sa
>
> --- In amibroker@xxxxxxxxxps.com, "Tomasz Janeczko" <groups@>
> wrote:
> >
> > You must use latest version of IB plugin (1.7.1).
> > The error you are getting is typical to using old version of IB
> plugin
> > with newest TWS. Either downgrade TWS or upgrade plugin.
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "spaceant888" <spaceant888@>
> > To: <amibroker@xxxxxxxxxps.com>
> > Sent: Monday, July 14, 2008 8:40 AM
> > Subject: [amibroker] Re: Can't Backfill IB Data on Monday while
> Could Last Friday
> >
> >
> > Tried it, but it didn't help.
> >
> > Well, I can backfill 5-day, but AB has a problem backfilling 10-
day
> > or more. It used to have no problem...
> >
> > BTY, I have updated TWS to 885
> >
> > SA
> >
> >
> > --- In amibroker@xxxxxxxxxps.com, "Louis Préfontaine"
> > <rockprog80@> wrote:
> > >
> > > Hi,
> > >
> > > Did you try to erase the ticker and enter it back then
backfill
> it?
> > >
> > > Louis
> > >
> > > 2008/7/13 spaceant888 <spaceant888@>:
> > >
> > > > Error message show:
> > > >
> > > > Plugin status
> > > > Connected OK
> > > >
> > > > Last message from TWS:
> > > > TICKER NAME, 322, Error processing request:-¡¥ub¡¦ : cause ¡V
> > > > Duplicate ticker ID for API historical data query
> > > >
> > > > --- In amibroker@xxxxxxxxxps.com <amibroker%
40yahoogroups.com>,
> > > > "spaceant888" <spaceant888@>
> > > > wrote:
> > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am using TWS Build 884. When AB could backfill histroical
> > data
> > > > last
> > > > > Firday , but can't do it today.....
> > > > >
> > > > > Anyone experience that?... why?
> > > > >
> > > > > Sa
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> > ------------------------------------
> >
> > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> > Yahoo! Groups Links
> >
>

6a.

Re: Speed the database!?

Posted by: "Tomasz Janeczko" groups@xxxxxxxxxxxxx   amibroker

Mon Jul 14, 2008 11:42 pm (PDT)

Hello,

No, it does NOT take 3-4 seconds to load each ticker. Loading (i.e. switching between symbols) is INSTANT.

It takes 3-4 to BACKFILL. That's huge difference.

Are you aware that you are on 256kbps connection. That means that your fully saturated connection is able
to deliver about 25KB of data per second. Now do you have any idea how much data is one day
of 1-minute data?

As far as I remember you are using IQFeed. It delivers data in ASCII format.

Let's say single quote line is 100 bytes. Compressed it is 50. Now there are 60 lines per minute and
480 lines per 8 hours. That's 24KB PER DAY PER SYMBOL of 1-minute data. That means
that it takes 1-second FULLY SATURATED your internet connection to deliver 1-day worth of 1-minute data for one symbol.
That's physical limit of your internet connection.

Yes there is a way to get it faster:
a) invest in better internet connection
b) subscribe to data source that allows those 500 symbols to be streaming
c) run scan with wait for backfill PRIOR to market open. Once you initialy scan all symbol
UNCHECK "wait for backfill" and scans will fun blazing fast.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Louis Préfontaine
To: amibroker@xxxxxxxxxps.com
Sent: Monday, July 14, 2008 11:02 PM
Subject: [amibroker] Speed the database!?

Hi,

I have my 1-minute database setted with all my tickers and everything, but damn it it is so slow! It takes like 3-4 seconds to load each ticker... Is there a way to make it run faster, considering I don't need all the data when exploring?

Thanks,

Louis

7.1.

Re: Paul Ho: Memory Challenges with Great Ranking Tool

Posted by: "Tomasz Janeczko" groups@xxxxxxxxxxxxx   amibroker

Mon Jul 14, 2008 11:52 pm (PDT)

Hello,

You don't need any extra coding for that.
Use EXPLORATION, run it on the range "last 1 day" and all 8000 tickers.
Use SetSortColumns to perform sorting (or click on column) and get top 500 from the list.
It is blazing fast, don't require any special coding.
======================================
http://www.amibroker.com/video/exploration.html

Note that if you are going to scan 8000 symbols *everyday* you would either
need dedicated EOD source (may be even Yahoo) or if you insist on using intraday data
way faster connection than your 256kbps intraday data is about 25KB per day per symbol
(so about 200+ MB per 8000 symbols, so with your current connection it would take
more than 4 hours fully saturated 256kbps connection)
You really need to do the math. Your connection is tiny compared to what you are trying to
do, and that means that you either need to adjust your methodology (usign EOD data for scans)
or change the connection. There are physical limits of your setup that you seem to be ignoring.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Louis Préfontaine
To: amibroker@xxxxxxxxxps.com
Sent: Monday, July 14, 2008 11:39 PM
Subject: Re: [amibroker] Re: Paul Ho: Memory Challenges with Great Ranking Tool

I think you don't understand. As I said like 10 times, this is the easiest part. I need to find a code that will implement this in a backtest. It is easy to create a watchlist every night and use that watchlist the next day in intraday. What is more difficult is to have a code that will automatically rank the 8000 tickers each day and then use the 500 best as the universe of tickers to which the intraday code will be applied.

2008/7/14 <ftonetti@xxxxxxxxxxnet>:

Since you stated I described it accurately I don't think I need to scroll up ...

So as I said ... Create a watchlist with the top 500 ... I assume this process only needs to be run once per day i.e. at end of day yesterday or beginning of day today ... But in any case even if you run it every n minutes it would still seem like the simplest way to get this done.

After that you can use the Watchlist as the driving factor for whatever else you are doing intraday

----- Original Message -----
From: Louis Préfontaine

Date: Monday, July 14, 2008 5:30 pm
Subject: Re: [amibroker] Re: Paul Ho: Memory Challenges with Great Ranking Tool
To: amibroker@xxxxxxxxxps.com

> Yes, this is exactly what I need. A code that will get the 500

> tradableseach day and add this as a condition for the intraday
> trading of the day
> after that. Just scroll up; all the details are there.
>
>
>

> 2008/7/14 :

>
> > Scuse me ? ... I thought what you wanted was a list of the
> 500 tradables
> > that were closest to their 52 Week High as of today ... What
> did I miss ?
> >
> > ----- Original Message -----
> > From: Louis Préfontaine
> > Date: Monday, July 14, 2008 5:17 pm
> > Subject: Re: [amibroker] Re: Paul Ho: Memory Challenges with
> Great Ranking
> > Tool
> > To: amibroker@xxxxxxxxxps.com
> >
> > > This is not possible. I have to backtest each daily bar
> > > considering the top
> > > 500 has been chosen.
> > >
> > >
> > > 2008/7/14 :
> >
> > >
> > > > So create a watchlist with the top 500
> > > >
> > > > ----- Original Message -----
> > > > From: Louis Préfontaine
> > > > Date: Monday, July 14, 2008 4:56 pm
> > > > Subject: Re: [amibroker] Re: Paul Ho: Memory Challenges with
> > > Great Ranking
> > > > Tool
> > > > To: amibroker@xxxxxxxxxps.com
> > > >
> > > > > Hi,
> > > > >
> > > > > The problem I see using PositionScore is that PositionScore
> > > > > considers the
> > > > > number of signals in real-time to determine how many to
> consider> > > > when there
> > > > > are too many, but this is not possible for me because
> the goal
> > > > > is to limit
> > > > > the number of tickers from which to take the signals because
> > > > > with real-time
> > > > > data I can't process more than 500... Or maybe PositionScore
> > > > > can be used to
> > > > > get those 500 tickers in the first place?!
> > > > >
> > > > > Louis
> > > > >
> > > > > p.s. Glenn: I asked to be a member and will try to download
> > > > > osaka ASAP. I
> > > > > will get back to you with this. Thanks!
> > > > >
> > > > >
> > > > >
> > > > > 2008/7/14 :
> > > >
> > > > >
> > > > > > Is there some reason that PositionScore doesn't work ? i.e.
> > > > > assuming> daily data then something to the effect of ...
> > > > > >
> > > > > > PositionScore = C / HHV(C, 252);
> > > > > >
> > > > > > The number of tradables can be limited in other ways ...
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: Louis Préfontaine
> > > > > > Date: Monday, July 14, 2008 2:48 pm
> > > > > > Subject: Re: [amibroker] Re: Paul Ho: Memory
> Challenges with
> > > > > Great Ranking
> > > > > > Tool
> > > > > > To: amibroker@xxxxxxxxxps.com
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > Glenn: Do I have to be a member of amibroker-dll to
> get the
> > > > > OSAKA_105> > plugin? It sure seems like a nice
> feature... So,
> > > > > you believe it
> > > > > > > would do
> > > > > > > exactly what I need, I mean: it will select the 500
> > > stocks by
> > > > > > > ranking based
> > > > > > > on my conditions for EOD day 1 then apply my system for
> > > day 2,
> > > > > > > then do it
> > > > > > > again for EOD day 2 and apply the resulting 500 tickers
> > > to day
> > > > > > > 3, etc.?
> > > > > > > That would be awesome!
> > > > > > >
> > > > > > > Chris: This look like a good idea too, but what do you
> > > mean by
> > > > > > > whether it is
> > > > > > > on the list or not? I export all the results of the
> > > daily scan
> > > > > > > to a .csv
> > > > > > > with the EOD data for the best 500 tickers, then...
> > > what? It
> > > > > > > sure looks
> > > > > > > like a good idea if I can understand a little better how
> > > to do
> > > > > > > it. But do I
> > > > > > > have to do that for each day, and how to put the
> information> > > > > > back into AB?
> > > > > > > But so far your idea seems like the easiest to do, even
> > > if it
> > > > > > > would take
> > > > > > > forever for data going back to last year (but still,
> taking> > > > > > forever is
> > > > > > > better than losing all my money with an unsound strategy)
> > > > > > >
> > > > > > > Ken: " *Are you saying that you want to BACKTEST
> 8000 symbols
> > > > > > > and "select",
> > > > > > > based on profitability, the top 500 most profitable ones
> > > to use
> > > > > > > in your next
> > > > > > > day's trading.*" No; I want to select the 500 tickers
> > > which are
> > > > > > > closest to
> > > > > > > their 52 weeks HHV and use those tickers for
> intraday trading
> > > > > > > the next day.
> > > > > > > It is easy to do in live trading, but I need to find a
> > > way to
> > > > > > > include it in
> > > > > > > backtesting so when I test my strategy I am not
> using 8000
> > > > > > > tickers but
> > > > > > > "only" the 500 closest to HHV based on their
> daily(yesterday)> > > > > > EOD close.
> > > > > > >
> > > > > > > Thanks all for your help. I really feel like this is going
> > > > > somewhere!> >
> > > > > > > Louis
> > > > > > >
> > > > > > >
> > > > > > > 2008/7/13 glennokb :
> > > > > >
> > > > > > >
> > > > > > > > If I understand what you are trying to do, maybe
> this method
> > > > > > > - Osaka!
> > > > > > > >
> > > > > > > > It creates a composite which you can reference in your
> > > > > system for
> > > > > > > > backtesting
> > > > > > > >
> > > > > > > > Note that the 500 may not be precise due to data
> holes (as
> > > > > Graham> > > mentioned). Plus I just added HHV(H,100) as an
> > > > > example but
> > > > > > > this need
> > > > > > > > to be replaced with your rank.
> > > > > > > >
> > > > > > > > Also, check the categoryGroup or Watchlist is
> correct in
> > > > > the code.
> > > > > > > >
> > > > > > > > // Add To Composite RankValue based on Ranking
> calculation.> > > > > > > /*------------------------
> > > > > > > > Notes:
> > > > > > > > 1. Install OSAKA_105.zip ranking located here:
> > > > > > > > http://groups.yahoo.com/group/amibroker-dll/
> > > > > > > > 2. Use CURRENT SYMBOL - an index
> > > > > > > > (ie: symbol with no data holes).
> > > > > > > > 3. Select date range
> > > > > > > > 4. SCAN
> > > > > > > > --------------------------*/
> > > > > > > >
> > > > > > > > osInitialize();
> > > > > > > > #pragma nocache
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // User Variables - enter here
> > > > > > > > // ----------------------------------
> > > > > > > > sGroup = 0; // set to desired watchlist.
> > > > > > > > Rank_No = 500; // set the depth to rank to.
> > > > > > > > // ----------------------------------
> > > > > > > > // USER variables - Used for consistency & Ease
> > > > > > > > // ----------------------------------
> > > > > > > > sov1 = 100;
> > > > > > > > sov2 = 0; // not currently used
> > > > > > > > sov3 = 0; // not currently used
> > > > > > > > sov4 = 0; // not currently used
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // AddToComposite name
> > > > > > > > // ----------------------------------
> > > > > > > >
> > > > > > > > ATCName = "~HHV_Rank";
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // Ranking Calculation
> > > > > > > > // ----------------------------------
> > > > > > > >
> > > > > > > > function Ranking(Sov1,Sov2,Sov3,Sov4)
> > > > > > > > {
> > > > > > > >
> > > > > > > > TO = HHV(H,Sov1);
> > > > > > > >
> > > > > > > > return TO;
> > > > > > > > }
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // End Ranking Calculation
> > > > > > > > // ----------------------------------
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // End User Variables
> > > > > > > > // ----------------------------------
> > > > > > > > StartBar = LastValue( ValueWhen(
> Status("firstbarinrange"),> > > > > > > BarIndex() ) );
> > > > > > > > FinishBar = LastValue( ValueWhen(
> Status("lastbarinrange"),> > > > > > > BarIndex() ) );
> > > > > > > > RankValue = 0; // initialise Rank Value array
> > > > > > > > List = GetCategorySymbols( categoryGroup, sGroup);
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // Create Ranking Table
> > > > > > > > // ----------------------------------
> > > > > > > >
> > > > > > > > sRank = osTabCreate();
> > > > > > > > // Initialize Ranking Columns
> > > > > > > > // Use loop to add columns to cover # of bars ranked.
> > > > > > > > i = StartBar;
> > > > > > > > while (i <= FinishBar)
> > > > > > > > {
> > > > > > > > osTabAddColumn("RROR", 1, sRank);
> > > > > > > > i = i + 1;
> > > > > > > > }
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // Load table with Ranking data
> > > > > > > > // ----------------------------------
> > > > > > > > for (j=0; (sTicker = StrExtract( List,j)) != ""; j++)
> > > > > > > > {
> > > > > > > > SetForeign(sTicker);
> > > > > > > > Rank = Ranking(Sov1,Sov2,Sov3,Sov4);
> > > > > > > > k = StartBar;
> > > > > > > > i = 0;
> > > > > > > > while (k <= Finishbar)
> > > > > > > > {
> > > > > > > > osTabSetNumber(Rank[k], j, i, sRank);
> > > > > > > > i = i + 1;
> > > > > > > > k = k + 1;
> > > > > > > > }
> > > > > > > > RestorePriceArrays();
> > > > > > > > }
> > > > > > > >
> > > > > > > > // ----------------------------------
> > > > > > > > // Sorting rank calculations
> > > > > > > > // ----------------------------------
> > > > > > > >
> > > > > > > > k = StartBar;
> > > > > > > > i = 0;
> > > > > > > > while (k <= Finishbar)
> > > > > > > > {
> > > > > > > > osTabSort(sRank, i, False, True);
> > > > > > > > RankValue[k] = osTabGet(Rank_No-1, i, sRank);
> > > > > > > > i = i + 1;
> > > > > > > > k = k + 1;
> > > > > > > > }
> > > > > > > >
> > > > > > > > // ---------------------------------------
> > > > > > > > // clean up - delete srank table
> > > > > > > > // ---------------------------------------
> > > > > > > > osTabDelete(srank);
> > > > > > > >
> > > > > > > > AddToComposite(rankvalue, ATCName, "x",23);
> > > > > > > >
> > > > > > > > Buy=Sell=1;
> > > > > > > > Filter=1;
> > > > > > > > AddColumn(RankValue, "Rank value",1.0);
> > > > > > > > //END
> > > > > > > > // ---------------------------------------
> > > > > > > >
> > > > > > > > Then place this code in your system for backtesting:
> > > > > > > >
> > > > > > > > HHV_Symbol = Foreign("~HHV_Rank","C");
> > > > > > > > HHV_Rank = HHV(H,100) > HHV_Symbol;
> > > > > > > >
> > > > > > > > Buy = HHV_Rank and cond1 and cond2 etc
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

8.

actionExploration is not recognized

Posted by: "tipequity" l3456@xxxxxxxxxx   tipequity

Tue Jul 15, 2008 12:34 am (PDT)

The following code produces error 29 Variable 'actionexploration' used
without having been initialized. Replacing "actionExploration" with "4"
is the work around.

Buy = (CCI(14) <-100) ;
Sell = (CCI(14) >100) ;

if (Status("ActionEx") == actionExploration)
{
Filter = Buy OR Sell;
}

9a.

Problem with multiple timeframe plots?

Posted by: "bilbo0211" wjdandreta@xxxxxxxxxx   bilbo0211

Tue Jul 15, 2008 12:39 am (PDT)

I am trying to plot a daily, weekly and monthly indicator (like
Bollinger Bands) on one chart e.g., daily.

Sample code:

TimeFrameSet( inWeekly );

P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
Plot( TimeFrameExpand(BBandTop( P, Periods, Width ),inWeekly),
"wBBTop" + _PARAM_VALUES(), Color, Style );
Plot( TimeFrameExpand(BBandBot( P, Periods, Width ),inWeekly),
"wBBBot" + _PARAM_VALUES(), Color, Style );

This plots something on the daily chart but it is clearly not the
weekly BB I see on the weekly chart!

Any suggestions on how to achieve my objective?

Bill

9b.

Re: Problem with multiple timeframe plots?

Posted by: "Graham" kavemanperth@xxxxxxxxx   kavemanperth

Tue Jul 15, 2008 1:15 am (PDT)

you were close

TimeFrameSet( inWeekly );

P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");

BBT = BBandTop( P, Periods, Width );
BBB = BBandBot( P, Periods, Width );
timeframerestore();
Plot( TimeFrameExpand(BBT,inWeekly),"wBBTop" + _PARAM_VALUES(), Color, Style );
Plot( TimeFrameExpand(BBB,inWeekly),"wBBBot" + _PARAM_VALUES(), Color, Style );

2008/7/15 bilbo0211 <wjdandreta@xxxxxxxcom>:
> I am trying to plot a daily, weekly and monthly indicator (like
> Bollinger Bands) on one chart e.g., daily.
>
> Sample code:
>
> TimeFrameSet( inWeekly );
>
> P = ParamField("Price field",-1);
> Periods = Param("Periods", 15, 2, 100, 1 );
> Width = Param("Width", 2, 0, 10, 0.05 );
> Color = ParamColor("Color", colorCycle );
> Style = ParamStyle("Style");
> Plot( TimeFrameExpand(BBandTop( P, Periods, Width ),inWeekly),
> "wBBTop" + _PARAM_VALUES(), Color, Style );
> Plot( TimeFrameExpand(BBandBot( P, Periods, Width ),inWeekly),
> "wBBBot" + _PARAM_VALUES(), Color, Style );
>
> This plots something on the daily chart but it is clearly not the
> weekly BB I see on the weekly chart!
>
> Any suggestions on how to achieve my objective?
>
> Bill
>
>
> ------------------------------------
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
> Yahoo! Groups Links
>
>
>
>

--
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com

Recent Activity

·                                  35

Visit Your Group

Yahoo! News

Kevin Sites

Get coverage of

world crises.

Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Yahoo! Groups

Everyday Wellness Zone

Check out featured

healthy living groups.

Need to Reply?

Click one of the "Reply" links to respond to a specific message in the Daily Digest.

Create New Topic | Visit Your Group on the Web

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

MARKETPLACE


You rock! Blockbuster wants to give you a complimentary trial of - Blockbuster Total Access.

__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___