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

Re: [amibroker] Code Change Question for HHV -- Was: RT AB Sluggish at Small Time Settings --


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: Re: [amibroker] Code Change Question for HHV -- Was: RT AB Sluggish at Small Time Settings --
  • From: Dennis Brown <see3d@xxxxxxxxxxx>
  • Date: Wed, 29 Oct 2008 13:02:54 -0400

PureBytes Links

Trading Reference Links

Ken,

Trace the values that are handed to the function when it takes a long time... then it should be obvious how to test and limit it to something like the first visible bar worst case.

BR,
Dennis

On Oct 29, 2008, at 11:09 AM, Ken Close wrote:

TJ or anyone:
 
That was helpful.
 
Formula has an HHV(C,period); function.
Period is calculated below:
 
bi = BarIndex();
bv = BeginValue(bi);
ev = EndValue(bi);
sv = SelectedValue(bi);
Length = ev - bv;
Days = ev - sv;//EndValue(BarIndex()) - SelectedValue(BarIndex());
Sbv = IIf(bi == bv,1,0);
Period = BarsSince(Sbv);
 
The HHV function takes all the time, but the sluggishness occurs when there is no BeginValue (Green) pole set and 10 min or 5 min Interval is set.  Period thus becomes all of the bars, and the HHV function takes all of the time (Check and Profile said 9 seconds, which seems like 1 minute).
 
Question1: is there a fast execution HHV procedure that can be written (faster than HHV)?  What would it be?
 
Question2: assuming I stay with HHV, how do I limit the length of processing if there is no Green pole (BeginValue) set on the screen (thus limiting bars processed). I tried something using the Min function but did not improve anything.
 
Any simple coding suggestions for my questions?
Ken


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Tomasz Janeczko
Sent: Wednesday, October 29, 2008 6:44 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] RT AB Sluggish at Small Time Settings

Hello,
 
Go to Formula Editor, select Tools->Check And Profile
and found bottleneck in your formula using profiler timing.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Ken Close
Sent: Wednesday, October 29, 2008 11:41 AM
Subject: [amibroker] RT AB Sluggish at Small Time Settings

Can someone suggest what I may check or diagnosis to get a handle on and fix for this problem.
 
I have used AB with my QuoteTracker feed for over a year now.  Of course I have some gaps in my data because QT and my source, Fidelity account, will not permit backfills.
 
Suddenly, yesterday, AB is totally bogged down if I select 5 minute data.  When I start it up, it automatically comes up in hourly mode and is ok.  Switching pole positions for example is almost instantaneous.  If I switch to 15 min display, I get a noticeable delay, maybe 3 to 5 seconds for the pole to appear. (I also have the Task Manager open and can watch broker.exe jump to the top of CPU usage and then drop down.  If I click on 5 min data, CPU goes to 100%, Broker.exe is pegged at near 92 to 95% and it will take literally 1 to 2 minutes to get the cursor back.  Again, the day before yesterday, everything worked fine.
 
What changed?  Nothing that I know of.  I was experimenting with a rather long formula file (developed in EOD environment), and earlier versions worked ok, but maybe this had something to do with the slowdown.  I deleted the formula from the RT database, and rebooted the computer.
 
What else can I try and what other data can I gather to diagnose this problem?
 
Thanks.
 
Running AB 5.19, with XP and plenty of RAM and HD

__._,_.___

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

*********************
TO GET TECHNICAL 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

__,_._,___