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

[amibroker] Sequential signals, a variation of TomDeMark method



PureBytes Links

Trading Reference Links

Here is a complete code for AA and IB.
You may optimize your stock and then replace the optimal values in 
the default place.
// Variations of the sequential method
// Signals without exrem
b=0;s=0;Fb=0;Fs=0;
xb=Optimize("xb",6,2,15,1);
xs=Optimize("xs",8,2,15,1);
for(x=xb;x<20;x++)
{ 
b1=Sum(C<Ref(C,-3),x)==x;
Fb=Fb+b1;
b=(b1==0 AND Ref(b1,-1))+b;
PlotShapes((shapeHollowSmallCircle)*b1,x);
}
for(x=xs;x<20;x++)
{
s1=Sum(C>Ref(C,-3),x)==x;
Fs=Fs+s1;
s=(s1==0 AND Ref(s1,-1))+s;
PlotShapes((1+shapeHollowSmallCircle)*S1,x);
}
Plot(C,"C",IIf(b!=0,colorGreen,IIf(s!=0,colorRed,colorBlack)),64);
GraphXSpace=2;
Buy=b!=0;
Sell=s!=0;
PlotShapes(shapeDownArrow*Sell,colorRed);
PlotShapes(shapeUpArrow*Buy,colorBrightGreen);
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
Filter=Fb OR Fs OR Buy OR Sell;// EXPLORE FOR THE N=1 LAST QUOTATIONS
AddColumn(Fb,"preBuy",1.0,colorBlack,IIf
(Fb,colorBrightGreen,colorWhite));
AddColumn(Buy,"Buy",1.0,colorBlack,IIf(Buy,colorGreen,colorWhite));
AddColumn(Fs,"preSell",1.0,colorBlack,IIf(Fs,colorPink,colorWhite));
AddColumn(Sell,"Sell",1.0,colorBlack,IIf(Sell,colorRed,colorWhite));

In the Explore mode, you may search for stocks with pre-buy/pre-sell 
signals.
[Another, more risky, idea is to go long when the pre-sell signals 
begin, hoping for many small circles in raw. BMET recent example was 
characteristic...]
TomDeMark suggests 9 cascade warning signals, it is not that frequent 
for this [bullish] year.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "larypowell" <larypowell@xxxx> 
wrote:
> Dimitris:
> 
>  
> 
> I am trying to use this in AA as a scan/backtest criteria, and 
cannot
> seem to figure out how to create the Buy rules.  Any help would be
> appreciated.  
> 
>  
> 
> Thanks,
> 
>  
> 
> //Demark_Buy created by Dimitris//
> 
>   
> 
> Plot(C,"C",colorBlack,64);Title=Name();
> 
> for(x=5;x<20;x++)
> 
> {S2=Sum(C<Ref(C,-3),x)==x;
> 
> Buy=s2==0 AND Ref(s2,-1);
> 
> PlotShapes((shapeHollowSmallCircle+shapePositionAbove)*s2,x);
> 
> PlotShapes(shapeUpArrow*Buy,colorBrightGreen);
> 
> Title=Title+WriteIf(s2,"["+WriteVal(x,1.0)+"]","");}
> 
>  
> 
>  
> 
> Larry M. Powell
> 
> --------------------------------------------------------------------
-
> Eliminate annoying spam!
> 
> My mailbox is protected by iHateSpam, the #1-rated spam buster.
> http://www.ihatespam.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Remanufactured Ink Cartridges & Refill Kits at MyInks.com for: HP $8-20. Epson $3-9, Canon $5-15, Lexmark $4-17. Free s/h over $50 (US & Canada).
http://www.c1tracking.com/l.asp?cid=6351
http://us.click.yahoo.com/0zJuRD/6CvGAA/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/