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

RE: [amibroker] Re: When AFL just stops updating the chart now and then...



PureBytes Links

Trading Reference Links

>.  I might have another 
> simple chart running in another tab just to keep another symbol 
> database up to date.

There seems to be a very well kept secret about AB that took me over a year to find out. There is really no need to keep a chart running in another tab just to keep it's symbol's data updated.

AB will keep collecting and saving data for any symbol once it had been scanned. There is no need to view it or chart it again for the entire session.

So when I start AB, I run (with an automation script) AA pointing to Scan4AutoSave.afl:

Buy=0;Sell=0;
SymbL2 =
StrLeft(Name(),2);
if( SymbL2 == "~~" ) // ~~~EQUITY IS last change this to the LAST symbol in your database
{
    AB =
CreateObject("Broker.Application");
    AB.SaveDatabase();
}

I apply this only to my (less than 20) favorites (i.e. exclude expired contracts). For safety I run this every 45 min (arbitrary) such that if AB or the computer hang, I will lose only the last 45 minute of data.

I made a suggestion to make this whole process transparent since it is way beyond a beginner’s abilities, but, I guess it is trivial once you know the answer

 

> I keep 300,000 5 second bar database

If this is the database settings, it is only about 17 days of data! I do not use backfill at all since I collect tick data in my database. I want to include the whole 3 month’s futures contract data, so my settings for the number of bars is 1,000,000.

 

>OTOH, I could have another chart running in another tab which just 

>pings messages to the main chart through a static variable to make 

>sure it is alive, and alert me if it has stalled.  Thanks for jogging 

>that Idea.

Would you publish your solution once you have it worked out?

 

Joseph Biran

____________________________________________

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dennis Brown
Sent: Friday, June 27, 2008 9:12 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: When AFL just stops updating the chart now and then...

 

Dan, my comments are embedded:

 

On Jun 27, 2008, at 10:23 PM, monitorit wrote:

 

> Hi Dennis,

> Perhaps you can help me - you'd be the first on this problem :(

> The problem I described is ~daily.

 

I will do my best..

 

> MY AB workspace displays the quotes window, 1-2 t&s windows + 5

> symbol-linked chart windows (1 min, 2 min, 5 min, 15 min and daily).

> Each chart window has 8 sheets - but all these are empty except the

> first sheet with 1-3 panes each and 1 window has a study on the

> second sheet.  Total time (sum) for the 5 charts via 'display chart

> timing' is ~400 msec. Running through these charts afterhours is no

> problem (local db is enabled).. I see all charts windows completed in

> about 4 seconds after changing symbols.

 

My charts are as simple as I can make them.  Just one Main chart which 

run everything.  Can run as fast as 200ms to as slow as 10s depending 

on the trading parameters I am using and the amount of history and 

especially the number of bars I am displaying.  I might have another 

simple chart running in another tab just to keep another symbol 

database up to date.

 

> What do you think are the best settings for the pref>data

> tab 'default db settings' in-memory  cache size (max symbols), (max

> megabytes) and number of bars to load... for a 7400 bar, 100 symbol

> db (and perhaps for a longer db with more symbols).  What do these

> fields actually mean/do?

 

Good questions, wish I knew all those answers.  My settings:

 

I only run about a dozen symbols.

I keep 300,000 5 second bar database

Cache max 82 MB.

I load up to 100,000 bars, but only about 3,000 1 minule bars when 

trading.

 

> I have 4GB (3 GB available in vista32) and

> no other programs running... so is it best to use >1000 megabytes?

 

I have a 2GB virtual XP32 running only AB.  I use all default settings.

 

> What is number of bars to load (does db setting overwrite this?)?

 

I override this in my AFL with SetBarsRequired()

 

> DB settings has a 'flush cache' button.  Doesn't seem to do anything

> for me.  Does it work for you?

 

It would just reload it again if it were flushed.

 

> Refresh and refresh all has no

> effect.  If I do a refresh current sym, I get new data for that sym

> but then no further updates for any symbol.

 

Refresh just forces AFL to run one cycle on the chart.

 

I use RequestTimedRefresh() to make my chart refresh all the time even 

if not quotes are coming in.

 

> My db is 7400 1min bars*100 sym... are you working with a similar

> size?

 

Like I said, 300,000 5 second bars for just a few symbols.

 

> BTW, I know what you mean about getting hypnotized so I get alerted

> to the quote delay with the following in the 1min chart - you can

> probably get it to work with shorter periods or make it say something:

> 

> delayedcolor=IIf(TimeNum()<Now(4)-120 OR DateNum()<Now(3),32,16);

>     //for time at bar start-- 32=colorred, 16=colorblack , red if

> last bar start-time is earlier than 1min20 sec of system time

> //my bar times are at start of interval so min# could be 101

> 

> Plot( C, "Close", delayedcolor, styleNoTitle | ParamStyle("Style") |

> GetPriceStyle() );

 

Assuming that it is not the AFL that is stalled, I could write 

something that would monitor how long since the last quote came in.  

However, in my case, I suspect that the AFL may not be running any 

passes when my charts freeze.

 

OTOH, I could have another chart running in another tab which just 

pings messages to the main chart through a static variable to make 

sure it is alive, and alert me if it has stalled.  Thanks for jogging 

that Idea.

 

Best regards,

Dennis

 

 

> Thanks, Dan

> 

> --- In amibroker@xxxxxxxxxxxxxxx, Dennis Brown <see3d@xxx> wrote:

>> 

>> Hello,

>> 

>> I have something that happens once every few days with my RT charts.

>> 

>> At some point in the day, the chart stops updating.  I also have

>> getRTData() functions in my AFL that also stop.

>> 

>> I don't know if it is the data feed that stops handing the quotes

> to

>> AB, or if XP is not giving the data, or if the AFL loop stops

>> running.  Everything looks normal, but I notice that my broker's

>> charts have moved ahead and my AB charts have stalled (My broker's

>> charts are prone to stalling in fast markets and my AB charts keep

> on

>> ticking).  This can be disconcerting when you are in a fast trade

> and

>> you go blind without realizing it.

>> 

>> I am using DTN IQFeed, but the same thing happened with eSignal in

>> previous years.  The data feed plug-in indicates everything is

> green

>> and working.

>> 

>> Clicking on the chart refresh button starts the chart running again.

>> 

>> I am usually in a panic when this happens, so I have not been able

> to

>> properly go through debug steps to isolate the problem area.

>> 

>> So my questions are:

>> 

>> 1.  Does anyone know the root cause of this?

>> 2.  Is there a way to detect that the chart has stopped updating

>> (other than by eye)?

>> 3.  Is there a way to automatically jump start the updating again

> when

>> it happens?

>> 

>> Thanks for any insights.

>> 

>> If nobody can help, I will ask support.

>> 

>> Best regards,

>> Dennis

>> 

__._,_.___

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

__,_._,___