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

RE: [amibroker] Help needed - 20 period low



PureBytes Links

Trading Reference Links

KK,

Ok, here's my stab at it. This is probably NOT the most efficient method, i've also added some comments to help with readability.

/*Cond1 - The Low of today is lower than the Lowest Low of the previous 20 days. (A new low)*/
Cond1 = L < Ref(LLV(L,20),-1);

/*Cond2 - The Lowest Low of the 4 days from yesterday is greater than the Lowest Low of the previous 16 days. */
Cond2 = Ref( LLV( L, 4 ), -1) > Ref( LLV( L, 16 ), -5 );


Filter = Cond1 AND Cond2;
AddColumn(Ref( LLV( L, 4 ), -1),"4DayLow",1.2);
AddColumn(Ref( LLV( L, 16 ), -5 ),"16DayLow",1.2);


Regards,
William Peters
www.amitools.com



-----Original Message-----
From: kk12338 [mailto:kk2628@xxxxxxxxxxxxxxxx]
Sent: September 2, 2003 3:06 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Help needed - 20 period low


Hi,

A setup I want to translate into AFL is :
1. Today is a new 20-peiod low, and
2. Previous 20-period low is at least 4 periods ago

I've written as follow but seems something is wrong,no signal was 
seen.

lowsetup=L<ref(LLV(L,20),-1) and barssince(L<ref(LLV(L,20),-2))>3;

Any help appreciated.

Thanks
KK



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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/ 



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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/