PureBytes Links
Trading Reference Links
|
Phsst,
Instead of coeff you may think in ROC terms.
Let us calculate the necessary ROC for a Support or a Resistance
breakout.
We have an advantage here : Trendlines are already defined and their
next bar value is known [if of course the line will be the same...]
as nextS or nextR, with its x just replaced by x+1.
Explore the database for the n=1 last quotations
/*Breakout ROC*/
x = Cum(1);per = 3;s1=L;s11=H;
pS = TroughBars( s1, per, 1 ) == 0;
endt=LastValue(ValueWhen( pS, x ,1));
startt=LastValue(ValueWhen( pS, x ,2));
dtS =endt-startt;
endS = LastValue((ValueWhen( pS, s1,1) ));
startS = LastValue(( ValueWhen( pS, s1 ,2)));
aS = (endS-startS)/dtS;bS = endS;
trendlineS = aS * ( x -endt ) + bS;
nextS=aS * ( x+1 -endt ) + bS;
pR = PeakBars( s11, per, 1 ) == 0;
endt1= LastValue(ValueWhen( pR, x, 1));
startt1=LastValue(ValueWhen( pR, x, 2 ));
dtR =endt1-startt1;
endR = LastValue(ValueWhen( pR, s11, 1 ) );
startR = LastValue( ValueWhen( pR, s11, 2 ));
aR = (endR-startR)/dtR;bR = endR;
trendlineR = aR * ( x -endt1 ) + bR;
nextR=aR * ( x+1 -endt1 ) + bR;
SupRoc=100*(-1+nextS/C);
ResRoc=100*(-1+nextR/C);
TouchThreshold=1;// clibrate the touch %
Filter=C>=nextS AND C<=nextR;
AddColumn(C,"C");
AddColumn(nextR,"nextR");
AddColumn(ResRoc,"Resistance Breakout % >=");
AddColumn(ResRoc<=TouchThreshold,"Resistance touch",1.0);
AddColumn(nextS,"nextS");
AddColumn(SupRoc,"Support Breakout % <=");
AddColumn(SupRoc>=-TouchThreshold,"Support touch",1.0);
Note 1. I search only for stocks between the Support and the
Resistance line .
Note 2. The crucial hypothesis is that the trendlines will remain the
same until tomorrow.
Note 3.TouchThreshold=1 means your Close is closer than 1% to next
bar Support or Resistance .
I hope it will help the research.
On the other side, the
http://groups.yahoo.com/group/amibroker/message/50662
will give you the opportunity to recall recent trendlines formations
and see what was correct and what was wrong for the decisions of the
past.
Dimitris Tsokakis
------------------------ 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
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|