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

Re: [amibroker] Pattern Formula ( Key Reversal Up Pattern )



PureBytes Links

Trading Reference Links

Larry,

thank you for the formulas in the library, you Know I had them in my
library already.

Anthony

Yahoo wrote:

> Anthony,I wrote the following some time
> ago.http://www.amibroker.com/library/formula.php?id=118
>
> numcolumns =12;
> /*Short Term Reversal Signals Automatic Analysis*/
> /*Closing Price Reversals Automatic Analysis
> by Larry Lovrencic*/
>
> CPRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<ref(H,-1) AND L<ref(L,-1) AND C>ref(C,-1);
> CPRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>ref(H,-1) AND L>ref(L,-1) AND C<ref(C,-1);
> column0 = CPRbuy;
> column0name = "Closing Price Reversal BUY";
> column1= CPRsell;
> column1name= "Closing Price Reversal SELL";
>
> /*Hook Reversals Automatic Analysis
> by Larry Lovrencic*/
>
> HRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<ref(H,-1) AND L>ref(L,-1);
> HRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H<ref(H,-1) AND L>ref(L,-1);
> column2 = HRbuy;
> column2name = "Hook Reversal BUY";
> column3= HRsell;
> column3name= "Hook Reversal SELL";
>
> /*Island Reversals Automatic Analysis
> by Larry Lovrencic*/
>
> IRbuy=ref(L,-2)>ref(H,-1) AND L>ref(H,-1);
> IRsell=ref(H,-2)<ref(L,-1) AND H<ref(L,-1);
> column4 = IRbuy;
> column4name = "Island Reversal BUY";
> column5= IRsell;
> column5name= "Island Reversal SELL";
>
> /*Key Reversals Automatic Analysis
> by Larry Lovrencic*/
>
> KRbuy=O<ref(C,-1) AND L<ref(L,-1) AND C>ref(H,-1);
> KRsell=O>ref(C,-1) AND H>ref(H,-1) AND C<ref(L,-1);
> column6 = KRbuy;
> column6name = "Key Reversal BUY";
> column7= KRsell;
> column7name= "Key Reversal SELL";
>
> /*Open/Close Reversals Automatic Analysis
> by Larry Lovrencic*/
>
> OCRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<ref(H,-1) AND L<ref(L,-1) AND C<ref(C,-1);
> OCRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>ref(H,-1) AND L>ref(L,-1) AND C>ref(C,-1);
> column8 = OCRbuy;
> column8name = "Open Close Reversal BUY";
> column9= OCRsell;
> column9name= "Open Close Reversal SELL";
>
> /*Pivot Point Reversals Automatic Analysis
> by Larry Lovrencic*/
>
> PPRbuy=ref(L,-1)<ref(L,-2) AND ref(L,-1)<L AND C>ref(H,-1);
> PPRsell=ref(H,-1)>ref(H,-2) AND ref(H,-1)>H AND C<ref(L,-1);
> column10 = PPRbuy;
> column10name = "Pivot Point Reversal BUY";
> column11= PPRsell;
> column11name= "Pivot Point Reversal SELL";
>
> buy=CPRbuy or HRbuy or IRbuy or KRbuy or OCRbuy or PPRbuy;
> sell=CPRsell or HRsell or IRsell or KRsell or OCRsell or PPRsell;
>
> filter= CPRbuy OR CPRsell OR HRbuy OR HRsell OR IRbuy OR IRsell or KRbuy OR KRsell OR OCRbuy OR OCRsell OR PPRbuy OR PPRsell;
>
>
> ==============================================================================================================================
>
> Also,
>
> http://www.amibroker.com/library/formula.php?id=121
>
> or with dots to highlight reversals:/* Short Term Reversal Signals
> with alerts by Larry Lovrencic */
>
> /*Closing Price Reversals*/
>
> CPRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<Ref(H,-1) AND
> L<Ref(L,-1) AND C>Ref(C,-1);
>
> CPRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>Ref(H,-1) AND
> L>Ref(L,-1) AND C<Ref(C,-1);
>
> /*Hook Reversals*/
>
> HRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<Ref(H,-1) AND
> L>Ref(L,-1);
>
> HRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H<Ref(H,-1) AND
> L>Ref(L,-1);
>
> /*Island Reversals*/
>
> IRbuy=Ref(L,-2)>Ref(H,-1) AND L>Ref(H,-1);
>
> IRsell=Ref(H,-2)<Ref(L,-1) AND H<Ref(L,-1);
>
> /*Key Reversals*/
>
> KRbuy=O<Ref(C,-1) AND L<Ref(L,-1) AND C>Ref(H,-1);
>
> KRsell=O>Ref(C,-1) AND H>Ref(H,-1) AND C<Ref(L,-1);
>
> /*Open Close Reversals*/
>
> OCRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<Ref(H,-1) AND
> L<Ref(L,-1) AND C<Ref(C,-1);
>
> OCRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>Ref(H,-1) AND
> L>Ref(L,-1) AND C>Ref(C,-1);
>
> /*Pivot Point Reversals*/
>
> PPRbuy=Ref(L,-1)<Ref(L,-2) AND Ref(L,-1)<L AND C>Ref(H,-1);
>
> PPRsell=Ref(H,-1)>Ref(H,-2) AND Ref(H,-1)>H AND C<Ref(L,-1);
>
> MaxGraph=5;
>
> Graph0 = Close;
>
> Graph0Style = 128;
>
> Graph0Color=1;
>
> Graph3=H*1.005; /* Alerts */
>
> Graph3Style=4+8+16+512; /* Alerts */
>
> graphxspace=5;
>
> Graph0BarColor = IIf( CPRbuy, 8, IIf( CPRsell,4, IIf( HRbuy,10, IIf(
> HRsell,11, IIf( IRbuy,3, IIf( IRsell,15, IIf( KRbuy,6, IIf( KRsell,7,
> IIf( OCRbuy,9, IIf( OCRsell,13, IIf( PPRbuy,16, IIf( PPRsell,12, 1 ) )
> ) ) ) ) ) ) ) ) ) ) ; /* The colors should be changed depending on
> your background color */
>
> Graph3BarColor = IIf( CPRbuy, 8, IIf( CPRsell,4, IIf( HRbuy,10, IIf(
> HRsell,11, IIf( IRbuy,3, IIf( IRsell,15, IIf( KRbuy,6, IIf( KRsell,7,
> IIf( OCRbuy,9, IIf( OCRsell,13, IIf( PPRbuy,16, IIf( PPRsell,12, 2 ) )
> ) ) ) ) ) ) ) ) ) ) ; /* Alerts - The last color (2) should be the
> same as your background*/
>
> ch= (Close-(Ref(Close,-1)));
>
> chpct=ch/Ref(C,-1)*100;
>
> MA5D=MA(C,5);
>
> Graph1=MA5D;
>
> Graph1Style=1;
>
> Graph1Color=4;
>
> MA20D=MA(C,20);
>
> Graph2=MA20D;
>
> Graph2Style=1;
>
> Graph2Color=5;
>
> Title =Date()+" "+Name()+" Open"+WriteVal(O)+" High"+WriteVal(H)+"
> Low"+WriteVal(L)+" Close" + WriteVal(Graph0) + " Previous Close " +
> WriteVal((Ref(Graph0,-1))) + "Change=" + WriteVal(ch)+"
> ("+WriteVal(chpct,format=1.2)+"%)";
>
>
> -----Original Message-----
> From: Anthony Faragasso [mailto:ajf1111@x...]
> Sent: Thursday, 29 November 2001 06:43
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Pattern Formula ( Key Reversal Up
> Pattern )
>
> Hello to the Group;
>
> I have included 3 formulas for Amibroker, ( KEY REVERSALS )
>
> 1. Key Reversals_i ( Paste in the Indicator Builder )
> 2. Key Reversals Up Pattern Commentary ( Paste in the Guru
> Commentary)
> 3. Key Reversals Up Pattern Exploration and System ( Paste
> in Automatic
> Analysis )
>
> If someone could optimize the system signals and rules for
> buy and sell
> and revert back with details.
> that would be appreciated.
>
> Guru Commentary
>
> Will give # of times the pattern has occured, Total number
> of bars in
> the test, % of time the pattern occured, # of times the
> pattern was
> profitiable, and % of profitiability.
>
> Automatic Analysis
>
> There are 2 operations here,
> 1. hit explore and your will have a spreadsheet showing the
> information
> as in Commentary
> 2. hit backtest and the system test will be run.
>
> Indicator builder
>
> Code highlights the Key reversals.
>
> Thank you
> Anthony
>
>
>
>
> Yahoo! Groups Sponsor
ADVERTISEMENT


>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.