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

Re: [amibroker] Why is indicator COM/plugin called many times from AB?



PureBytes Links

Trading Reference Links

As a followup, I kept pressing "Apply" in Indicator Builder, and now I get 2
calls to the COM control per "Apply". Each call passes the entire Close
array (709 elements).

I shouldn't have said "plugin" in the subject since I'm just calling a COM
control, don't know if it matters though.

----- Original Message -----
From: "Junya Ho" <junya.ho@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, February 09, 2003 7:02 PM
Subject: [amibroker] Why is indicator COM/plugin called many times from AB?


> I created a simple little COM control (in Perl :-) ) that just returns the
> array that it receives as a parameter. Inside the control, it writes out
all
> values in the array to a file, every time it is called.
>
> I noticed that when the control is called from an indicator, it is called
> multiple times. Can someone explain why this is so, and the reason for the
> different number of elements?
>
> This is an example, where I called the control with the Close array.
> myobjfac = CreateObject("JH.TestMA");
>
> Plot(myobjfac.MA2(C), "getMa", colorPink);
>
> I just hit "Apply" on the Indicator Builder, and I got the following
output
> in my debug file. I did not move anything in the AB charting windows, so
> intuitively I thought it was really one call of my AFL script.
>
> first call, parameter contained 170 elements
> (Visible bars = 140 bars. The array contains an extra 30 elements prior to
> first visible bar.)
>
> second call, 170 elements
>
> third call, 709 elements
> The entire Close array was passed from the first bar.
>
> fourth call, 709 elements
> Again, the entire Close array was passed in.



Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/