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

[amibroker] To the grail-less team [2]



PureBytes Links

Trading Reference Links

Select an empty IB window and paste the

 /*HISTORICAL TRENDLINES, v.2.*/
x = Cum(1);per = 3;s1=L;s11=H;
pS = TroughBars( s1, per, 1 ) == 0;
endt=SelectedValue(ValueWhen( pS, x ,1));
startt=SelectedValue(ValueWhen( pS, x ,2));
dtS =endt-startt;
endS = SelectedValue((ValueWhen( pS, s1,1) ));
startS = SelectedValue(( ValueWhen( pS, s1 ,2)));
aS = (endS-startS)/dtS;bS = endS;
trendlineS = aS * ( x -endt ) + bS;//SUPPORT LINE
pR = PeakBars( s11, per, 1 ) == 0;
endt1= SelectedValue(ValueWhen( pR, x, 1));
startt1=SelectedValue(ValueWhen( pR, x, 2 ));
dtR =endt1-startt1;
endR = SelectedValue(ValueWhen( pR, s11, 1 ) );
startR = SelectedValue( ValueWhen( pR, s11, 2 ));
aR = (endR-startR)/dtR;bR = endR;
trendlineR = aR * ( x -endt1 ) + bR;//RESISTANCE LINE 
first=Min(startt,startt1);Last=Max(endt,endt1);
Plot(IIf(x>=first -10 AND x<=Last+10,trendlineS,-
1e10),"Support",colorBrightGreen,1);
Plot(IIf(x>=first-10 AND x<=Last+10,trendlineR,-
1e10),"Resistance",colorRed,1);
Plot(C,"Close",colorBlack,64);

Place your cursor at the last bar and move it slowly to the left.
Your graph will recall, one by one, the trendlines 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/