Tuesday, October 2, 2007

[amibroker] Digest Number 7472

There are 25 messages in this issue.

Topics in this digest:

1a. Re: Data Plugin / Preserve Database
From: Sachin
1b. Re: Data Plugin / Preserve Database
From: Tomasz Janeczko

2a. Re: [SPAM] Re: [SPAM] [amibroker] Amiquote Problem - Quote MFC StopW
From: Vinay Garg

3a. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: Padhu
3b. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: Tomasz Janeczko
3c. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: J. Biran
3d. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: dingo
3e. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: Lal
3f. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: Tomasz Janeczko
3g. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: J. Biran
3h. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: J. Biran
3i. Re: Amibroker High CPU Utilization-anyone else seeing this?.
From: qavatina

4. How can I convert AmiBroker tick database to AmiBroker 1-minute data
From: irek_smaczny

5a. Re: Can I use field 'time' from DDE ?
From: irek_smaczny

6. Canadian stock sectors and industries
From: rollyzhang

7a. trading system ready to use
From: metastockv10
7b. Re: trading system ready to use
From: Tomasz Janeczko

8a. Information on BATMAN.
From: Don Lindberg
8b. Re: Information on BATMAN.
From: MarkK
8c. Re: Information on BATMAN.
From: Don Lindberg

9a. Re: Custom bactester metrics & Van Tharps per trade r multiple
From: justinwonono

10. Measuring Execution Order and Timing for Window Panes
From: Herman

11a. How to make the opposite of this formula
From: Mohammed
11b. Re: How to make the opposite of this formula
From: Padhu

12. IB autotrade
From: Ara Kaloustian


Messages
________________________________________________________________________

1a. Re: Data Plugin / Preserve Database
Posted by: "Sachin" sachin_13@yahoo.com sachin_13
Date: Tue Oct 2, 2007 4:06 am ((PDT))

What about nLastValid on startup of the plugin , which is always -1.
How does it know which is the last bar updated and which bar to update
next. Even on exiting the Preferences menu nLastValid is set to -1
when GetQuotes is called.

Help TJ.

--- In amibroker@yahoogroups.com, "Tomasz Janeczko" <groups@...> wrote:
>
> Hello,
>
> It is automatically saved. You need to go to File->Database Settings
> and define number of bars to be preserved there.
> And make sure that "Local data storage" is set to "Enabled.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "Sachin" <sachin_13@...>
> To: <amibroker@yahoogroups.com>
> Sent: Tuesday, October 02, 2007 9:14 AM
> Subject: [amibroker] Data Plugin / Preserve Database
>
>
> > How to make AB preserve a database for a streaming real time source
> > which does not support backfill/hist. data from the remote server and
> > depends on the current price to build the database and is updated
> > using ::SendMessage(ParentWn,WM_USER_STREAMING_UPDATE... -> GetQuotes
> > Mechanism and not the Timer mechanism ?
> >
> > When writing a RT data plugin nLastValid always is -1 when GetQuotes
> > is called for the first time so automatically on startup the previous
> > quotes are deleted
> >
> > also
> >
> > when the timer event fires periodically ( Preferences -> Intraday ->
> > Realtime chart refresh ) again GetQuotes is called with the value of
> > nLastValid as -1.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
>


Messages in this topic (4)
________________________________________________________________________

1b. Re: Data Plugin / Preserve Database
Posted by: "Tomasz Janeczko" groups@amibroker.com amibroker
Date: Tue Oct 2, 2007 4:20 am ((PDT))

Hello,

It is not always -1. Once you feed the data it won't be -1 anymore
and if local data storage is set to enabled (IMPORTANT!) it will stay > 0 between runs.
Use QuoteTracker plugin source code included in the ADK.

LastBar update date is the datetime of Quotes[ nLastValid ]
(provided that nLastValid > 0 )

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Sachin" <sachin_13@yahoo.com>
To: <amibroker@yahoogroups.com>
Sent: Tuesday, October 02, 2007 1:06 PM
Subject: [amibroker] Re: Data Plugin / Preserve Database


> What about nLastValid on startup of the plugin , which is always -1.
> How does it know which is the last bar updated and which bar to update
> next. Even on exiting the Preferences menu nLastValid is set to -1
> when GetQuotes is called.
>
> Help TJ.
>
>
>
> --- In amibroker@yahoogroups.com, "Tomasz Janeczko" <groups@...> wrote:
>>
>> Hello,
>>
>> It is automatically saved. You need to go to File->Database Settings
>> and define number of bars to be preserved there.
>> And make sure that "Local data storage" is set to "Enabled.
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>> ----- Original Message -----
>> From: "Sachin" <sachin_13@...>
>> To: <amibroker@yahoogroups.com>
>> Sent: Tuesday, October 02, 2007 9:14 AM
>> Subject: [amibroker] Data Plugin / Preserve Database
>>
>>
>> > How to make AB preserve a database for a streaming real time source
>> > which does not support backfill/hist. data from the remote server and
>> > depends on the current price to build the database and is updated
>> > using ::SendMessage(ParentWn,WM_USER_STREAMING_UPDATE... -> GetQuotes
>> > Mechanism and not the Timer mechanism ?
>> >
>> > When writing a RT data plugin nLastValid always is -1 when GetQuotes
>> > is called for the first time so automatically on startup the previous
>> > quotes are deleted
>> >
>> > also
>> >
>> > when the timer event fires periodically ( Preferences -> Intraday ->
>> > Realtime chart refresh ) again GetQuotes is called with the value of
>> > nLastValid as -1.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > 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
>> >
>> >
>> >
>> >
>> >
>>
>
>
>
>
> 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
>
>
>
>
>


Messages in this topic (4)
________________________________________________________________________
________________________________________________________________________

2a. Re: [SPAM] Re: [SPAM] [amibroker] Amiquote Problem - Quote MFC StopW
Posted by: "Vinay Garg" vinaygarg@eth.net vgarg59
Date: Tue Oct 2, 2007 5:50 am ((PDT))

Dear Tomasz

OK thank you. Will keep this in mind

Regards

Vinay

_____

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Tomasz Janeczko
Sent: Tuesday, October 02, 2007 2:14 PM
To: amibroker@yahoogroups.com
Subject: [SPAM] Re: [SPAM] [amibroker] Amiquote Problem - Quote MFC Stop
Working

Hello,

AmiBroker and AmiQuote works perfectly on Vista - I tested it extensively -
just install version 5.00 from

http://www.amibroke <http://www.amibroker.com/download.html>
r.com/download.html

This is requirement - you need to install version 5.0


Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message -----

From: Vinay Garg <mailto:vinaygarg@eth.net>

To: amibroker@yahoogrou <mailto:amibroker@yahoogroups.com> ps.com

Sent: Monday, October 01, 2007 1:01 PM

Subject: RE: [SPAM] [amibroker] Amiquote Problem - Quote MFC Stop Working

Dear friend

Forget Vista and switch back to XP. I too got a new Laptop with Vista. None
of my realtime software worked. Some bug or the other. So I bought a XP home
edition, partitioned my hard disk, loaded XP in C Drive and Vista in D
Drive. It became a dual boot with XP as default on boot up screen. When all
glitches are removed, will switch back to Vista and uninstall XP

Regards

Vinay


_____


From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Arifin Z. Alwie
Sent: Sunday, September 30, 2007 7:39 AM
To: amibroker@yahoogroups.com
Subject: [SPAM] [amibroker] Amiquote Problem - Quote MFC Stop Working

Hello All,

I start using my new notebook with Vista in it. And install my 4.905
Amibroker on it.

But I always get my Amiquote hung after downloading some numbers of quotes
with error " Quote MFC Application stop working..."

Will someone help to solve this problem please.

Thanks


Messages in this topic (4)
________________________________________________________________________
________________________________________________________________________

3a. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "Padhu" ccie8340@yahoo.com ccie8340
Date: Tue Oct 2, 2007 7:08 am ((PDT))

Thanks Tomasz. I have no no loops. No complex indicators.
Just a lot of timeframe expands.

I will try the AFL timing and see. If I am unable to find out I will send it to support.

I have no doubt that AFL is the fastest out there. I have been using amibroker since 2004 and I love each and each every day of my experience with it.

Its just that I am perplexed why the CPU would get bogged down like this.
Thanks again.

Will try the AFL timing you and Herman put together.
Cheers,Padhu

----- Original Message -----
From: Tomasz Janeczko
To: amibroker@yahoogroups.com
Sent: Tuesday, October 02, 2007 3:34 AM
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.

That's simple:
one of your formulas is very badly coded - and it eats the CPU.

Under normal circumstances the CPU floats in 8..20% use.

You need to use Tools->Preferences->Miscellaneous and check "Display chart timing"
then watch the timings each chart is showing.

All built-in formulas execute well below 0.1 second and this should be your target.
If any formula needs more than 0.5 sec to execute it is badly written and it should not be used.
You must either rewrite it or send it to us and we will tell you what is wrong.
But again: any formula that executes in more than 0.5 sec is NOT to be used in real-time
and requires either rewrite or removal.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Padhu
To: amibroker@yahoogroups.com
Sent: Tuesday, October 02, 2007 2:42 AM
Subject: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.


Folks:

Attached is the task manager output when Amibroker 4.90.5 is runnning. It always spikes back and forth and stays very high near 90-100% . process shows broker.exe spiking.
I have only 6 charts attached.

I have noticed this in the past when I had indicators attached to more than 8 charts. Now I have only 6 six. Other than 1 , all other indicators are all fairly simple...no looping etc..But uses timeframe expands from daily etc.

I have intel p4 2GHz cpu with 768MB ram.

anyone else seeing this?.

Thanks,Padhu



Messages in this topic (21)
________________________________________________________________________

3b. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "Tomasz Janeczko" groups@amibroker.com amibroker
Date: Tue Oct 2, 2007 8:59 am ((PDT))

Hello,

Send the code to support. Lot of timeframeexpands does not tell too much. Lots means hundreds or tens?
There should be no reason to put more than few timeframeexpand in the code. If you need something from daily
timeframe - calculate everything you need in daily timeframe and then expand the FINAL result ONCE.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Padhu
To: amibroker@yahoogroups.com
Sent: Tuesday, October 02, 2007 4:08 PM
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.


Thanks Tomasz. I have no no loops. No complex indicators.
Just a lot of timeframe expands.

I will try the AFL timing and see. If I am unable to find out I will send it to support.

I have no doubt that AFL is the fastest out there. I have been using amibroker since 2004 and I love each and each every day of my experience with it.

Its just that I am perplexed why the CPU would get bogged down like this.
Thanks again.

Will try the AFL timing you and Herman put together.
Cheers,Padhu

----- Original Message -----
From: Tomasz Janeczko
To: amibroker@yahoogroups.com
Sent: Tuesday, October 02, 2007 3:34 AM
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.

That's simple:
one of your formulas is very badly coded - and it eats the CPU.

Under normal circumstances the CPU floats in 8..20% use.

You need to use Tools->Preferences->Miscellaneous and check "Display chart timing"
then watch the timings each chart is showing.

All built-in formulas execute well below 0.1 second and this should be your target.
If any formula needs more than 0.5 sec to execute it is badly written and it should not be used.
You must either rewrite it or send it to us and we will tell you what is wrong.
But again: any formula that executes in more than 0.5 sec is NOT to be used in real-time
and requires either rewrite or removal.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Padhu
To: amibroker@yahoogroups.com
Sent: Tuesday, October 02, 2007 2:42 AM
Subject: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.


Folks:

Attached is the task manager output when Amibroker 4.90.5 is runnning. It always spikes back and forth and stays very high near 90-100% . process shows broker.exe spiking.
I have only 6 charts attached.

I have noticed this in the past when I had indicators attached to more than 8 charts. Now I have only 6 six. Other than 1 , all other indicators are all fairly simple...no looping etc..But uses timeframe expands from daily etc.

I have intel p4 2GHz cpu with 768MB ram.

anyone else seeing this?.

Thanks,Padhu



Messages in this topic (21)
________________________________________________________________________

3c. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "J. Biran" jbiran@pacbell.net jbiran
Date: Tue Oct 2, 2007 9:04 am ((PDT))

One easy way to see if the CPU hog is AB or not, minimize AB.

If CPU usage drops significantly, it is AB.

Joseph Biran
____________________________________________

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Padhu
Sent: Tuesday, October 02, 2007 7:08 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Thanks Tomasz. I have no no loops. No complex indicators.

Just a lot of timeframe expands.

I will try the AFL timing and see. If I am unable to find out I will send it
to support.

I have no doubt that AFL is the fastest out there. I have been using
amibroker since 2004 and I love each and each every day of my experience
with it.

Its just that I am perplexed why the CPU would get bogged down like this.

Thanks again.

Will try the AFL timing you and Herman put together.

Cheers,Padhu

----- Original Message -----

From: Tomasz Janeczko <mailto:groups@amibroker.com>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 3:34 AM

Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

That's simple:

one of your formulas is very badly coded - and it eats the CPU.

Under normal circumstances the CPU floats in 8..20% use.

You need to use Tools->Preferences->Miscellaneous and check "Display chart
timing"

then watch the timings each chart is showing.

All built-in formulas execute well below 0.1 second and this should be your
target.

If any formula needs more than 0.5 sec to execute it is badly written and it
should not be used.

You must either rewrite it or send it to us and we will tell you what is
wrong.

But again: any formula that executes in more than 0.5 sec is NOT to be used
in real-time

and requires either rewrite or removal.


Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message -----

From: Padhu <mailto:ccie8340@yahoo.com>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 2:42 AM

Subject: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Folks:

Attached is the task manager output when Amibroker 4.90.5 is runnning. It
always spikes back and forth and stays very high near 90-100% . process
shows broker.exe spiking.

I have only 6 charts attached.

I have noticed this in the past when I had indicators attached to more than
8 charts. Now I have only 6 six. Other than 1 , all other indicators are all
fairly simple...no looping etc..But uses timeframe expands from daily etc.

I have intel p4 2GHz cpu with 768MB ram.

anyone else seeing this?.

Thanks,Padhu


Messages in this topic (21)
________________________________________________________________________

3d. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "dingo" dingo@hargray.com dingodigital
Date: Tue Oct 2, 2007 9:06 am ((PDT))

Please explain.

d


_____

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of J. Biran
Sent: Tuesday, October 02, 2007 12:04 PM
To: amibroker@yahoogroups.com
Subject: RE: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

One easy way to see if the CPU hog is AB or not, minimize AB.

If CPU usage drops significantly, it is AB.

Joseph Biran
____________________________________________

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Padhu
Sent: Tuesday, October 02, 2007 7:08 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Thanks Tomasz. I have no no loops. No complex indicators.

Just a lot of timeframe expands.

I will try the AFL timing and see. If I am unable to find out I will send it
to support.

I have no doubt that AFL is the fastest out there. I have been using
amibroker since 2004 and I love each and each every day of my experience
with it.

Its just that I am perplexed why the CPU would get bogged down like this.

Thanks again.

Will try the AFL timing you and Herman put together.

Cheers,Padhu

----- Original Message -----

From: Tomasz <mailto:groups@amibroker.com> Janeczko

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 3:34 AM

Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

That's simple:

one of your formulas is very badly coded - and it eats the CPU.

Under normal circumstances the CPU floats in 8..20% use.

You need to use Tools->Preferences->Miscellaneous and check "Display chart
timing"

then watch the timings each chart is showing.

All built-in formulas execute well below 0.1 second and this should be your
target.

If any formula needs more than 0.5 sec to execute it is badly written and it
should not be used.

You must either rewrite it or send it to us and we will tell you what is
wrong.

But again: any formula that executes in more than 0.5 sec is NOT to be used
in real-time

and requires either rewrite or removal.


Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message -----

From: Padhu <mailto:ccie8340@yahoo.com>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 2:42 AM

Subject: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Folks:

Attached is the task manager output when Amibroker 4.90.5 is runnning. It
always spikes back and forth and stays very high near 90-100% . process
shows broker.exe spiking.

I have only 6 charts attached.

I have noticed this in the past when I had indicators attached to more than
8 charts. Now I have only 6 six. Other than 1 , all other indicators are all
fairly simple...no looping etc..But uses timeframe expands from daily etc.

I have intel p4 2GHz cpu with 768MB ram.

anyone else seeing this?.

Thanks,Padhu


Messages in this topic (21)
________________________________________________________________________

3e. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "Lal" klal25@yahoo.co.uk klal25
Date: Tue Oct 2, 2007 9:21 am ((PDT))

Another possibility - assuming it is Windows XP, bring up Task Manager and sort the Processes by the "CPU" column.

Lal

----- Original Message ----
From: J. Biran <jbiran@pacbell.net>
To: amibroker@yahoogroups.com
Sent: Tuesday, 2 October, 2007 5:04:09 PM
Subject: RE: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.




One easy way to see if the CPU hog is AB or not, minimize AB.

If CPU usage drops significantly, it is AB.


Joseph Biran

____________ _________ _________ _________ _____

From:
amibroker@yahoogrou ps.com [mailto:amibroker@ yahoogroups. com] On Behalf Of Padhu

Sent: Tuesday, October 02, 2007 7:08 AM

To: amibroker@yahoogrou ps.com

Subject: Re: [amibroker] Amibroker High CPU Utilization- anyone else
seeing this?.


Thanks
Tomasz. I have no no loops. No complex indicators.


Just
a lot of timeframe expands.




I
will try the AFL timing and see. If I am unable to find out I will send it to
support.




I
have no doubt that AFL is the fastest out there. I have been using amibroker
since 2004 and I love each and each every day of my experience with it.




Its
just that I am perplexed why the CPU would get bogged down like this.


Thanks
again.




Will
try the AFL timing you and Herman put together.


Cheers,Padhu








-----
Original Message -----


From: Tomasz Janeczko


To: amibroker@yahoogrou ps.com


Sent: Tuesday, October 02,
2007 3:34 AM


Subject: Re: [amibroker]
Amibroker High CPU Utilization- anyone else seeing this?.




That's simple:


one of your formulas is very
badly coded - and it eats the CPU.




Under normal circumstances
the CPU floats in 8..20% use.




You need to use
Tools->Preferences->Miscellaneous and check "Display chart
timing"


then watch the timings each
chart is showing.




All built-in formulas execute
well below 0.1 second and this should be your target.


If any formula needs more
than 0.5 sec to execute it is badly written and it should not be used.


You must either rewrite it or
send it to us and we will tell you what is wrong.


But again: any formula that
executes in more than 0.5 sec is NOT to be used in real-time


and requires either rewrite
or removal.


Best regards,

Tomasz Janeczko

amibroker.com


-----
Original Message -----


From: Padhu


To: amibroker@yahoogrou ps.com


Sent: Tuesday, October 02,
2007 2:42 AM


Subject: [amibroker]
Amibroker High CPU Utilization- anyone else seeing this?.




Folks:




Attached
is the task manager output when Amibroker 4.90.5 is runnning. It always
spikes back and forth and stays very high near 90-100% . process shows
broker.exe spiking.


I
have only 6 charts attached.




I
have noticed this in the past when I had indicators attached to more than 8
charts. Now I have only 6 six. Other than 1 , all other indicators are all
fairly simple...no looping etc..But uses timeframe expands from daily etc.




I
have intel p4 2GHz cpu with 768MB ram.




anyone
else seeing this?.




Thanks,Padhu








<!--

#ygrp-mkp{
border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;}
#ygrp-mkp hr{
border:1px solid #d8d8d8;}
#ygrp-mkp #hd{
color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;}
#ygrp-mkp #ads{
margin-bottom:10px;}
#ygrp-mkp .ad{
padding:0 0;}
#ygrp-mkp .ad a{
color:#0000ff;text-decoration:none;}
-->

<!--

#ygrp-sponsor #ygrp-lc{
font-family:Arial;}
#ygrp-sponsor #ygrp-lc #hd{
margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
#ygrp-sponsor #ygrp-lc .ad{
margin-bottom:10px;padding:0 0;}
-->

<!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a{
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc{
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o{font-size:0;}
.MsoNormal{
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
.replbq{margin:4;}
-->


___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/

Messages in this topic (21)
________________________________________________________________________

3f. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "Tomasz Janeczko" groups@amibroker.com amibroker
Date: Tue Oct 2, 2007 10:40 am ((PDT))

Hello,

How many times I have to explain that in ANY program that allows custom formulas,
the USER can write formula that will executed slow. And this is exactly what is happening.

The USER wrote the formula badly and I offered him help in fixing HIS formula.
Any formula can be written so bad that it will execute 1000x slower than it should.

I can take Visual C++ or Assembler or any language and I can demonstrate that I can write
the code that will take one hour, month or year to execute. And this has ABSOLUTELY NOTHING
to do with the language you are using.

So it is not AB.
It is THE USER who controls it.

Any formula that is shipped with AmiBroker executes well below 0.1 second and causes less than few percent CPU load.

AmiBroker runs at PHENOMENAL speed !

See the example code:
GetPerformanceCounter(1);

for( i = 0; i < 10000; i++ )
{
x = High + Low;
}

NumberOfOperations = BarCount * i;

timeperadd = GetPerformanceCounter(1);

for( i = 0; i < 10000; i++ )
{
y = x / 2;
}

timeperdiv= GetPerformanceCounter(1);

StrFormat("Total Number of operations = %12.12g", NumberOfOperations );
StrFormat("Total time of additions [milliseconds] = %.2f", timeperadd );
StrFormat("Time per one addition [milliseconds] = %.9f", timeperadd/NumberOfOperations );
StrFormat("Number of additions per second = %12.12g", 1000/(timeperadd/NumberOfOperations) );
StrFormat("Total time of divisions [milliseconds] = %.2f", timeperdiv );
StrFormat("Time per one divisions [milliseconds] = %.9f", timeperdiv /NumberOfOperations );
StrFormat("Number of divisions per second = %12.12g", 1000/(timeperdiv /NumberOfOperations) );


On 2GHz Athlon the results are as follows:

Total Number of operations = 18040000
Total time of additions [milliseconds] = 50.25
Time per one addition [milliseconds] = 0.000002785
Number of additions per second = 359021216
Total time of divisions [milliseconds] = 85.39
Time per one divisions [milliseconds] = 0.000004733
Number of divisions per second = 211270320

(Test was performed on 101000 bars data, that accounts for 3MB - which is MORE than on-chip cache size, therefore memory access times were accounted in,
note that tests involve arithmetic operation PLUS two memory reads and one memory write per iteration)

That gives phenomenal speed of
359 MEGAFLOPS (addition) or 211 MEGAFLOPS (division) - where ONE MEGAFLOP is one million of floating point operations per second (including data read/write)
http://en.wikipedia.org/wiki/Megaflop

This is about AS FAST AS this CPU is capable of running.
This is most amazing fact because it proves that AFL when running array operations runs AS FAST AS it would be possible if your code was written directly in MACHINE CODE
(taking into account regular floating point operations, *not* SSE, 3dNow or other SIMD)
In other words AFL has near-zero overhead when running array operations and can be compared with assembly language when running array operations.

As a comparision JScript on the same machine runs at speed of only 0.8 MFLOPS (divisions). That shows that JScript 250 times slower than AFL.

Bottom line: there is simply nothing faster than AFL. So if your formula executes slowly it is your formula bad coding, not AmiBroker.

For the reference I have been running AmiBroker even on low end 133Mhz Pentium IN REAL TIME.

And Amiga version of AmiBroker
was running OK even on 7MHz (yes SEVEN MEGAHERTZ == 0.007 GHz) processor and 1 MB (yes ONE megabyte) of RAM.
AFL engine exactly the same in both.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: J. Biran
To: amibroker@yahoogroups.com
Sent: Tuesday, October 02, 2007 6:04 PM
Subject: RE: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.


One easy way to see if the CPU hog is AB or not, minimize AB.

If CPU usage drops significantly, it is AB.

Joseph Biran
____________________________________________

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf Of Padhu
Sent: Tuesday, October 02, 2007 7:08 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.

Thanks Tomasz. I have no no loops. No complex indicators.

Just a lot of timeframe expands.

I will try the AFL timing and see. If I am unable to find out I will send it to support.

I have no doubt that AFL is the fastest out there. I have been using amibroker since 2004 and I love each and each every day of my experience with it.

Its just that I am perplexed why the CPU would get bogged down like this.

Thanks again.

Will try the AFL timing you and Herman put together.

Cheers,Padhu

----- Original Message -----

From: Tomasz Janeczko

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 3:34 AM

Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.

That's simple:

one of your formulas is very badly coded - and it eats the CPU.

Under normal circumstances the CPU floats in 8..20% use.

You need to use Tools->Preferences->Miscellaneous and check "Display chart timing"

then watch the timings each chart is showing.

All built-in formulas execute well below 0.1 second and this should be your target.

If any formula needs more than 0.5 sec to execute it is badly written and it should not be used.

You must either rewrite it or send it to us and we will tell you what is wrong.

But again: any formula that executes in more than 0.5 sec is NOT to be used in real-time

and requires either rewrite or removal.


Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message -----

From: Padhu

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 2:42 AM

Subject: [amibroker] Amibroker High CPU Utilization-anyone else seeing this?.

Folks:

Attached is the task manager output when Amibroker 4.90.5 is runnning. It always spikes back and forth and stays very high near 90-100% . process shows broker.exe spiking.

I have only 6 charts attached.

I have noticed this in the past when I had indicators attached to more than 8 charts. Now I have only 6 six. Other than 1 , all other indicators are all fairly simple...no looping etc..But uses timeframe expands from daily etc.

I have intel p4 2GHz cpu with 768MB ram.

anyone else seeing this?.

Thanks,Padhu



Messages in this topic (21)
________________________________________________________________________

3g. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "J. Biran" jbiran@pacbell.net jbiran
Date: Tue Oct 2, 2007 12:41 pm ((PDT))

It seems that when AB is not displaying charts (minimized) it is doing
little besides collecting RT data (see attached)

Joseph Biran
____________________________________________

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of dingo
Sent: Tuesday, October 02, 2007 9:06 AM
To: amibroker@yahoogroups.com
Subject: RE: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Please explain.

d

_____

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of J. Biran
Sent: Tuesday, October 02, 2007 12:04 PM
To: amibroker@yahoogroups.com
Subject: RE: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

One easy way to see if the CPU hog is AB or not, minimize AB.

If CPU usage drops significantly, it is AB.

Joseph Biran
____________________________________________

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Padhu
Sent: Tuesday, October 02, 2007 7:08 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Thanks Tomasz. I have no no loops. No complex indicators.

Just a lot of timeframe expands.

I will try the AFL timing and see. If I am unable to find out I will send it
to support.

I have no doubt that AFL is the fastest out there. I have been using
amibroker since 2004 and I love each and each every day of my experience
with it.

Its just that I am perplexed why the CPU would get bogged down like this.

Thanks again.

Will try the AFL timing you and Herman put together.

Cheers,Padhu

----- Original Message -----

From: Tomasz Janeczko <mailto:groups@amibroker.com>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 3:34 AM

Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

That's simple:

one of your formulas is very badly coded - and it eats the CPU.

Under normal circumstances the CPU floats in 8..20% use.

You need to use Tools->Preferences->Miscellaneous and check "Display chart
timing"

then watch the timings each chart is showing.

All built-in formulas execute well below 0.1 second and this should be your
target.

If any formula needs more than 0.5 sec to execute it is badly written and it
should not be used.

You must either rewrite it or send it to us and we will tell you what is
wrong.

But again: any formula that executes in more than 0.5 sec is NOT to be used
in real-time

and requires either rewrite or removal.


Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message -----

From: Padhu <mailto:ccie8340@yahoo.com>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 2:42 AM

Subject: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Folks:

Attached is the task manager output when Amibroker 4.90.5 is runnning. It
always spikes back and forth and stays very high near 90-100% . process
shows broker.exe spiking.

I have only 6 charts attached.

I have noticed this in the past when I had indicators attached to more than
8 charts. Now I have only 6 six. Other than 1 , all other indicators are all
fairly simple...no looping etc..But uses timeframe expands from daily etc.

I have intel p4 2GHz cpu with 768MB ram.

anyone else seeing this?.

Thanks,Padhu


Messages in this topic (21)
________________________________________________________________________

3h. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "J. Biran" jbiran@pacbell.net jbiran
Date: Tue Oct 2, 2007 12:50 pm ((PDT))

Ouch!

I wasn't blaming AB. I just suggested a quick verification method of which
application is consuming the CPU resources.
(see my other reply with attached screen shot)

Joseph Biran
____________________________________________

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Tomasz Janeczko
Sent: Tuesday, October 02, 2007 10:41 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Hello,

How many times I have to explain that in ANY program that allows custom
formulas,

the USER can write formula that will executed slow. And this is exactly what
is happening.

The USER wrote the formula badly and I offered him help in fixing HIS
formula.

Any formula can be written so bad that it will execute 1000x slower than it
should.

I can take Visual C++ or Assembler or any language and I can demonstrate
that I can write

the code that will take one hour, month or year to execute. And this has
ABSOLUTELY NOTHING

to do with the language you are using.

So it is not AB.

It is THE USER who controls it.

Any formula that is shipped with AmiBroker executes well below 0.1 second
and causes less than few percent CPU load.

AmiBroker runs at PHENOMENAL speed !

See the example code:

GetPerformanceCounter(1);

for( i = 0; i < 10000; i++ )
{
x = High + Low;
}

NumberOfOperations = BarCount * i;

timeperadd = GetPerformanceCounter(1);

for( i = 0; i < 10000; i++ )
{
y = x / 2;
}

timeperdiv= GetPerformanceCounter(1);

StrFormat("Total Number of operations = %12.12g", NumberOfOperations );
StrFormat("Total time of additions [milliseconds] = %.2f", timeperadd );
StrFormat("Time per one addition [milliseconds] = %.9f",
timeperadd/NumberOfOperations );
StrFormat("Number of additions per second = %12.12g",
1000/(timeperadd/NumberOfOperations) );
StrFormat("Total time of divisions [milliseconds] = %.2f", timeperdiv );
StrFormat("Time per one divisions [milliseconds] = %.9f", timeperdiv
/NumberOfOperations );
StrFormat("Number of divisions per second = %12.12g", 1000/(timeperdiv
/NumberOfOperations) );

On 2GHz Athlon the results are as follows:

Total Number of operations = 18040000
Total time of additions [milliseconds] = 50.25
Time per one addition [milliseconds] = 0.000002785
Number of additions per second = 359021216
Total time of divisions [milliseconds] = 85.39
Time per one divisions [milliseconds] = 0.000004733
Number of divisions per second = 211270320

(Test was performed on 101000 bars data, that accounts for 3MB - which is
MORE than on-chip cache size, therefore memory access times were accounted
in,

note that tests involve arithmetic operation PLUS two memory reads and one
memory write per iteration)

That gives phenomenal speed of

359 MEGAFLOPS (addition) or 211 MEGAFLOPS (division) - where ONE MEGAFLOP is
one million of floating point operations per second (including data
read/write)

http://en.wikipedia.org/wiki/Megaflop

This is about AS FAST AS this CPU is capable of running.

This is most amazing fact because it proves that AFL when running array
operations runs AS FAST AS it would be possible if your code was written
directly in MACHINE CODE

(taking into account regular floating point operations, *not* SSE, 3dNow or
other SIMD)

In other words AFL has near-zero overhead when running array operations and
can be compared with assembly language when running array operations.

As a comparision JScript on the same machine runs at speed of only 0.8
MFLOPS (divisions). That shows that JScript 250 times slower than AFL.

Bottom line: there is simply nothing faster than AFL. So if your formula
executes slowly it is your formula bad coding, not AmiBroker.

For the reference I have been running AmiBroker even on low end 133Mhz
Pentium IN REAL TIME.

And Amiga version of AmiBroker

was running OK even on 7MHz (yes SEVEN MEGAHERTZ == 0.007 GHz) processor and
1 MB (yes ONE megabyte) of RAM.

AFL engine exactly the same in both.

Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message -----

From: J. Biran <mailto:jbiran@pacbell.net>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 6:04 PM

Subject: RE: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

One easy way to see if the CPU hog is AB or not, minimize AB.

If CPU usage drops significantly, it is AB.

Joseph Biran
____________________________________________

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Padhu
Sent: Tuesday, October 02, 2007 7:08 AM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Thanks Tomasz. I have no no loops. No complex indicators.

Just a lot of timeframe expands.

I will try the AFL timing and see. If I am unable to find out I will send it
to support.

I have no doubt that AFL is the fastest out there. I have been using
amibroker since 2004 and I love each and each every day of my experience
with it.

Its just that I am perplexed why the CPU would get bogged down like this.

Thanks again.

Will try the AFL timing you and Herman put together.

Cheers,Padhu

----- Original Message -----

From: Tomasz Janeczko <mailto:groups@amibroker.com>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 3:34 AM

Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

That's simple:

one of your formulas is very badly coded - and it eats the CPU.

Under normal circumstances the CPU floats in 8..20% use.

You need to use Tools->Preferences->Miscellaneous and check "Display chart
timing"

then watch the timings each chart is showing.

All built-in formulas execute well below 0.1 second and this should be your
target.

If any formula needs more than 0.5 sec to execute it is badly written and it
should not be used.

You must either rewrite it or send it to us and we will tell you what is
wrong.

But again: any formula that executes in more than 0.5 sec is NOT to be used
in real-time

and requires either rewrite or removal.


Best regards,
Tomasz Janeczko
amibroker.com

----- Original Message -----

From: Padhu <mailto:ccie8340@yahoo.com>

To: amibroker@yahoogroups.com

Sent: Tuesday, October 02, 2007 2:42 AM

Subject: [amibroker] Amibroker High CPU Utilization-anyone else seeing
this?.

Folks:

Attached is the task manager output when Amibroker 4.90.5 is runnning. It
always spikes back and forth and stays very high near 90-100% . process
shows broker.exe spiking.

I have only 6 charts attached.

I have noticed this in the past when I had indicators attached to more than
8 charts. Now I have only 6 six. Other than 1 , all other indicators are all
fairly simple...no looping etc..But uses timeframe expands from daily etc.

I have intel p4 2GHz cpu with 768MB ram.

anyone else seeing this?.

Thanks,Padhu


Messages in this topic (21)
________________________________________________________________________

3i. Re: Amibroker High CPU Utilization-anyone else seeing this?.
Posted by: "qavatina" qavatina@yahoo.com qavatina
Date: Tue Oct 2, 2007 1:03 pm ((PDT))

I had a lot of "RequestTimedRefresh( 1, False );" in my code.
I reduced them to one and the CPU load came down from 90% to around 10%.


--- In amibroker@yahoogroups.com, "Tomasz Janeczko" <groups@...> wrote:
>
> Hello,
>
> How many times I have to explain that in ANY program that allows
custom formulas,
> the USER can write formula that will executed slow. And this is
exactly what is happening.
>
> The USER wrote the formula badly and I offered him help in fixing
HIS formula.
> Any formula can be written so bad that it will execute 1000x slower
than it should.
>
> I can take Visual C++ or Assembler or any language and I can
demonstrate that I can write
> the code that will take one hour, month or year to execute. And this
has ABSOLUTELY NOTHING
> to do with the language you are using.
>
> So it is not AB.
> It is THE USER who controls it.
>
> Any formula that is shipped with AmiBroker executes well below 0.1
second and causes less than few percent CPU load.
>
> AmiBroker runs at PHENOMENAL speed !
>
> See the example code:
> GetPerformanceCounter(1);
>
> for( i = 0; i < 10000; i++ )
> {
> x = High + Low;
> }
>
> NumberOfOperations = BarCount * i;
>
> timeperadd = GetPerformanceCounter(1);
>
>
>
> for( i = 0; i < 10000; i++ )
> {
> y = x / 2;
> }
>
> timeperdiv= GetPerformanceCounter(1);
>
> StrFormat("Total Number of operations = %12.12g", NumberOfOperations );
> StrFormat("Total time of additions [milliseconds] = %.2f",
timeperadd );
> StrFormat("Time per one addition [milliseconds] = %.9f",
timeperadd/NumberOfOperations );
> StrFormat("Number of additions per second = %12.12g",
1000/(timeperadd/NumberOfOperations) );
> StrFormat("Total time of divisions [milliseconds] = %.2f",
timeperdiv );
> StrFormat("Time per one divisions [milliseconds] = %.9f", timeperdiv
/NumberOfOperations );
> StrFormat("Number of divisions per second = %12.12g",
1000/(timeperdiv /NumberOfOperations) );
>
>
> On 2GHz Athlon the results are as follows:
>
> Total Number of operations = 18040000
> Total time of additions [milliseconds] = 50.25
> Time per one addition [milliseconds] = 0.000002785
> Number of additions per second = 359021216
> Total time of divisions [milliseconds] = 85.39
> Time per one divisions [milliseconds] = 0.000004733
> Number of divisions per second = 211270320
>
> (Test was performed on 101000 bars data, that accounts for 3MB -
which is MORE than on-chip cache size, therefore memory access times
were accounted in,
> note that tests involve arithmetic operation PLUS two memory reads
and one memory write per iteration)
>
> That gives phenomenal speed of
> 359 MEGAFLOPS (addition) or 211 MEGAFLOPS (division) - where ONE
MEGAFLOP is one million of floating point operations per second
(including data read/write)
> http://en.wikipedia.org/wiki/Megaflop
>
> This is about AS FAST AS this CPU is capable of running.
> This is most amazing fact because it proves that AFL when running
array operations runs AS FAST AS it would be possible if your code was
written directly in MACHINE CODE
> (taking into account regular floating point operations, *not* SSE,
3dNow or other SIMD)
> In other words AFL has near-zero overhead when running array
operations and can be compared with assembly language when running
array operations.
>
> As a comparision JScript on the same machine runs at speed of only
0.8 MFLOPS (divisions). That shows that JScript 250 times slower than
AFL.
>
> Bottom line: there is simply nothing faster than AFL. So if your
formula executes slowly it is your formula bad coding, not AmiBroker.
>
> For the reference I have been running AmiBroker even on low end
133Mhz Pentium IN REAL TIME.
>
> And Amiga version of AmiBroker
> was running OK even on 7MHz (yes SEVEN MEGAHERTZ == 0.007 GHz)
processor and 1 MB (yes ONE megabyte) of RAM.
> AFL engine exactly the same in both.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: J. Biran
> To: amibroker@yahoogroups.com
> Sent: Tuesday, October 02, 2007 6:04 PM
> Subject: RE: [amibroker] Amibroker High CPU Utilization-anyone
else seeing this?.
>
>
> One easy way to see if the CPU hog is AB or not, minimize AB.
>
> If CPU usage drops significantly, it is AB.
>
>
>
> Joseph Biran
> ____________________________________________
>
> From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com]
On Behalf Of Padhu
> Sent: Tuesday, October 02, 2007 7:08 AM
> To: amibroker@yahoogroups.com
> Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone
else seeing this?.
>
>
>
> Thanks Tomasz. I have no no loops. No complex indicators.
>
> Just a lot of timeframe expands.
>
>
>
> I will try the AFL timing and see. If I am unable to find out I
will send it to support.
>
>
>
> I have no doubt that AFL is the fastest out there. I have been
using amibroker since 2004 and I love each and each every day of my
experience with it.
>
>
>
> Its just that I am perplexed why the CPU would get bogged down
like this.
>
> Thanks again.
>
>
>
> Will try the AFL timing you and Herman put together.
>
> Cheers,Padhu
>
>
>
>
>
>
>
> ----- Original Message -----
>
> From: Tomasz Janeczko
>
> To: amibroker@yahoogroups.com
>
> Sent: Tuesday, October 02, 2007 3:34 AM
>
> Subject: Re: [amibroker] Amibroker High CPU Utilization-anyone
else seeing this?.
>
>
>
> That's simple:
>
> one of your formulas is very badly coded - and it eats the CPU.
>
>
>
> Under normal circumstances the CPU floats in 8..20% use.
>
>
>
> You need to use Tools->Preferences->Miscellaneous and check
"Display chart timing"
>
> then watch the timings each chart is showing.
>
>
>
> All built-in formulas execute well below 0.1 second and this
should be your target.
>
> If any formula needs more than 0.5 sec to execute it is badly
written and it should not be used.
>
> You must either rewrite it or send it to us and we will tell you
what is wrong.
>
> But again: any formula that executes in more than 0.5 sec is NOT
to be used in real-time
>
> and requires either rewrite or removal.
>
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
>
> ----- Original Message -----
>
> From: Padhu
>
> To: amibroker@yahoogroups.com
>
> Sent: Tuesday, October 02, 2007 2:42 AM
>
> Subject: [amibroker] Amibroker High CPU Utilization-anyone
else seeing this?.
>
>
>
> Folks:
>
>
>
> Attached is the task manager output when Amibroker 4.90.5 is
runnning. It always spikes back and forth and stays very high near
90-100% . process shows broker.exe spiking.
>
> I have only 6 charts attached.
>
>
>
> I have noticed this in the past when I had indicators attached
to more than 8 charts. Now I have only 6 six. Other than 1 , all other
indicators are all fairly simple...no looping etc..But uses timeframe
expands from daily etc.
>
>
>
> I have intel p4 2GHz cpu with 768MB ram.
>
>
>
> anyone else seeing this?.
>
>
>
> Thanks,Padhu
>


Messages in this topic (21)
________________________________________________________________________
________________________________________________________________________

4. How can I convert AmiBroker tick database to AmiBroker 1-minute data
Posted by: "irek_smaczny" smaczny@poczta.onet.pl irek_smaczny
Date: Tue Oct 2, 2007 10:41 am ((PDT))

I have big database with intraday 1-sec quoutes. How can I change
quotes interval in database to shrink database ?

Regards

Messages in this topic (1)
________________________________________________________________________
________________________________________________________________________

5a. Re: Can I use field 'time' from DDE ?
Posted by: "irek_smaczny" smaczny@poczta.onet.pl irek_smaczny
Date: Tue Oct 2, 2007 10:44 am ((PDT))

Any help ??


--- In amibroker@yahoogroups.com, "irek_smaczny" <smaczny@...> wrote:
>
> Hello,
> I'm using DDE with AmiBroker connected to NOL3 (Poland/Bossa.pl) but I
> think, that field "Time" in Database Settings->Configure is't work.
>
> In intraday settings when I use DDE with Amibroker "Exchange time" and
> "Local time" is omited, only time from my local computer is working.
>
> Can I change Amibroker to use field "Time" from DDE in intraday?
>
>
> Regards
>


Messages in this topic (2)
________________________________________________________________________
________________________________________________________________________

6. Canadian stock sectors and industries
Posted by: "rollyzhang" rollyzhang@hotmail.com rollyzhang
Date: Tue Oct 2, 2007 12:58 pm ((PDT))

Hi,
Anybody knows how to get Canadian stock (Toronto Stock Exchange)
sectors and industries data and import them into AB? Is there a tool
similar to Quotes Plus to get the job done?

Thanks,
Rolly

Messages in this topic (1)
________________________________________________________________________
________________________________________________________________________

7a. trading system ready to use
Posted by: "metastockv10" metastockv10@yahoo.ca metastockv10
Date: Tue Oct 2, 2007 1:39 pm ((PDT))

Hi everyone,
I would like to ask if Amibroker has some trading systems built in? I
mean something analogue to Performance Systems which you can use in
Metastock, or I nead to write them in AFL by my self ( or should
download from internet). If there is that kind of option in Amibroker
- please tell me where should I be looking?
Best regards
Pat

Messages in this topic (2)
________________________________________________________________________

7b. Re: trading system ready to use
Posted by: "Tomasz Janeczko" groups@amibroker.com amibroker
Date: Tue Oct 2, 2007 2:06 pm ((PDT))

Hello,

See this:

http://www.amibroker.com/library/

and this:
http://finance.groups.yahoo.com/group/amibroker/files/

(These are 3rd party developments and amibroker.com takes no resposibility on usefulness/fitness/results for your trading purposes.
Use at your own risk)

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "metastockv10" <metastockv10@yahoo.ca>
To: <amibroker@yahoogroups.com>
Sent: Tuesday, October 02, 2007 10:39 PM
Subject: [amibroker] trading system ready to use


> Hi everyone,
> I would like to ask if Amibroker has some trading systems built in? I
> mean something analogue to Performance Systems which you can use in
> Metastock, or I nead to write them in AFL by my self ( or should
> download from internet). If there is that kind of option in Amibroker
> - please tell me where should I be looking?
> Best regards
> Pat
>
>
>
> 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
>
>
>
>
>


Messages in this topic (2)
________________________________________________________________________
________________________________________________________________________

8a. Information on BATMAN.
Posted by: "Don Lindberg" dlindber@sbcglobal.net lindbergdon
Date: Tue Oct 2, 2007 2:30 pm ((PDT))

For those of you useing BATMAN I have a couple of questions not covered
in the documentation.

First, does AmiBroker have to be open when BATMAN runs a batch, or can
it be closed?

Secondly, If I have an AFL that I have added into BATMAN to run and I
then edit that AFL, do I have to delete and re-enter it in BATMAN. In
other words does BATMAN just keep a pointer to the AFL, or does it keep
a copy of the complete AFL?

Thanks for any information,

Don Lindberg

Messages in this topic (3)
________________________________________________________________________

8b. Re: Information on BATMAN.
Posted by: "MarkK" MailYahoo@Tampabay.rr.com mkeitel2000
Date: Tue Oct 2, 2007 2:46 pm ((PDT))

Don,

Open AB
I have found that AB will open when you engage Batman so I just open it on
my own

Batman keeps pointing to the same ALF. AS long as you keep the same name
and location after the change it will pick up the new formatted AFL

MarkK

_____

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Don Lindberg
Sent: Tuesday, October 02, 2007 5:30 PM
To: amibroker@yahoogroups.com
Subject: [amibroker] Information on BATMAN.

For those of you useing BATMAN I have a couple of questions not covered
in the documentation.

First, does AmiBroker have to be open when BATMAN runs a batch, or can
it be closed?

Secondly, If I have an AFL that I have added into BATMAN to run and I
then edit that AFL, do I have to delete and re-enter it in BATMAN. In
other words does BATMAN just keep a pointer to the AFL, or does it keep
a copy of the complete AFL?

Thanks for any information,

Don Lindberg


Messages in this topic (3)
________________________________________________________________________

8c. Re: Information on BATMAN.
Posted by: "Don Lindberg" dlindber@sbcglobal.net lindbergdon
Date: Tue Oct 2, 2007 3:14 pm ((PDT))

Mark,

Thanks a lot, that exactly what I needed to know.

Donald F Lindberg

_____

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of MarkK
Sent: Tuesday, October 02, 2007 2:41 PM
To: amibroker@yahoogroups.com
Subject: RE: [amibroker] Information on BATMAN.

Don,

Open AB
I have found that AB will open when you engage Batman so I just open it on
my own

Batman keeps pointing to the same ALF. AS long as you keep the same name
and location after the change it will pick up the new formatted AFL

MarkK

_____

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com] On Behalf
Of Don Lindberg
Sent: Tuesday, October 02, 2007 5:30 PM
To: amibroker@yahoogroups.com
Subject: [amibroker] Information on BATMAN.

For those of you useing BATMAN I have a couple of questions not covered
in the documentation.

First, does AmiBroker have to be open when BATMAN runs a batch, or can
it be closed?

Secondly, If I have an AFL that I have added into BATMAN to run and I
then edit that AFL, do I have to delete and re-enter it in BATMAN. In
other words does BATMAN just keep a pointer to the AFL, or does it keep
a copy of the complete AFL?

Thanks for any information,

Don Lindberg


Messages in this topic (3)
________________________________________________________________________
________________________________________________________________________

9a. Re: Custom bactester metrics & Van Tharps per trade r multiple
Posted by: "justinwonono" justinwonono@yahoo.com.au justinwonono
Date: Tue Oct 2, 2007 3:08 pm ((PDT))

Ooops!! your right!

===
[3768] Symbol = BHP : dt[84] = 15/06/2000 : TRisk[84] = 0.59479
[3768] Symbol = BHP : EntryPrice = 7.96475 : ExitPrice = 7.93425
[3768] Trade.EntryDateTime = 15/06/2000 Risk = 0.59479
===

Thanks PS,

Regards

JW

--- In amibroker@yahoogroups.com, "vlanschot" <vlanschot@...> wrote:
>
> Not to interfere with you correspondence with GP,


no probs, much appreciated.

> but I see in your
> code that before the CBT-part you've defined
>
> AddToComposite(TradeRisk, "~trisk" + Name(),"C",atcFlagDefaults
> |atcFlagEnableInBacktest );
>
> . . . but then you call it as:
>
> TRisk = Foreign("~trisk_" + trade.Symbol,"C");// NOTE: with
> underscore!, so that doesn't work
>
> Personally, and FWIW, as I do not always want to clutter my Db with
> numerous ATC's, I often prefer to use VarSet.

if I can get it work in the custom backtester, then I agree it's
probably a better method.


> PS
>
>


By the way GP, I didn't realise it was you who wrote the custom
backtester doc, it's helped me a lot on the way to understand custom
backtesting, thanks for your contribution.

Messages in this topic (7)
________________________________________________________________________
________________________________________________________________________

10. Measuring Execution Order and Timing for Window Panes
Posted by: "Herman" psytek@magma.ca psytek2
Date: Tue Oct 2, 2007 3:15 pm ((PDT))


In view of current interest the post 'Measuring AFL Execution
Times' has been expanded to include measuring the order and
execution time of multiple panes. For details see:


http://www.amibroker.org/userkb/2007/09/23/measuring-afl-executio\
n-times/
<http://www.amibroker.org/userkb/2007/09/23/measuring-afl-executi\
on-times/>


best regards,

herman

Messages in this topic (1)
________________________________________________________________________
________________________________________________________________________

11a. How to make the opposite of this formula
Posted by: "Mohammed" softnews2003@yahoo.com softnews2003
Date: Tue Oct 2, 2007 3:58 pm ((PDT))

Hi all,

How to make the opposite of this formula

BarsSince(LongSetup) < Maxbars AND Cross(C,ValueWhen(Longsetup,H));

All The best

Messages in this topic (2)
________________________________________________________________________

11b. Re: How to make the opposite of this formula
Posted by: "Padhu" ccie8340@yahoo.com ccie8340
Date: Tue Oct 2, 2007 4:13 pm ((PDT))

use NOT operator !

myrule=BarsSince(LongSetup) < Maxbars AND Cross(C,ValueWhen(Longsetup,H));
oppositeofmyrule=!myrule;
----- Original Message -----
From: Mohammed
To: amibroker@yahoogroups.com
Sent: Tuesday, October 02, 2007 5:58 PM
Subject: [amibroker] How to make the opposite of this formula


Hi all,

How to make the opposite of this formula

BarsSince(LongSetup) < Maxbars AND Cross(C,ValueWhen(Longsetup,H));

All The best


Messages in this topic (2)
________________________________________________________________________
________________________________________________________________________

12. IB autotrade
Posted by: "Ara Kaloustian" ara1@san.rr.com Akaloustian
Date: Tue Oct 2, 2007 4:11 pm ((PDT))

IB has a commission structure that distinguishes bewteen "Smart Routed" and "Non Smart Routed" using the API.

Is ibc automatically send order to "Smart Routed" or is the a specific AFL command for it?

Thansk

Ara
Messages in this topic (1)
________________________________________________________________________
________________________________________________________________________

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

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
Digest 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-normal@yahoogroups.com
mailto:amibroker-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/


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

0 comments: