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

[amibroker] API code socket port connection to TWS?



PureBytes Links

Trading Reference Links

Steve,
in the already posted example I did not include the time response of 
each average. The only criterion was the price divergence. I will 
give full calculation of Jayson´s coefficient "s" soon.
[the code was almost ready !!BUT NOT SAVED !!I was writing some 
cosmetic details and, all of a sudden, a RUNTIME ERROR appeared on my 
screen,the program shut down and everything was lost !!It is better 
to save from time to time !!Anyway, I will re-build it and revert, 
the subject is interesting]
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Steve Almond" <steve2@xxxx> wrote:
> Dimitris,
> 
> Wouldn't you expect T3(3) to respond more quickly and with less 
overshoot
> than DEMA(20) or TEMA(20)?
> If you graph DEMA(3) and TEMA(3) against T3(3) then DEMA/TEMA 
respond much
> better.
> 
> Or do I not get it?
> 
> Steve
> 
> 
> ----- Original Message ----- 
> From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, March 04, 2004 9:43 AM
> Subject: [amibroker] A Ti3 crash test
> 
> 
> > Let us suppose a stock goes from 100 to 110 in one day.
> > We shall examine the response of DEMA, TEMA and Ti3 averages.
> > These smoothers catch the new price in some days, then go higher 
and
> > find again [asymptotically] the final price.
> > For a given DEMA/TEMA period we may calibrate the Ti3 period to
> > obtain the same Maximum Divergence from the final price.
> > EXAMPLE
> > For DEMA/TEMA period=20, we need Ti3 periods  x=4 and x=7
> > respectively to avoid exceeding the DEMA/TEMA MaxDiv.
> >
> > // Ti3 crash test and Maximum Divergence, by D. Tsokakis, March 
2004
> > function T3(price,periods)//According to Jayson´s message 59811
> > {
> > s = 0.83;
> > e1=EMA(price,periods);
> > e2=EMA(e1,Periods);
> > e3=EMA(e2,Periods);
> > e4=EMA(e3,Periods);
> > e5=EMA(e4,Periods);
> > e6=EMA(e5,Periods);
> > 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;
> > }
> > L1=LastValue(Cum(1));D=100;DD=110;
> > C1=IIf(Cum(1)<L1-D,D,DD);
> > Plot(C1,"\nCLOSE",1,8);
> > PERIOD=20;
> > S1=DEMA(C1,PERIOD);
> > S2=TEMA(C1,PERIOD);
> > X=Param("X",3,3,20,1);
> > Ti3=T3(C1,X);
> > //The maximum divergence
> > Div1=100*(s1-C1)/LastValue(C1);MaxDiv1=LastValue(Highest(Div1));
> > Div2=100*(s2-C1)/LastValue(C1);MaxDiv2=LastValue(Highest(Div2));
> > Div3=100*(Ti3-C1)/LastValue(C1);MaxDiv3=LastValue(Highest(Div3));
> > Plot(S1,"\nDEMA",colorRed,1);
> > Plot(S2,"\nTEMA",colorBrightGreen,1);
> > Plot(Ti3,"\nT3",colorBlue,1);
> > z=WriteVal(period,1.0);
> > Title="Maximum Divergence for \nDEMA("+z+") ="+WriteVal
(MaxDiv1,1.2)
> > +"%"+"\nTEMA("+z+")="+WriteVal(Maxdiv2,1.2)+"%"+"\n     Ti3
("+WriteVal
> > (x,1.0)+")="+WriteVal(maxDiv3,1.2)+"%";
> >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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 Links
> >
> >
> >
> >
> >
> >
> >
> >



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/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 
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:
     http://docs.yahoo.com/info/terms/