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

RE: [amibroker] Re: Real-Time Trading System Examples



PureBytes Links

Trading Reference Links




I think I've worked out my own answers:
 
1. Yes.
2. Yes.
3. a2 = T3(5); a3 = T3(8);
 
If so, here is my code for "Pocket Rocket":
 

/* T3 Pocket Rocket*/
a = 0.618;
n4 =3;
alpha = 2/(n4 + 1);
e1 = EMA(Close, n4);e2 = <FONT 
color=#0000ff>EMA (e1, n4);e3 = EMA (e2, 
n4);e4 = EMA (e3, n4);e5 = <FONT 
color=#0000ff>EMA (e4, n4);e6 = EMA (e5, 
n4);
T34 = -a^3 * e6 + (3 * 
a^2 +3 * a^<FONT 
color=#ff00ff>3) * e5 + (-6 * a^<FONT 
color=#ff00ff>2 - 3 * a - <FONT 
color=#ff00ff>3 * a^3) * e4 + (<FONT 
color=#ff00ff>1 + 3 * a + a^<FONT 
color=#ff00ff>3 + 3 * a^<FONT 
color=#ff00ff>2) * e3;
n =5;
alpha = 2/(n + 1);
e1 = EMA(Close, n);e2 = <FONT 
color=#0000ff>EMA (e1, n);e3 = EMA (e2, n);e4 
= EMA (e3, n);e5 = EMA 
(e4, n);e6 = EMA (e5, n);
T3 = -a^3 * e6 + (3 * 
a^2 +3 * a^<FONT 
color=#ff00ff>3) * e5 + (-6 * a^<FONT 
color=#ff00ff>2 - 3 * a - <FONT 
color=#ff00ff>3 * a^3) * e4 + (<FONT 
color=#ff00ff>1 + 3 * a + a^<FONT 
color=#ff00ff>3 + 3 * a^<FONT 
color=#ff00ff>2) * e3;
n1 =8;
alpha = 2/(n1 + 1);
e1 = EMA(Close, n1);e2 = <FONT 
color=#0000ff>EMA (e1, n1);e3 = EMA (e2, 
n1);e4 = EMA (e3, n1);e5 = <FONT 
color=#0000ff>EMA (e4, n1);e6 = EMA (e5, 
n1);
T31 = -a^3 * e6 + (3 * 
a^2 +3 * a^<FONT 
color=#ff00ff>3) * e5 + (-6 * a^<FONT 
color=#ff00ff>2 - 3 * a - <FONT 
color=#ff00ff>3 * a^3) * e4 + (<FONT 
color=#ff00ff>1 + 3 * a + a^<FONT 
color=#ff00ff>3 + 3 * a^<FONT 
color=#ff00ff>2) * e3;
x=abs(T34-T3)+<FONT 
color=#0000ff>abs(T3-T31);
Plot(x,"pocket rocket",<FONT 
color=#ff00ff>1,1);
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=steve2@xxxxxxxxxxxxxxxxxxxx 
  href="">Steve Almond 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, April 11, 2004 8:52 
AM
  Subject: Re: [amibroker] Better news [was 
  Re: Good news for Ti3() users]- Dimitris....Could it be written
  
  Steve,
   
  This looks like a very interesting oscillator. Could you please confirm 
  the following:
   
  1.In the formula e1:=Mov(P,3,E) we (Amibroker folks) would use close 
  (C) for P?
  2. a = c1*e6+c2*e5+c3*e4+c4*e3?
  3. what is a2? What is a3?
   
  Thanks,
   
  Steve
   
  <BLOCKQUOTE dir=ltr 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A title=kernish@xxxxxxxxxxx 
    href="">CedarCreekTrading 
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">amibroker@xxxxxxxxxxxxxxx 
    Sent: Saturday, April 10, 2004 6:53 
    PM
    Subject: Re: [amibroker] Better news 
    [was Re: Good news for Ti3() users]- Dimitris....Could it be written
    
    DT,
     
    Sorry about the "infidel" code (and 
    chart).  I'm sure you can translate.  I've looked at a few 
    thousand charts and I can assure you that I have never seen an idicator that 
    preceeds directional movement ... quite like the Pocket Rocket.  It 
    does not signal a direction...just the convergence (superimpostion, 
    confluence, "pick a term") of the T3, T5, T8.  
     
    It's a new tool in our technical toolbox...but, 
    my, my a powerful one!
     
    Take care,
     
    Steve
     
     
    <BLOCKQUOTE 
    >
      ----- Original Message ----- 
      <DIV 
      >From: 
      DIMITRIS 
      TSOKAKIS 
      To: <A 
      title=amibroker@xxxxxxxxxxxxxxx 
      href="">amibroker@xxxxxxxxxxxxxxx 
      
      Sent: Friday, April 09, 2004 10:36 
      AM
      Subject: [amibroker] Better news [was 
      Re: Good news for Ti3() users]- Dimitris....Could it be written
      Rick,My scope was a bit different.Since we use 
      D10 to D50 or T10 to T20, I ask from Ti3[BTW it is not mine, it 
      belongs to Tim Tillson research] to have a distorsion "between" the 
      commonly used smoothers.The results of this research were interesting 
      and a bit far from intuition: The Ti3 period for a distorsion between 
      TEMA10 and TEMA20 was mainly 5,6,7 [and not 20 or 30] with the 
      respective "s" values.Any other period/s would give more distorsion 
      and lead quickly the Ti3 to oscillate.In many N100 indicators I 
      think DEMA20 to DEMA30 is reliable enough to catch the main 
      bullish/bearish "moments". This fact implies the use of a similar Ti3s 
      .On the other side, my intension was to *calculate* the proper "s", 
      else it would sould like a guru hint if I was writing "s should be 
      0.67". As you probably see, maths are always behind the curtain. 
      Sometimes they are the "secrets" of various formulas but, sometimes 
      it is better to be fully explained.Dimitris Tsokakis --- In 
      amibroker@xxxxxxxxxxxxxxx, "Rick Osborn" <ricko@xxxx> wrote:> 
      Dimitris> Thanks for all you share with the rest of us.> 
      > I would like to refer you back to your posting when you looked 
      for the maximum divergence for Ti3 compared to DEMA and TEMA.  I 
      want to make sure I am looking at the correct things and I would 
      appreciate your patience in this regard.> > I note, for 
      example that both DEMA and TEMA (and Ti3 for that matter) require 
      several (and different number of) bars to jump up to the new price, 
      but then overshoot, again by differing amounts.> > While 
      DEMA is quicker, it also overshoots the most, and then undershoots the 
      price later on.> TEMA is slower and, while it takes much longer to 
      fall back to the price, it does not undershoot.> > Your 
      Ti3, on the other hand is much quicker and does not undershoot. 
      > > I presume, therefore, that the preferred result is to 
      find an indicator that is quick to adjust to the new price, and have 
      the minimum overshoot - and your study determines the minimum and 
      maximum values of the parameter "s" which optimizes this.> 
      > If my thinking is correct, then it would seem that the "best" 
      value for "s" for a given "period" is the one that responds the 
      quickest - and overshoots the least.  Am I missing anything 
      here> > Thanks again> Rick> > 
      >   ----- Original Message ----- >   
      From: DIMITRIS TSOKAKIS >   To: amibroker@xxxxxxxxxxxxxxx 
      >   Sent: Friday, April 09, 2004 5:58 
      AM>   Subject: [amibroker] Better news [was Re: Good news 
      for Ti3() users]- Dimitris....Could it be written> > 
      >   You may have them both:> >   
      //The Ti3 function>   function 
      T3(array,p,s)>   {>   
      f=2/(p+1);>   e1=EMA(array,p);>   
      e2=EMA(e1,p);>   e3=EMA(e2,p);>   
      e4=EMA(e3,p);>   e5=EMA(e4,p);>   
      e6=EMA(e5,p);>   c1=-s*s*s;>   
      c2=3*s*s+3*s*s*s;>   
      c3=-6*s*s-3*s-3*s*s*s;>   
      c4=1+3*s+s*s*s+3*s*s;>   
      Ti3=c1*e6+c2*e5+c3*e4+c4*e3;>   return 
      Ti3;>   }>   //The Ct 
      function>   function Ct(array,p,s)>   
      {>   f=2/(p+1);>   
      e1=EMA(array,p);>   e2=EMA(e1,p);>   
      e3=EMA(e2,p);>   e4=EMA(e3,p);>   
      e5=EMA(e4,p);>   e6=EMA(e5,p);>   
      c1=-s*s*s;>   c2=3*s*s+3*s*s*s;>   
      c3=-6*s*s-3*s-3*s*s*s;>   
      c4=1+3*s+s*s*s+3*s*s;>   //The value of 
      tomorrow&#900;s array  that touches its tomorrow&#900;s 
      Ti3 = >   is>   
      arrayt=>   
      (1-f)*((c1*f^5+c2*f^4+c3*f^3+c4*f^2)*e1+(c1*f^4+c2*f^3+c3*f^2+c4*f)>   
      *e2+(c1*f^3+c2*f^2+c3*f+c4*1)*e3+(c1*f^2+c2*f+c3*1)*e4+(c1*f+c2*1)>   
      *e5+c1*e6)/(1-(C1*f^6+C2*f^5+C3*f^4+C4*f^3)) ;>   return 
      arrayt;>   }>   
      //Application>   array=C;>   
      p=10;s=0.8;>   
      Plot(array,"array",1,8);>   
      Plot(T3(array,p,s),"Ti3",colorRed,1);>   
      Plot(Ct(array,p,s),"Ct",5,1);> >   Note that you 
      may use any array, Close is just an example.>   Dimitris 
      Tsokakis>   --- In amibroker@xxxxxxxxxxxxxxx, "epintoem" 
      <epintoem@xxxx> wrote:>   > the 
      CT>   > >   > --- In 
      amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" >   
      <TSOKAKIS@xxxx> >   > wrote:>   
      > > Which one, the Ti3 or the Ct ?>   > > 
      Dimitris Tsokakis>   > > --- In 
      amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> 
      >   wrote:>   > > > How 
      difficult would it be to rewrite this as a >   > 
      function....because >   > > it >   
      > > > will provide flexibility for testing...>   
      > > > >   > > > Thanks for your 
      help>   > > > >   > > 
      > >   > > > --- In amibroker@xxxxxxxxxxxxxxx, 
      HarveyHP <harveyhp@xxxx> >   
      wrote:>   > > > > Many thanks for this, 
      Dimitris.  Much appreciated.  Sorry to >   
      > > > trouble you.>   > > > > 
      HHP>   > > > > 
      ===================>   > > > > 
      >   > > > > At 03:46 AM 06/04/2004, you 
      wrote:>   > > > > >Here it 
      is>   > > > > >>   > 
      > > > >We may calculate the value of tomorrow´s Close 
      necessary to >   > touch>   > 
      > > > >tomorrows Ti3 from the code>   > 
      > > > >>   > > > > >  
      p=10;s=0.8;f=2/(p+1);>   > > > > >// 
      Ti3>   > > > > 
      >e1=EMA(C,p);>   > > > > 
      >e2=EMA(e1,p);>   > > > > 
      >e3=EMA(e2,p);>   > > > > 
      >e4=EMA(e3,p);>   > > > > 
      >e5=EMA(e4,p);>   > > > > 
      >e6=EMA(e5,p);>   > > > > 
      >c1=-s*s*s;>   > > > > 
      >c2=3*s*s+3*s*s*s;>   > > > > 
      >c3=-6*s*s-3*s-3*s*s*s;>   > > > > 
      >c4=1+3*s+s*s*s+3*s*s;>   > > > > 
      >Ti3=c1*e6+c2*e5+c3*e4+c4*e3;>   > > > > 
      >//The value of tomorrow´s Close Ct that touches tomorrow´s 
      >   Ti3 >   > is>   
      > > > > >Ct=>   > > > > 
      >(1-f)*((c1*f^5+c2*f^4+c3*f^3+c4*f^2)*e1+>   > > 
      (c1*f^4+c2*f^3+c3*f^2+c4*f)>   > > > > 
      >*e2+(c1*f^3+c2*f^2+c3*f+c4*1)*e3+(c1*f^2+c2*f+c3*1)*e4+>   
      > > (c1*f+c2*1)>   > > > > 
      >*e5+c1*e6)/(1-(C1*f^6+C2*f^5+C3*f^4+C4*f^3)) ;//relation 
      III>   > > > > 
      >Plot(C,"Close",1,8);Plot(Ti3,"Ti3",4,1);Plot(Ct,"Ct",5,1);>   
      > > > > >>   > > > > 
      >Dimitris Tsokakis>   > > > > 
      >>   > > > > >--- In 
      amibroker@xxxxxxxxxxxxxxx, HarveyHP <harveyhp@xxxx> 
      >   > wrote:>   > > > > 
      > > Dimitris,>   > > > > > > 
      Thank you for checking.  This is strange - perhaps 
      >   someone >   > > wise 
      >   > > > in>   > > > 
      > >the ways>   > > > > > > of 
      computers can suggest a solution, or even a reason.  
      >   The >   > > > 
      other>   > > > > 
      >three>   > > > > > > .txt files and 
      the .gif I can left-click and open in IE >   > 
      right >   > > > away,>   > 
      > > > >or>   > > > > > > 
      right-click and save to disk with no trouble at all, but 
      >   no >   > > > 
      matter>   > > > > >what 
      I>   > > > > > > do "Ti3next.txt" 
      remains stubborn.  When I left-click >   there 
      >   > > is a>   > > > 
      > >delay,>   > > > > > > then 
      "This page cannot be displayed", and attempting to 
      >   > right->   > > > 
      click>   > > > > >and>   
      > > > > > > save produces "A connection to the server 
      could not be>   > > > > >established", 
      again>   > > > > > > after a 
      delay.  I have made numerous attempts over three 
      >   > > days.  >   > > 
      > Yet>   > > > > 
      >this>   > > > > > > file is only 1 
      Kb in size while the other three are 2, 5, >   > 
      and >   > > 6 >   > > > 
      Kb>   > > > > >for the>   
      > > > > > > .txt files and 35 Kb. for the 
      .gif.>   > > > > > > 
      HHP>   > > > > > > 
      =============================>   > > > > > 
      >>   > > > > > > At 10:18 AM 
      05/04/2004, you wrote:>   > > > > > > 
      >HHP,>   > > > > > > >I just 
      openen all 5 files without problem.>   > > > 
      > > > >Dimitris Tsokakis>   > > > 
      > > > >--- In amibroker@xxxxxxxxxxxxxxx, HarveyHP 
      >   <harveyhp@xxxx> >   > > 
      > wrote:>   > > > > > > > > 
      Has anyone else had difficulty in accessing the>   > 
      > > > > > >file "Ti3next.txt"?  I 
      made>   > > > > > > > > several 
      attempts last night and tonight but get the >   > 
      > response>   > > > > > > >that 
      "A>   > > > > > > > > connection 
      to the server could not be established".  >   
      > The >   > > > other>   
      > > > > > > >files in the>   > 
      > > > > > > > folder were copied with no 
      problem.>   > > > > > > > 
      >>   > > > > > > > > 
      HHP>   > > > > > > > > 
      ==========================>   > > > > > 
      > > >>   > > > > > > > > 
      At 03:00 AM 05/04/2004, you wrote:>   > > > > 
      > > > > >The statistics were much better than expected. 
      We >   can >   > > say 
      >   > > > now>   > > > 
      > >that>   > > > > > > 
      >we>   > > > > > > > > >can 
      predict the Cross(Ti3a,Ti3b) without mistake.>   > 
      > > > > > > > >See the details 
      at>   > > > > > > > > 
      >>   > > > > > > > > ><A 
      href="">http://finance.groups.yahoo.com/group/amibroker->   
      > > ts/files/A%>   > > > > 
      >20Ti3%>   > > > > > > > > 
      >20application/>   > > > > > > > 
      > >Cross(Ti3a,Ti3b) predictions.txt>   > > 
      > > > > > > >Dimitris Tsokakis>   
      > > > > > > > > >>   > > 
      > > > > > > >--- In amibroker@xxxxxxxxxxxxxxx, 
      "DIMITRIS TSOKAKIS">   > > > > > > 
      ><TSOKAKIS@xxxx>>   > > > > > 
      > > > >wrote:>   > > > > > 
      > > > > > A new Ct.txt is added at>   > 
      > > > > > > > > > <A 
      href="">http://finance.groups.yahoo.com/group/amibroker->   
      > > > ts/files/A%>   > > > > > 
      > >20Ti3%>   > > > > > > > 
      > > > 20application/>   > > > > > 
      > > > > > The code gives the necessary tomorrows Close 
      for >   a >   > 
      Ti3>   > > > (pa),>   > > 
      > > >Ti3>   > > > > > > 
      >(pb)>   > > > > > > > > > 
      > cross.>   > > > > > > > > 
      > > The calculation is direct, [no approximations 
      >   used] >   > > and 
      >   > > > the>   > > > 
      > > > > > >accurate>   > > > 
      > > > > > > > result comes 
      immediately.>   > > > > > > > > 
      > > From various examples I think I can anticipate 
      the>   > > > > 
      >tomorrow's>   > > > > > > > > 
      >cross,>   > > > > > > > > 
      > > I will run some statistics and revert...>   
      > > > > > > > > > > Dimitris 
      Tsokakis>   > > > > > > > > 
      >>   > > > > >> > 
      > >   Send BUG REPORTS to 
      bugs@xxxx>   Send SUGGESTIONS to 
      suggest@xxxx>   
      ----------------------------------------->   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 
      > > > > 
      ------------------------------------------------------------------------------>   
      Yahoo! Groups Links> >     a.. To visit 
      your group on the web, go to:>     <A 
      href="">http://groups.yahoo.com/group/amibroker/>       
      >     b.. To unsubscribe from this group, send 
      an email to:>     
      amibroker-unsubscribe@xxxxxxxxxxxxxxx>       
      >     c.. Your use of Yahoo! Groups is subject 
      to the Yahoo! Terms of Service.Send 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 
      Send 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 
      Send 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 
  


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








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.