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

Re: [amibroker] Re: The best way to help newbies, oldies, ... and AmiBroker ...



PureBytes Links

Trading Reference Links

Hello,

You need to read User's Guide: Understanding AFL part of the tutorial.
http://www.amibroker.com/guide/h_understandafl.html

It explains that EVERY result of array arithmetic is also an array.
So instead just 1 you have ARRAY of zeros and ones (binary WAVE).
You can visualize such array using Plot:

Plot( c > ref(c, -2), "Binary Wave", colorRed );


BTW: 
Ref( C, 2 ) references FUTURE.

Ref( C, -2 ) is correct expression for close two bars ago

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "ozzyapeman" <zoopfree@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, August 28, 2008 10:20 PM
Subject: [amibroker] Re: The best way to help newbies, oldies, ... and AmiBroker ...


> In keeping with the spirit of this thread then....care to explain this
> one for me (and I suspect, other newbies):
> 
> " REF(c>ref(c,2),5); says that the close that happened five days
> ago has to be  higher than the close that happened on the sixth day ago. "
> 
> My current level of understanding says that this part:
> 
> c>ref(c,2)
> 
> Will return a 0 or 1. For e.g., if the current close is greater than
> the close of 2 bars ago, this statement is true and therefore "1".
> 
> So the longer expression now becomes:
> 
> REF(1,5);
> 
> Which does not make sense. 
> 
> I've read the User's Guide. But obviously missed something on how to
> nest a boolean test within the ref function, and have it all make sense.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, <professor@xxx> wrote:
>>
>> Ron,
>> 
>> The examples that you used were perfect. Even I could understand how
> they worked and learn how to do things that I wanted to do but didn't
> know how to do it. I spent a lot of time using barssince and ref 
> trying accomplish this.
>> 
>> Thanks,
>> Tom
>>   ----- Original Message ----- 
>>   From: Ronald Davis 
>>   To: amibroker@xxxxxxxxxxxxxxx 
>>   Sent: Thursday, August 28, 2008 11:36 AM
>>   Subject: Re: [amibroker] Re: The best way to help newbies, oldies,
> ... and AmiBroker ...
>> 
>> 
>>   In the very early days of my Amibroker learning curve, The best
> help that I 
>>   received was from this board when an experienced user was kind
> enough to 
>>   quickly code an example or what I was asking.
>> 
>>   Then, I would play with what they had given me, and I started to
> understand 
>>   how to use Amibroker.
>> 
>>   For example, REF(c>ref(c,2),5); says that the close that happened
> five days 
>>   ago has to be higher than the close that happened on the sixth day
> ago.
>> 
>>   Whereas, SUM(c>ref(c,2),5); only requires that any one or more of the 
>>   closes over the last five days has to be higher than the previous
> days 
>>   close.
>> 
>>   The above examples of simple english explanations from this board
> are how I 
>>   started learning Amibroker. Ron D
>> 
>>   ----- Original Message ----- 
>>   From: "Ken Close" <ken45140@xxx>
>>   To: <amibroker@xxxxxxxxxxxxxxx>
>>   Sent: Thursday, August 28, 2008 12:15 PM
>>   Subject: RE: [amibroker] Re: The best way to help newbies, oldies,
> ... and 
>>   AmiBroker ...
>> 
>>   > Amen. Amen! AMEN!
>>   >
>>   > While Tomasz has done so much to improve and expand the
> training/manual
>>   > since the early days (he really has!), the fact there is continual 
>>   > questions
>>   > on the same stuff or "small stuff", suggests there is still room
> for and
>>   > benefit from improvement.
>>   >
>>   > I am constantly reminded (or remind myself) that Tomasz has to
> say "Read 
>>   > the
>>   > Manual". Some questions are almost obvious that a quick trip to
> help 
>>   > would
>>   > answer the question, but other "simple" questions are not. Many
> of us do
>>   > attempt to find the answers in help but cannot.
>>   >
>>   > For example, yesterday, I wanted to know how to make subscripted
> arrays. 
>>   > I
>>   > did not remember that VarGet and VarSet was set up to do this.
> So a trip 
>>   > to
>>   > Help and typing in "subscripted arrays" found 9 entries none of
> which led 
>>   > me
>>   > to VarSet or VarGet. I think one of the improvements would be a
> search
>>   > system which allowed more complex search logic or strings, or
> some way to
>>   > zero in on the specific request. As Tomasz says, it is almost
> always in
>>   > there, it just is hard to find.
>>   >
>>   > Ken
>>   >
>>   >
>>   >
>>   > -----Original Message-----
>>   > From: amibroker@xxxxxxxxxxxxxxx
> [mailto:amibroker@xxxxxxxxxxxxxxx] On 
>>   > Behalf
>>   > Of Dennis Brown
>>   > Sent: Thursday, August 28, 2008 11:58 AM
>>   > To: amibroker@xxxxxxxxxxxxxxx
>>   > Subject: Re: [amibroker] Re: The best way to help newbies,
> oldies, ... and
>>   > AmiBroker ...
>>   >
>>   > Brian,
>>   >
>>   > You are correct. I switched to AB because I wanted a programming
> language
>>   > that was fundamentally tied into the realtime price arrays and the 
>>   > charting
>>   > for the same. RT quotes --> Database --> AFL -->
>>   > Charts. That was all I wanted, and that is pretty much all I use.
>>   > There is a lot of overhead associated with getting and
> maintaining the 
>>   > data,
>>   > interacting with the user, and outputting the the data in a
> useful form. 
>>   > I
>>   > only wanted to be concerned with the algorithms that decided to
> buy or 
>>   > sell.
>>   > Interestingly, even with all the support functions handled by
> AB, I still
>>   > spend 80% of my time coding UI things! I think it is some kind of 
>>   > computer
>>   > programming law.
>>   >
>>   > AFL was my real destination with AmiBroker, and I had a hard
> time because 
>>   > it
>>   > was not well defined. A lot of assumptions were made about prior 
>>   > knowledge
>>   > of specific programming language conventions in C like languages. 
>>   > Languages
>>   > I had no experience with. These are middle level languages. My 
>>   > experience
>>   > was with machine level assembler code, and very high level like
>>   > Revolution/SuperCard/HyperCard, and a
>>   > smattering of BASIC and APL from the original versions 40 years ago.
>>   > I had no idea that I was supposed to go learn C syntax before I
> could use
>>   > the AFL documentation. IMHO this is a documentation hole big
> enough to
>>   > drive a truck through.
>>   >
>>   > Then what happens when someone has no experience with any
> programming
>>   > language at all. Perhaps some Excel experience, or maybe
> experience using 
>>   > a
>>   > programmable calculator. I can't imagine the bewilderment with
> AFL. It
>>   > takes a lot of handholding from support or this list to get over
> the first
>>   > hump.
>>   >
>>   > I believe it would be appropriate to define the AFL language in the
>>   > documentation as if it were the only language that exists on the
> planet.
>>   >
>>   > For instance "+" is defined as "Addition". Whereas, in reality
> the "+"
>>   > operator is data type dependent. It will add two numbers, add a
> number to
>>   > every element in an array, add two arrays element by element, or 
>>   > concatenate
>>   > two strings. It will not add a number or array to a string.
>>   >
>>   > As I have suggested before, I would have liked to see a "Complete"
>>   > listing of all operators, functions, reserved words, syntax
> characters,
>>   > directives, etc., in one live list index that points to a page that 
>>   > explains
>>   > each one in the same way that the functions are now described. Then
>>   > additional "see also" pointers on those pages to point to more
> in depth
>>   > documents when available. In fact the current functions list
> could simply
>>   > be expanded to do this.
>>   >
>>   > This would have saved me many weeks off the learning curve.
>>   >
>>   > I don't know if Howard is planning on doing this in his new
> book, but it
>>   > should be part of the on-line documentation.
>>   >
>>   > Best regards,
>>   > Dennis
>>   >
>>   >
>>   > On Aug 28, 2008, at 10:34 AM, brian_z111 wrote:
>>   >
>>   >> I didn't explain myself very well there.
>>   >>
>>   >> What I am saying is that I think we are making it harder by not
>>   >> admitting that it is a programmers program and just getting on with
>>   >> teaching AFL.
>>   >>
>>   >> If anyone held told me that at the start I would have run for
> it but
>>   >> the fact is that the help manual is about 'AmiBroker the
> program' but
>>   >> eventually I came to realise it is all about programming -
>>   >> specifically AFL.
>>   >>
>>   >> So, if I do want to get on with it where do I go?
>>   >>
>>   >> The AFL section of the help manual is condensed.
>>   >> The first few chapters of Howards Book are a basic intro to AB
> and the
>>   >> rest of the book is orientated around SystemDesign & Evaluation?
>>   >>
>>   >> Where is the next stop on the AFL line?
>>   >>
>>   >>
>>   >> brian_z
>>   >>
>>   >>
>>   >>
>>   >>
>>   >> --- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@> wrote:
>>   >>>
>>   >>> Herman,
>>   >>>
>>   >>>> I always figured that sticking with AFL would have provided a
> more
>>   >>>> continuous path for users to develop their programming expertise.
>>   >>>
>>   >>> This is a new point, not really discussed much before, I think.
>>   >>>
>>   >>> I really don't know how to put it in words but you are so right.
>>   >>>
>>   >>> Tomasz should be proud of me because if I am a programmer at all I
>>   >> am
>>   >>> an array programmer...... but sometimes I am left reaching for
> AFL?
>>   >>>
>>   >>> Perhaps there are conventions that people with 2 or more
>>   >> programming
>>   >>> languages automatically understand?
>>   >>>
>>   >>> Do I have to go and learn C++ as well.
>>   >>>
>>   >>> Should I need too?
>>   >>>
>>   >>> brian_z
>>   >>>
>>   >>
>>   >>
>>   >>
>>   >> ------------------------------------
>>   >>
>>   >> 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
>>   >
>>   >
>>   >
>>   >
>>   > ------------------------------------
>>   >
>>   > 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
> 
> 
> 

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

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