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

RE: [amibroker] Re: Calculating Stats



PureBytes Links

Trading Reference Links




<SPAN 
class=682091713-09072003>Anthony/Eugene,
You 
may find the site www.pristine.com  
to be of interest.  They do a lot of work with patterns and would call this 
a "Pristine Sell" setup. From their perspective you would Short during the setup 
if the overall trend direction is falling. A buy would be 3-5 down days in an up 
trend. FWIW I have found the setups to work far better if you follow the trend, 
trying to buck that trend can be very challenging.....
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Anthony Faragasso 
[mailto:ajf1111@xxxxxxxx]Sent: Wednesday, July 09, 2003 7:58 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Re: Calculating Stats
Eugene and Dom
 
I have attached an image showing the 
pattern...
 
DOM: ( yes...I have your formula completed...except 
I am stuck with returning 2 values..min and max values....).
 
Try this:
load into AA....n last quotations and n=1...click 
explore.
 

// setup P<FONT 
color=#ff0000 size=2>attern
pat=Ref(C,-<FONT 
color=#ff00ff face="Courier New" size=2>5<FONT 
size=2>)>Ref<FONT 
size=2>(C,-<FONT color=#ff00ff face="Courier New" 
size=2>4)AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
face="Courier New" size=2>3)<<FONT 
color=#0000ff size=2>Ref(C,-<FONT color=#ff00ff 
face="Courier New" size=2>4) AND <FONT 
color=#0000ff size=2>Ref(C,-<FONT color=#ff00ff 
face="Courier New" size=2>2)><FONT 
color=#0000ff size=2>Ref(C,-<FONT color=#ff00ff 
face="Courier New" size=2>3) AND <FONT 
color=#0000ff size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2) AND C ><FONT face="Courier New" 
size=2> Ref<FONT 
size=2>(C,-1<FONT 
size=2>);
<FONT 
size=2>/*********************************************************/<FONT 
color=#ff0000 size=2>
// # of patterns
pat1=Cum<FONT 
size=2>(pat);
//# of bars
bars=Cum<FONT 
size=2>(1<FONT 
size=2>);
//% Pattern
Cond1=(Cum<FONT 
size=2>(pat)/Cum<FONT 
size=2>(1<FONT 
size=2>))*100<FONT 
size=2>;
/************************************/<FONT color=#ff0000 
face="Courier New" size=2>
//# Wins
// 1 day up after 
pattern
Day1up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-1) AND 
C> Ref<FONT 
size=2>(C,-1<FONT 
size=2>));
// 2 days up after pattern
Day2up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-2) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>1)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2) AND C> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1));//2 days 
up
// 3 days up after pattern
Day3up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-3) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>2)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1));//3 days 
up
// 4 days up after pattern
Day4up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-4) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>3)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>4) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3)AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1) > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1));//4 days 
up
 
// % wins
Day1upPercent=(<FONT color=#0000ff 
size=2>Cum(Ref<FONT 
size=2>(pat,-1) AND 
C > Ref<FONT 
size=2>(C,-1<FONT 
size=2>))/Cum<FONT 
size=2>(pat))*100<FONT 
size=2>;
Day2upPercent=(<FONT color=#0000ff 
size=2>Cum(Ref<FONT 
size=2>(pat,-2) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>1)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2) AND C> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1))/<FONT color=#0000ff 
size=2>Cum(pat))*<FONT color=#ff00ff 
size=2>100;<FONT 
size=2>
Day3upPercent=(Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-3) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>2)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1))<FONT face="Courier New" 
size=2>/Cum<FONT 
size=2>(pat))*100<FONT 
size=2>;
Day4upPercent=(Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-4) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>3)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>4) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3)AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1) > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1))<FONT face="Courier New" 
size=2>/Cum<FONT 
size=2>(pat))*100<FONT 
size=2>;
 
Filter=1<FONT 
size=2>;
AddColumn(pat1,<FONT color=#ff00ff 
size=2>"#Pat",<FONT color=#ff00ff 
size=2>1);
AddColumn(bars,<FONT color=#ff00ff 
size=2>"#Bars",<FONT color=#ff00ff 
size=2>1);
AddColumn(Cond1,<FONT color=#ff00ff 
size=2>"%Pat",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day1up,<FONT color=#ff00ff 
size=2>"#1up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);
AddColumn(Day1upPercent,<FONT color=#ff00ff 
size=2>"%<FONT color=#ff00ff face="Courier New" 
size=2>1up",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day2up,<FONT color=#ff00ff 
size=2>"#2up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);
AddColumn(Day2upPercent,<FONT color=#ff00ff 
size=2>"%2up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day3up,<FONT color=#ff00ff 
size=2>"#3up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
face="Courier New" size=2>
AddColumn(<FONT 
size=2>Day3<FONT 
size=2>upPercent,"%<FONT 
color=#ff00ff face="Courier New" size=2>3<FONT color=#ff00ff 
size=2>up",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day4up,<FONT color=#ff00ff 
size=2>"#4up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);<FONT color=#0000ff 
face="Courier New" size=2>
AddColumn<FONT face="Courier New" 
size=2>(Day4upPercent,<FONT color=#ff00ff face="Courier New" 
size=2>"%4up",<FONT 
color=#ff00ff face="Courier New" size=2>1.2<FONT face="Courier New" 
size=2>);<FONT color=#000000 face=Arial 
size=2>
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  dom1_1998 
  To: <A 
  href="" 
  title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
  Sent: Tuesday, July 08, 2003 9:08 
AM
  Subject: [amibroker] Re: Calculating 
  Stats
  I'm going to take a WAG at saying this.  But I think 
  Eugene may wantto know, at least I do, what's the performance if held 1 
  day after thecondition, 2 days after, 3 days after etc etc up to the 5th 
  day aftersaid cond.Dominick
  Send BUG REPORTS to <A 
  href="">bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
  
<BLOCKQUOTE 
><FONT 
  face="Courier New">---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).Version: 6.0.498 
  / Virus Database: 297 - Release Date: 7/9/2003Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







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.