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

Re: [amibroker] Message 3629, 3673 and 3781



PureBytes Links

Trading Reference Links


Hi Dimitri;
Thank you for responding,
As for the manual , I have been reading it and do find it to be very
well written, and presented.
but... we must be able to realize that some of us out
here are code iliterate...
or,  that we have only been with AFL for a short period of time.
Therefore , we look to the teachers , those who have
been using and developing the program from the start. This is what will
increase the learning curve of  all ,  and allow
us to share in the daily discoveries of the program.  ........ we
should  not be discourged to ask questions....... who knows , that
next question could lead to an important discovery. .. ( just my
opinion ).
 
 
Dimitris Tsokakis wrote:

Dear
Anthony, In your #3673,
Question 2:p1=peak(h,10,1);
v1=valuewhen(p1!=ref(p1,-1),cum(1),1);
tr1=trough(l,10,1);
v2=valuewhen(tr1!=ref(tr1,-1),cum(1),1);From
AmiBroker 3.65 User's Guide you can see PEAK
(AFL 1.1)





SYNTAX 

peak(ARRAY, change, n = 1)



RETURNS

ARRAY



FUNCTION 

Gives the value of ARRAY n-th peak(s) ago. This
uses the Zig Zag function (see Zig Zag) to determine the peaks. n
=1 would return the value of the most recent peak. n =2 would return
the value of the 2nd most recent peak. Caveat: this function is
based on Zig-Zag indicator and may look into the future.



EXAMPLE

peak(close,5,1)


 andTROUGH
(AFL 1.1)





SYNTAX 

trough(ARRAY, change, n = 1)



RETURNS

ARRAY



FUNCTION 

Gives the value of ARRAY n-th trough(s) ago. This
uses the Zig Zag function (see Zig Zag) to determine the troughs. Caveat:
this function is based on Zig-Zag indicator and may look into the future. 



EXAMPLE

trough(close,5,1)


 Any array (close, high, low etc)
may be used. I wanted the highest pointso
I used H for PEAK, I wanted the lowest point so I used L for TROUGHAny
change may be used. I used 10. Changes may be different.(For
some bearish stocks the combination 10 for PEAK and 5 for TROUGHworked
fine.)From





No

Symbol

Meaning



1

^

Exponentiation



2

-

Negation - Unary minus



3

*

Multiplication 



4

/

Division 



5

+

Addition 



6

-

Subtraction



7

<

Less than 



8

>

Greater than



9

<=

Less than or equal to



10

>=

Greater than or equal to



11

==

Equal to



12

!=

Not equal to



13

NOT

Logical "Not" 



14

AND

Logical "And" 



15

OR

Logical "Or"



16

=

Variable assignment operator


 the No 12 is != and means "Not equal
to". But, I will not
reproduce here the manual. It is better to read it.In
my opinion it is very well written. And with every new updateit
becomes better. Someone is working for that purposeAnd,
please, do not confuse things. When we say opinion,it
is ONLY personal, you do not have to adopt or accept orfollow
it.AFL is a powerful tool
and, for me, VERY friendly to the user.Suppose
it helps your Question 2 .Dimitris
Tsokakis
Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.