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

Re: Code for Triangles



PureBytes Links

Trading Reference Links

Hi all,

I posted that code about a zillion years ago. :)

Here is another version that paints the bar instead:

 Input:
> OccurH1(1),OccurH2(2),OccurL1(1),OccurL2(2),PriceH1(High),PriceH2(High),PriceL
> 1(Low),PriceL2(Low), StrenH(1),StrenL(1),Len(10);
> 
IF
Triangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1,PriceH2,PriceL1,PriceL2,
StrenH,StrenL,Len) = True then begin

	Plot1(H,"");
	Plot2(L,"");
	If CheckAlert then Alert = true;

End;

The code is handy in identifying triangles that might not be obvious to
the
naked eye. Calls wedges and pennants too. Does miss triangles sometimes
if the
set-up isn't quite right. While i haven't gotten around to doing it yet,
a 
"fuzzy" version could be created that would be more flexible. I also
noticed 
that the function "triangles" which this indicator calls is not listed.
If
anyone needs it, let me know. I will re-post it to the forum.

Combining this with the code that the fellow from Technical Trends
posted, 
might give a pretty decent indicator that also plots the trend lines.

regards,
Walt Downs
CIS Trading 
http://cistrader.com





> 
> In a message dated 9/30/98 7:00:10 AM Central Daylight Time,
> support@xxxxxxxxxxxxxxxxxxx wrote:
> 
> > Here is EL code for detecting triangles. I wrote it today and used it to
> >  scan 150 stocks which I track. The code could be improved a lot. But
> >  here it is.
> I can't remember who sent this indicator, maybe the CODE.  It gives a heads up
> at times when you might be thinking of something else.
> 
> {Indicator calculates triangles based on SwingHighs and lows of a 10 day
> range, and
> with a swing strength of "1". Larger triangles can be calculated by increasing
> the
> strength and/or HighestBar/LowestBar range settings.}
> 
> Input:
> OccurH1(1),OccurH2(2),OccurL1(1),OccurL2(2),PriceH1(High),PriceH2(High),PriceL
> 1(Low),
> PriceL2(Low), StrenH(1),StrenL(1),Len(10);
> 
> IF
> Triangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1,PriceH2,PriceL1,PriceL2,
> StrenH,StrenL,Len) = True THEN Plot1(10,"TriFinder")
> Else Plot1(0,"TriFinder");
> 
> IF
> Triangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1,PriceH2,PriceL1,PriceL2,
> StrenH,StrenL,Len) = True THEN Alert = True;