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

Re: [amibroker] RT chart updating irregularly



PureBytes Links

Trading Reference Links

Hello,

With the help of AB support, I think I have gotten to the bottom of  
this (though I am still working on it with them to make sure).  The  
issue is between the interaction of RequestTimedRefresh() in the chart  
AFL, and the Preferences Realtime chart refresh interval setting.

The two do not perform the same refresh function.  I thought their  
actions were the same and used them that way.

 From what I can figure out:

	Realtime chart refresh interval will update the quote database and  
cause all charts to refresh at the specified interval.

	RequestTimedRefresh( interval ) will not update the quote database,  
but will cause the particular AFL formula to refresh at the specified  
interval.

I had expected that RequestTimedRefresh also updated the quote  
database if needed, and my intended use required it.

You can not make a chart refresh slower than the Preference setting,  
but you can make a chart refresh faster with the RequestTimedRefresh  
function.
I was trying to slow down the refresh rate of my charts with a  
parameter value specified by the user.  Since the Preference setting  
overrides everything else, I set it to a large number ( 30 seconds )  
to keep it out of the way.  Then I set the RequestTimedRefresh value  
to the refresh rate I wanted to have in any particular chart (for  
instance 2 seconds).  This resulted in the charts being refreshed  
every 2 seconds, while the quote data was only updated every 30 seconds.

There does not seem to be a way to control the refresh rate of the  
chart AND have up to the second price quotes at the same time from  
inside AFL.  I tried various tricks like sending out an F5 at the end  
of the AFL, but that did not allow a sufficient delay and interfered  
with other UI interactions.

So why do I want to control this?

I need to update the my chart as often as possible because I have on- 
chart buttons that interact with the user.  User actions are only  
recognized when the AFL of the chart runs.  However, I need to have a  
good portion of a second between chart refreshes so that AB can  
perform its normal user interface functions.  Otherwise the User is  
effectively locked out of getting anything done.  Since my chart  
formula is very complex, it is slow, running anywhere from .5 to 2  
seconds depending on the amount of history I want to include (15-20  
seconds for a full history backtest cycle).   Therefore, I have to  
make tradeoffs between refresh rate and UI responsiveness, which  
requires making adjustments on the fly.  I dedicate one of my 4  
processors to AB, and I want it to run close to 100% load all the time  
during realtime trading.

For now, setting the interval to zero for both settings seems to be  
the best compromise available to me without having to adjust the  
preference setting manually each time I want to change the chart  
history (also a parameter).

Please correct me if you find that I have not understood this  
correctly and have conveyed the wrong information, or have other ideas.

Best regards,
Dennis



On Apr 22, 2009, at 8:31 PM, Dennis Brown wrote:

> Jerry,
>
> I am working with AB Support on tracking it down today.  Do not have
> the answer yet.
>
> I do have two computers set up identically for backup purposes.
>
> Best regards,
> Dennis
>
>
> On Apr 22, 2009, at 4:16 PM, Jerry Gress wrote:
>
>> Hello Dennis,
>>
>> Any solution to your problem? Might want to run on a totally  
>> different
>> computer, plus have back up.
>>
>> Regards,
>>
>> Jerry G
>>
>>
>>
>> -----Original Message-----
>> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
>> On Behalf
>> Of Dennis Brown
>> Sent: Tuesday, April 21, 2009 2:10 PM
>> To: amibroker@xxxxxxxxxxxxxxx
>> Subject: Re: [amibroker] RT chart updating irregularly
>>
>> Thanks for your response Jerry,
>>
>> This is a time chart.  As soon as the bar timer gets to 100%, AB
>> advances the chart one bar and redraws the previous complete bar,  
>> then
>> draws the incomplete new bar, and does not update it again before the
>> bar closes.  The chart is running just fine other than that, updating
>> the RT data, but nothing associated with changed bar data.
>> I also have another simpler chart running on the same database.  It
>> runs in 0.05 seconds and has the same behavior.
>> The market has been slow and steady most of the day.
>> I just gave Zero a try and no better.
>> I have a quad 2.8 GHz with 4 GB RAM.  The CPUs are barely running,  
>> and
>> they are running XP in a virtual machine.  I don't run anything but  
>> AB
>> on my VM.  It is clean as a whistle.  So, I think I am clean on these
>> items.
>>
>> Best regards,
>> Dennis
>>
>> On Apr 21, 2009, at 4:26 PM, Jerry Gress wrote:
>>
>>> Hello,
>>>
>>> I run a 15000 vol chart on the Es/5.09/IB and when the count down
>>> gets to
>>> zero it takes more than 500 TO 2000 traded shares before the next
>>> bar starts
>>> to plot. I realize this could be due to vol coming in, but a change
>>> to a
>>> faster computer made a noticeable improvement. My total time on that
>>> chart
>>> is @ .188 secs. As somebody told me awhile ago AB has a lot of
>>> things to
>>> due. My Bracket Trader Entry Program always shows price before AB in
>>> fast
>>> markets.
>>>
>>> My guess is your .782 time (I've pared down the formulas as much as
>>> possible) is part of the problem. Also you might want to try chart
>>> timing of
>>> '0' zero to get the 'as needed' CPU usage. In addition, check the
>>> Windows
>>> Task Manager, recently found on a different computer running AD-Ware
>>> all the
>>> time!
>>>
>>> Going through some old messages, TJ talks about refresh rates and
>>> forced
>>> recalculation of formula. Can send if interested.
>>>
>>> Regards,
>>>
>>> Jerry Gress
>>>
>>>
>>> -----Original Message-----
>>> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
>>> On Behalf
>>> Of Dennis Brown
>>> Sent: Tuesday, April 21, 2009 9:09 AM
>>> To: amibroker@xxxxxxxxxxxxxxx
>>> Subject: [amibroker] RT chart updating irregularly
>>>
>>> Hello,
>>>
>>> I am running DTN IQFeed 1 minute realtime database on @ES# futures.
>>> Since yesterday, I have noticed that my last bar in the chart is not
>>> being updated until the bar closes.  I would not have realized it
>>> except I also display the realtime bid/ask/last levels on my charts
>>> and the bar is not registering the realtime data.
>>> The chart is running on timed 2 second refresh (.782 sec total  
>>> redraw
>>> time).  It is verified to be refreshing at least every 2 seconds.
>>> If I click on the manual refresh button in AB (F5), it updates the
>>> chart correctly.
>>>
>>> I have not been trading realtime with the program for a few weeks
>>> (which would be impossible with this problem), because I have been
>>> doing a lot of offline code rewriting and testing for a while, so I
>>> don't really know how long this might have been going on.
>>>
>>> I am totally baffled.  I have gone back through my database and
>>> preference settings looking for a clue.
>>>
>>> It must have something to do with the database interface not being
>>> asked to get new data on a regular basis.
>>>
>>> Anyone else having this problem with DTN or other RT data providers?
>>>
>>> AB 5.24b IQFeed 4.5.0.3
>>>
>>> Attached screenshot showing the realtime bid/ask/last levels above
>>> the
>>> last bar for a 95% done bar.
>>>
>>> If it is just my problem, I will contact support.
>>>
>>> TIA,
>>>
>>> Dennis
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> **** IMPORTANT PLEASE READ ****
>>> This group is for the discussion between users only.
>>> This is *NOT* technical support channel.
>>>
>>> TO GET TECHNICAL SUPPORT send an e-mail directly to
>>> SUPPORT {at} amibroker.com
>>>
>>> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
>>> http://www.amibroker.com/feedback/
>>> (submissions sent via other channels won't be considered)
>>>
>>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> **** IMPORTANT PLEASE READ ****
>>> This group is for the discussion between users only.
>>> This is *NOT* technical support channel.
>>>
>>> TO GET TECHNICAL SUPPORT send an e-mail directly to
>>> SUPPORT {at} amibroker.com
>>>
>>> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
>>> http://www.amibroker.com/feedback/
>>> (submissions sent via other channels won't be considered)
>>>
>>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>
>>
>>
>> ------------------------------------
>>
>> **** IMPORTANT PLEASE READ ****
>> This group is for the discussion between users only.
>> This is *NOT* technical support channel.
>>
>> TO GET TECHNICAL SUPPORT send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
>> http://www.amibroker.com/feedback/
>> (submissions sent via other channels won't be considered)
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>> ------------------------------------
>>
>> **** IMPORTANT PLEASE READ ****
>> This group is for the discussion between users only.
>> This is *NOT* technical support channel.
>>
>> TO GET TECHNICAL SUPPORT send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
>> http://www.amibroker.com/feedback/
>> (submissions sent via other channels won't be considered)
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> Yahoo! Groups Links
>>
>>
>>
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>



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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/