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

AW: [amibroker] To AFL Experts



PureBytes Links

Trading Reference Links

Hi,

 

You need the reference function and the HHV function.

Check out the following two parts:

 



reference past/future values of the array

Trading system toolbox

 


SYNTAX 

ref( ARRAY, period ) 


RETURNS

ARRAY 


FUNCTION 

References a previous or subsequent element in a ARRAY. A positive period
references "n" periods in the future; a negative period references "n"
periods ago. 


EXAMPLE

The formula "ref( CLOSE, -14 )" returns the closing price 14 periods ago.
Thus, you could write the 14-day price rate-of-change (expressed in points)
as "C - ref( C, -14 )." The formula "ref( C, +14 )" returns the closing
price 12 periods ahead (this means looking up the future) 

 

 

 

 



HHV
- highest high value 

Lowest/Highest

 


SYNTAX 

hhv( ARRAY, periods ) 


RETURNS

ARRAY 


FUNCTION 

Calculates the highest value in the ARRAY over the preceding periods
(periods includes the current day). 


EXAMPLE

The formula "hhv( close, 4)" returns the highest closing price over the
preceding four periods; "hhv( high, 8)" returns the highest high price over
the preceding eight periods. 

 

 

 

Tell me if you still have problems.

 

Best regards

 

Thomas Zmuck

www.tradingbasis.com <http://www.tradingbasis.com/> 

 

 

 

-----Ursprüngliche Nachricht-----
Von: kscarth [mailto:kscarth@xxxxxxxxx] 
Gesendet: Donnerstag, 28. Oktober 2004 21:56
An: amibroker@xxxxxxxxxxxxxxx
Betreff: [amibroker] To AFL Experts

 

 

 

 

I was trying to create an exploration which woulod look for trend

reversals. I want to use a method simular to an outside day reversal

but which would use the last ten days and then compare them to the

previous ten days and if the highest high and lowest low of the last

ten days are greater than the previous ten days would generate a

reversal signal. I am new to Amibroker AFL language and after looking

at the various AFL code descriptions cannot seem to find a way to

accomplish this. I would appreciate any help I can get on this.

 

Thanks in advance;

 

KRS

 

 

 

 

 

 

 

 

 


 

Check AmiBroker web page at:

http://www.amibroker.com/

 

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

Yahoo! Groups Links

 

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

 

    amibroker-unsubscribe@xxxxxxxxxxxxxxx

 

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

 

 

 

 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

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