Thomas, Thanks that was helpful. The RequestTimedRefresh did the trick, however had to create a chart for each instrument. As for the speed, it seems to be able to keep up (sql calls take a fraction of a millisecond). Though it should, metatrader worked really nicely (kind of miss the open, run, close, and only new bars calls), but didn't had an ib interface.
Am still running into trouble for it seems that the indicator is being called all the time, not only when there is a new bar (sometimes hundred of times for each timestamp). Do the value of the current bar keep changing while it is being formed, and that is why the indicator repeatedly called for the same timestamp? Thought of using RequestTimedRefresh(15,false), but am afraid that it would miss the last values, if the bar is being updated during the time period. Will be looking at a activex program, once I finish everything else. Most of the development environments I had didn't like to do java. At least now I am able to concentrate on getting something working, and not on how getting the data stored. Thanks again --- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> wrote: > > Hello, > > You got it all wrong. > > 1. AmiBroker as any well-behaved application does NOT redraw INVISIBLE windows. > If you minimize - the window becomes invisible and stops redrawing. > So it actually multitasks as it should (because it does not eat resources!) > > 2. You can force refresh even if window is hidden if you use RequestTimedRefresh > function with onlyvisible set to FALSE. > > 3. It is generally *very bad* idea what you are doing. Indicators are not > place to > put such performance killer code. SQL server is slow. Much much slower than AFL. > You should either place it in Auto-analysis and run as "Run every" > OR (much better solution) - connect to IB/TWS directly via API or ActiveX > http://individuals.interactivebrokers.com/en/control/apicontrol.php? ib_entity=llc > and leave AmiBroker to do ANALYSIS, not the "data pump" as you are using it now. > > Best regards, > Tomasz Janeczko > amibroker.com
