PureBytes Links
Trading Reference Links
|
YHOO [and/or web] delays are funny sometimes.
Anyway, we talk the same language, another AFL plus...
Have a nice day
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
wrote:
> Example:
> If the Close array has a 10% distortion 100 bars ago [GREEN
> TRIANGLE], when the RSI(4) has less than 0.01 distortion ?
> Try the
>
> R1=RSI(4);
> Plot(R1,"R1",1,1);
> L1=LastValue(Cum(1)); D=100;
> Ic=C;
> percentage=10/100;
> C[L1-D]=(1+percentage)*Ic[L1-D];
> R2=RSI(4);
> Plot(R2,"R2",4,1);
> Plot((Cum(1)>L1-D)*(abs(R1-R2)<0.01),"",7,2+styleThick);
> GraphXSpace=1;
> PlotShapes((Cum(1)==L1-D)*shapeUpTriangle,colorBrightGreen);
>
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS"
<TSOKAKIS@xxxx>
> wrote:
> > Herman,
> > It would be interesting to calculate how many bars we need to
> absorb
> > a 10% distortion of C [absorb means distortion < 1% for example].
> > Unfortunately it also depends on the initial RSI(4) value and the
> > number is not the same for any stock.
> > It may takes 30 or 40 bars sometimes.
> > Dimitris Tsokakis
> > --- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen"
> <psytek@xxxx>
> > wrote:
> > > Thank you DT, for your explanation and demo. Shows that it is
> best
> > to
> > > understand the indicators one is using :-)
> > >
> > > have a great day!
> > > herman.
> > > -----Original Message-----
> > > From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
> > > Sent: January 25, 2004 4:38 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Re: Using Param() to analyze system
price-
> > sensitivity
> > >
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen"
> > <psytek@xxxx>
> > > wrote:
> > > > Hello,
> > > >
> > > > It took TJ's help to get this little gem going, it allows
you
> to
> > > place your
> > > > cursor anywhere on your chart and modify/vary, using the
Param
> > (),
> > > the price
> > > > bar at that position. This is very useful when evaluating
the
> > > response of
> > > > systems and indicators.
> > > >
> > > > Note that the modified price is only available to
subsequent
> > code
> > > in the
> > > > same formula. If you want to test a system you need to
either
> > paste
> > > the code
> > > > ahead of your system's code or copy it into an include
file.
> > Or, if
> > > you need
> > > > the change to apply to many formulas, you could use the
> > > SaveParameter() and
> > > > GetParameter() OSAKA functions I posted some weeks ago to
> > > accomplish that.
> > > >
> > > > In system analysis you may find that in some systems a
small
> > price
> > > change of
> > > > a few cents may make the difference between going Short or
> > Long. In
> > > > Indicator analysis you may find that the effect of a price
> > change
> > > last much
> > > > longer than you thought. For example the code below shows
> that a
> > > price
> > > > change may effect the RSI(4) value as far away 20 bars away.
> > > >
> > > > have fun!
> > > > herman.
> > > >
> > > > CursorBar = SelectedValue(BarIndex()) == BarIndex();
> > > > ParamPrice = SelectedValue(Close) * (1 + 0.01 *Param("Close
%
> > > > Change",0,-10,10,0.1));
> > > > Close = IIf(CursorBar,ParamPrice,Close);
> > > > Plot(C,"Close",1,64);
> > > > Plot(RSI(4),"RSI(3)",1,1|styleOwnScale,0,500);
> > > > StoRSI4 = (RSI(4)-HHV(RSI(4),4))/(HHV(RSI(4),4)-LLV(RSI
(4),4))
> > *100;
> > > > Plot(StoRSI4,"StoRSI4",1,1|styleOwnScale,0,500);
> > > > for(n=0;n<=100;n=n+10) Plot
> > > (n,"",0,1|styleOwnScale|styleNoLabel,0,500);
> > > > GraphXSpace = 50;
> > >
> > > Herman,
> > > The RSI uses EMA.
> > > [see varPER.txt in the Files section]
> > > Due to the recursive EMA character, a step change of C needs
> > > [theoretically] infinite number of bars to be absorbed.
> > > [see http://www.amibroker.com/library/detail.php?id=116 ]
> > > In practical use you see a finite number of bars because of
the
> 2-
> > > digit accuracy of your results.
> > > If RSI was using MA, then the adaption time would be finite.
> > > Try to change by 20% a Close value 50 bars ago for MA
> > >
> > > R1=MA(C,4);Plot(R1,"R1",1,1);
> > > L1=LastValue(Cum(1)); D=50;
> > > Ic=C;
> > > percentage=20/100;
> > > C[L1-D]=(1+percentage)*Ic[L1-D];
> > > R2=MA(C,4);
> > > Plot(R2,"R2",4,1);
> > > The distortion will disappear in 4 bars, no matter if you use
> > > percentage 20% or 50% or 100%.
> > > If you try now
> > >
> > > R1=EMA(C,4);Plot(R1,"R1",1,1);
> > > L1=LastValue(Cum(1)); D=50;
> > > Ic=C;
> > > percentage=20/100;
> > > C[L1-D]=(1+percentage)*Ic[L1-D];
> > > R2=EMA(C,4);
> > > Plot(R2,"R2",4,1);
> > > the distortion will have much longer impact and it changes as
> you
> > > change the percentage.
> > > Dimitris Tsokakis
> > >
> > >
> > >
> > >
> > >
> > > 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
> > >
> > > a.. To visit your group on the web, go to:
> > > 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@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/
|