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

Re: [amibroker] Re: Enhanced H&S pattern, I [the false readings] -- For DT



PureBytes Links

Trading Reference Links


Anthony,
 
Thanks so much for posting the code.
 
Kind Regards,
GaryAnthony Faragasso <ajf1111@xxxxxxxx> wrote:
Mark,Here is a formula I have been using....You can use the same formula inIndicator builder and Automatic Analysis.// Patternsx = Cum(1);per = Param("Percent",3,1,5,1);s1=L;s11=H;pS = TroughBars( s1, per, 1 ) == 0;endt= LastValue(ValueWhen( pS, x, 1 ));startt=LastValue(ValueWhen( pS, x, 2 ));endS = LastValue(ValueWhen( pS, s1, 1 ) );startS = LastValue( ValueWhen( pS, s1, 2 ));dtS =endt-startt;aS = (endS-startS)/dtS;bS = endS;trendlineS = aS * ( x -endt ) + bS;pR = PeakBars( s11, per, 1 ) == 0;endt1= LastValue(ValueWhen( pR, x, 1 ));startt1=LastValue(ValueWhen( pR, x, 2 ));endR = LastValue(ValueWhen( pR, s11, 1 ) );startR = LastValue( ValueWhen( pR, s11, 2 ));DTR=ENDT1-STARTT1;aR =
 (endR-startR)/dtR;bR = endR;trendlineR = aR * ( x -endt1 ) + bR;BEGIN=Min(STARTT,STARTT1);TRS = IIf(x>BEGIN-10,trendlineS,-1e10);TRR = IIf(x>BEGIN-10,trendlineR,-1e10);Condcolor=(Cross(C,trendlineR) AND X>ENDT1) OR (Cross(trendlineS,C) ANDX>ENDT);BarColor=IIf(Condcolor,7,1);Plot(C,"Close",BarColor,styleCandle);Plot(TRS,"Support",colorYellow,styleLine);Plot(TRR,"Resist",colorYellow,styleLine);/////////////////////////////////////// Shading //////////////////////////////////////fill=Param("style",2,1,2,1);>x=IIf(trs > trr,trr,trs);Plot(x,"",colorLightGrey,style);Plot(trr,"",colorPink,style);////////////////////////////////////////////// Pattern Recognition in title bar
 /////////////////////////////////////////////Lowline=Ends-starts;Highline=endr-startr;Wedge=IIf(Highline <0 AND Lowline > 0,1,0);DecendingTriangle=IIf(Highline < 0 AND Lowline==0,1,0);AscendingTriangle=IIf(Highline==0 AND Lowline > 0,1,0);DownChannel=IIf(Highline<0 AND Lowline<0,1,0);UpChannel=IIf(Highline>0 AND Lowline>0,1,0);BroadeningWedge=IIf(Highline > 0 AND Lowline < 0,1,0);///////////////////////////////////// Bullish or Bearish breakout ////////////////////////////////////BullishBreakout=Cross(C,trendlineR);BearishBreakout=Cross(trendlineS,C);Title=Name()+ WriteIf(wedge==1," Wedge","")+WriteIf(DecendingTriangle==1,"Decending Triangle","")+WriteIf(AscendingTriangle==1,"AscendingTriangle","")/*+WriteVal(Lowline)*/+WriteIf(DownChannel==1," DownwardSloping Channel","")+WriteIf(UpChannel==1," Upward
 SlopingChannel","")+WriteIf(broadeningWedge==1," BroadeningWedge","")+"\n"+EncodeColor(colorGreen)+WriteIf(bullishbreakout,"BullishBreakout",EncodeColor(colorRed)+WriteIf(bearishbreakout,"BearishBreakout",""))/*+WriteVal(highline)*/;/////////////////////////////////////// Automatic Analysis //////////////////////////////////////Filter=AscendingTriangle OR DecendingTriangle OR Wedge OR DownChannel ORUpChannel OR BroadeningWedge OR Bullishbreakout OR bearishbreakout;AddTextColumn(WriteIf(bullishbreakout,"bullish Breakout",""),"BullBreak");AddTextColumn(WriteIf(bearishBreakout,"Bearish Breakout",""),"BearBreak");AddTextColumn(WriteIf(ascendingtriangle,"AscendingTriangle",WriteIf(decendingtriangle,"DecendingTriangle",WriteIf(Wedge,"Wedge",WriteIf(DownChannel,"DownChannel",WriteIf(UpChannel,"Up Channel",WriteIf(BroadeningWedge,"BroadeningWedge","")))))),"Pattern");----- Original Message
 ----- From: "quanttrader714" <quanttrader714@xxxxxxxxx>To: <amibroker@xxxxxxxxxxxxxxx>Sent: Thursday, November 20, 2003 1:45 PMSubject: [amibroker] Re: Enhanced H&S pattern, I [the false readings] -- ForDTHi DT,One pattern I trade (when I notice it) is the ascending triangle.  Ihave your pattern recognition exploration which includes it, but neverseem to be able to find any.  Would love to be able to scan forcandidates to review.  Any ideas on how to make the code more"liberal" or just some simple code for only the ascending trianglethat I could play with and adjust?  I looked at what you coded in theexploration and must admit I don't follow it.  Thanks!Mark--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>wrote:> --- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:> > Hi DT,> >>
 > Thursday, November 20, 2003, 7:58:12 PM, you wrote:> >> > >> 2) The right shoulder is slightly higher than the leftshoulder.> > >> That's a no-no for me.  It should be no higher than, andideally> > DT> just> > >> a touch lower than, the left shoulder. (Yes, I'm picky.)  ^^_^^> >> > DT> But you speak for a 37.36 vs 37.75, ie an 1% difference ????> >> > I can't help it.  ^_^  I noticed it right away.> >> > >> 3) A touch of the neckline is a touch of a *support* line.> While a> > >> H&S is generally a bearish formation, it is not really bearish> until> > >> you get a clean, confirmed break of that neckline.  This onehas> no> > >> clean break.  I would say a clean break is at least one barwith> the> > >>
 high lower than the neckline.  Until that happens, it's asupport> > >> line, even in a rather bearish formation.  Penetration is NOT> > >> guaranteed by the formation itself.  Maybe peoplemisunderstand> > DT> this,> > >> and that's why so many claim the formation is worthless.  Any> > >> formation is worthless if you don't play by the rules.  ^_-> >> > DT> But, you shorted ^N225 3 bars b e f o r e the [unknown forthis> > DT> moment neckline breakout], donīt you remember ??> >> > Sure I remember.  ^_^  But I was not playing for a neckline> breakout.> > I was playing for a fall to the neckline.  I got it.  It was a> normal> > swing type play I think.  I saw the bounce rolling over, and Itook> > the short.> >> > At the time I
 took the shorts, and even before, I had a vision ofa> > H&S setting up.  But to be sure, I didn't take those shorts> *because*> > of any H&S.  I took them because price was rolling over, and the> > overall formation spoke of price weariness.> >> > DT> The question that began this thread is what do we do 2-3 barsb> e f o> > DT> r e the neckline touch.> >> > If you see it setting up, why would you not short the right> > shoulder's rollover?  The obvious answer is, "How much room do you> > have before you hit support"?  I had plenty of room, and onereason> I> > had that room was that the neckline was horizontal.> >> > Now look at BA again.  Short the breakdown on 10/21, and you havea> > profitable swing.  It's not much though, because the neckline is> >
 rising left to right.  So you get a bar or two, and you better be> > nimble about getting out.> >> > DT> IMO, BA is a typical whipsaw example.> >> > IMO, BA is not an example to get very excited about.  As I say, I> > didn't even see it until your code forced me to.> >> > DT> This would be a good end of this thread: A H&S is what we see> as a> > DT> H&S and nothing more. I tried [unsucessfully] to introducesome> > DT> objective criteria following your [respectable] personal> vision, but> > DT> it is the moment I give up.> >> > It's okay DT.  Really.  I think it is probably Mission Impossible> > anyway.> >> > >> (One of the great keys to successful swing trading --especially> > >> short trading -- is figuring out how many got in how
 muchtrouble> > >> exactly where.  This is what made the ^225 H&S "predictable"> before> > >> it fully formed, IMO.)> >> > DT> Shall we add this "how many got in how much trouble exactly> where" in> > DT> H&S criteria ? You should be kidding...> >> > No, no, no.  ^_^  Just a general comment on trading, that's all.It> > was clear some people were in trouble here in Tokyo, and if it was> > clear to this girl, it was also clear to people with a lot more> money> > who can really make things happen.  I think they did.> >> > DT> Thank you for your opinions, I give up at this critical point.> > DT> Dimitris Tsokakis> >> > Thanks for your hard work DT.  I hope you are not angry at me.  Ido> > appreciate all (and I marvel at your coding
 ability), but I dothink> > this type of thing has to be so obvious we don't need to code it.> As> > I said, it's kind of an analog thing (Left brain?  Right brain?  I> > can never remember which one I'm using, or supposed to be using).> > ^^_^^> >> > Best,> >> > Yuki>> King Gelon said to Archimedes : Even if you calculate the number of> the sans grains to fill the whole universe, it will be impossibleto> say it, we do not have such great numbers in our [math or not]> language.> Archimedes did the calculation first and then [that simple for him]> created out of the blue a new counting system to express his own> solution.> [http://physics.weber.edu/carroll/Archimedes/sand.htm> <A
 href="">http://www.etext.org/Zines/Critique/article/reckoner.html> etc etc]> It was probably one of the first "never say never" . Myriads> followed...> Dimitris TsokakisSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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.htmlYour use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/---Outgoing mail is certified Virus
 Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.542 / Virus Database: 336 - Release Date: 11/18/2003Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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. 
Do you Yahoo!?
Free Pop-Up Blocker - Get it now






Yahoo! Groups Sponsor












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.