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

Re: [amibroker] Looking for the Point & Figure breakout scan



PureBytes Links

Trading Reference Links


Hi Dennis,
 
Graham is the man when it comes to P&F in afl as I believe the lion's share of the stuff in the library is from him.
 
Below is the code he posted a few days ago if you didn't get it.  You can use PF Chart Dollars.afl from the library in the include statement.
 
Regards,
Gary
 

//P&F Chart Signals based on Closing prices
// 07 Jan 2003
//Reverse is 3 boxes.
//Graham Kavanagh 
#include "C:\Program Files\AmiBroker\AFL\PF Chart Dollars.afl";
LastHigh = IIf(C>O,Ref(H,-2),Ref(H,-1));
Breakout = C>O AND H>Ref(H,-2);
EqualHigh = C>O AND H==Ref(H,-2);
NearHighUp = C>O AND H>=Ref(H,-2)-3*Box AND H<Ref(H,-2);
NearHighDown = C<O AND L>=Ref(H,-1)-3*Box;
TurnUp = C>O AND H<Ref(H,-2)-3*Box;
EntryPrice = LastHigh+Box;
ExitPrice = IIf(C<O,Ref(H,-1)-5*Box,H-5*Box);
Retraced = C<O AND L<=Ref(H,-1)-4*Box AND L>=Ref(L,-2);
Falling = C<O AND L<Ref(L,-2);
Filter = EqualHigh OR BreakOut OR NearHighUp OR NearHighDown OR Retraced OR
Falling OR TurnUp;
AddTextColumn( SectorID(1), "Sector" );
AddTextColumn(WriteIf(C>O,"Rise","Fall"),"U/D",1.0);
AddTextColumn("Box = "+WriteVal(Box,1.1),"box");
AddTextColumn("LastH= "+WriteVal(LastHigh,1.1),"LastH");
AddTextColumn("Price= "+WriteVal(IIf(C>O,H,L),1.1),"NowH");
AddTextColumn(
WriteIf(EqualHigh,"EqulH",
WriteIf(BreakOut,"BkOut ",
WriteIf(NearHighUp,"NearH ",
WriteIf(NearHighDown,"NearHd ",
WriteIf(Retraced,"Rtrcd ",
WriteIf(Falling,"BkDwn",
WriteIf(TurnUp,"BmTrn",
""))))))),"descrptn" );
AddTextColumn(
WriteIf(EqualHigh OR NearHighUp OR TurnUp,"BuySig=
"+WriteVal(EntryPrice,1.1),
WriteIf(BreakOut,"BuyWas= "+WriteVal(EntryPrice,1.1),
WriteIf(Falling,"SellWas= "+WriteVal(ExitPrice,1.1),
WriteIf(Retraced,"SellSig= "+WriteVal(ExitPrice,1.1),
WriteIf(NearHighDown, "SSg=" +WriteVal(ExitPrice,1.1)+" or
BSg="+WriteVal(EntryPrice,1.1),
""))))),"prices signal");
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.