PureBytes Links
Trading Reference Links
|
Hey, Lou and Herman. I appreciate your help. It has gotten way over
my capabilities. I read the help files on VBscripting, 2 times, and
didn't understand a word of it. If anyone figures it out, please e-
mail me as I don't watch this site reglarly. Thanks, Terry
--- In amibroker@xxxx, "Lou Howard" <loul@xxxx> wrote:
> Hi Herman, thanks for trying. What Terry is trying to do is
actually append a section of code containing AFL functions to a prior
line of code. The code to be appended is:
> Min(Ref(L,-3) +3* LinRegSlope(L, 5)
> and as you can see, this would be easier done in AFL but I don't
know how to call the LinRegSlope() function from VBScript. Also,
the "3" in "Min(ref(L,3) etc" needs to be incremented. In earlier e-
mails there was a "work-around" for loops done in AFL but I cannot
find them (tried searching Yahoo and got every e-mail ever written).
So, it boils down to being able to do a loop in AFL or coding the AFL
function in VBScript but again, I don't know the formula for
LinRegSlope so am stopped both ways. If I remember correctly, AFL
functions can be called from "objects" in VBScript but that will take
some more reading to verify and learn how to do it. Kind of an
interesting problem and an important 'next step' for me. Let us know
if you have any further thoughts on it.
>
> Best Regards - loul
> ---------------------
>
> >>...Perhaps some kind soul will take pity on a couple of
floundering
> mud-fish with advice on "for next loops" and or function calls
from
> VBscript...>>
>
> In it's simplest form:
>
> // example in VBScript
> <%
> myArray = AFL("close")
> sum = 0for i = 0 to UBound( myArray )
> sum = sum + myArray( i )
> next
> %>
>
> There is a nice section in the AB help on this, it will show you
how to do
> basic looping in several examples. Search for: AFL Scripting Host
>
> It may look complicated at first. The best way to get started is
to copy an
> example, test it out and then change ONE small line at a time.
Testing
> whether everything still works as you go along. It is just
amazing what you
> can "program" without knowing how to program :-) all it takes is
some
> patience.
>
> Looping IS THE THING to know and the sooner you learn it the
better. It will
> remove many of the stumbling blocks that are repeatedly discussed
on this
> list.
>
> Take care and good luck,
> Herman.
>
> -----Original Message-----
> From: Lou Howard [mailto:loul@x...]
> Sent: Saturday, April 27, 2002 7:40 PM
> To: amibroker@xxxx
> Subject: Re: [amibroker] Re: opt this
>
>
> Terry, have you heard the expression "Open mouth and insert
foot"? Well, I
> just did it. I thought I'd write you a short code and solve all
your
> problems but the problem is, it is not practicable. The lines of
code you
> have use AFL functions which I haven't learned to handle from
VBscript yet
> (I understand that they can if one knows how). The alternative
is to do
> 'for next loops' in AFL. There is a work-around that was in the
e-mails but
> when I searched Yahoo, I got every e-mail that has been written.
> (apparently a lot of "for's" and "next's"). Also found nothing
on the
> subject at AmiBroker. Perhaps some kind soul will take pity on a
couple of
> floundering mud-fish with advice on "for next loops" and or
function calls
> from VBscript. If I recall correctly, the function calls must
come from or
> to an "object" but I haven't gotten to that yet. I was just
thinking, there
> are some pretty bright people on this forum, how does TJ stay
ahead of all
> of them? Will work on it as soon as I get a little more time.
>
> loul
>
> ---------------------------------------------------------
>
>
>
> Lou, I don't know anything about VBscript. Thanks, Terry
>
> --- In amibroker@xxxx, "Lou Howard" <loul@xxxx> wrote:
> > Hi Terry -
> > Well, I'm just starting out in this stuff but it seems that
> the 'lines of code' in incremented by the 'input variable', i.e.,
> 2,3,4, etc. This sounds like a loop that can be executed from
> VBscript using the variable as both a counter and insertion into
the
> formula. Does this sound right?
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
|