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

Re: [amibroker] AFL for Trend Line Touch and Breakouts Available Anywhere?



PureBytes Links

Trading Reference Links




Tom,
 
Load this same formula in AA  , n last 
quotations and n=1 , and click explore, also load this formula in Indicator 
builder to see the visual presentation.
 
This was presented by Dimitri...
 

/*TRENDLINES BREAKOUT*/
MaxGraph=8;
Graph0 = C;
Graph0Style=64<FONT 
size=2>;
x = Cum<FONT 
size=2>(1);
per = 3;
s1=L;s11=H;
pS = TroughBars( s1, 
per, 1 ) == 
0;
endt= LastValue<FONT 
size=2>(ValueWhen( pS, x, 
1 ));
startt=LastValue<FONT 
size=2>(ValueWhen( pS, x, 
2 ));
endS = LastValue<FONT 
size=2>(ValueWhen( pS, s1, 
1 ) );
startS = LastValue( 
ValueWhen( pS, s1, 
2 ));
dtS =endt-startt;
aS = (endS-startS)/dtS;
bS = endS;
trendlineS = aS * ( x -endt ) + bS; 
Graph1 = IIf<FONT 
size=2>(x>startt-10<FONT 
size=2>,trendlineS,-1e10<FONT 
size=2>);
Graph1Style = 1<FONT 
size=2>;
Graph1Color = 8<FONT 
size=2>;
PR = PeakBars( s11, 
per, 1 ) == 
0;
endt1= LastValue<FONT 
size=2>(ValueWhen( pR, x, 
1 ));
startt1=LastValue<FONT 
size=2>(ValueWhen( pR, x, 
2 ));
endR = LastValue<FONT 
size=2>(ValueWhen( pR, 
s11, 1 ) );
startR = LastValue( 
ValueWhen( pR, s11, 
2 ));
DTR=ENDT1-STARTT1;
aR = (endR-startR)/dtR;
bR = endR;
trendlineR = aR * ( x -endt1 ) + bR; 
Graph2 = IIf<FONT 
size=2>(x>startT1-10<FONT 
size=2>,trendlineR,-1e10<FONT 
size=2>);
Graph2Style = 1<FONT 
size=2>;
Graph2Color = 8<FONT 
size=2>;

Filter=(Cross<FONT 
size=2>(C,trendlineR) AND X>ENDT1) OR (<FONT color=#0000ff 
size=2>Cross(trendlineS,C) AND X>ENDT);

NumColumns=2<FONT 
size=2>;
Column0=Cross<FONT 
size=2>(C,trendlineR);
Column1=Cross<FONT 
size=2>(trendlineS,C);
Column0Name="BULLISH 
BREAKOUT";
Column1Name="BEARISH 
BREAKOUT";
Graph0BarColor=IIf<FONT 
size=2>(Filter,7<FONT 
size=2>,1);
Title=Name<FONT 
size=2>()+" " 
+WriteVal<FONT 
size=2>(dts,format=1<FONT 
size=2>)+" Bars"<FONT 
size=2>;
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Clarkson, 
  Tom 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Friday, July 11, 2003 2:16 PM
  Subject: [amibroker] AFL for Trend Line 
  Touch and Breakouts Available Anywhere?
  
  Has anyone 
  developed any afl code that finds trend breakouts in a similar way to what 
  this program <A 
  href="">(http://www.nebadawn.com/ramphome.htm) 
  finds? I don't find anything similar in the library but then again i could be 
  missing something somewhere.
   
  <A 
  href="">http://www.nebadawn.com/ramphome.htm
   
  Thanks in advance 
  for any help.
  <FONT face=Arial 
  size=2> 
  <FONT face=Arial 
  size=2>Tom
  <FONT face=Arial 
  size=2> 
  Some examples from 
  that web site are:
  <FONT face=Arial 
  size=2> 
  
  <IMG 
  height=101 src="gif00396.gif" width=272 border=0>  
                
     <IMG height=94 src="gif00397.gif" 
  width=211 border=0>  
   
  <IMG height=134 
  src="gif00398.gif" width=270 
  border=0>                    
  <IMG height=140 src="gif00399.gif" width=210 
  border=0>
   
  <IMG height=141 
  src="gif00400.gif" width=215 
  border=0>    
  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 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
  
<BLOCKQUOTE 
><FONT 
  face="Courier New">---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).Version: 6.0.498 
  / Virus Database: 297 - Release Date: 7/8/2003






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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


Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: "Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service."

Attachment: Description: ""