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

Triangle Indicator



PureBytes Links

Trading Reference Links

Found this on the list and it doesn't seem to work.  Any ideas?  Is it even 
worth messing with!
Thanks.

Vince

Triangle pattern indicator
Origin: omega-list
Written by: Walt Downs
Date found: 1 dec 97
------------------------------------------------------------------------------
--
{**************************************************************
Triangle Function code starts Here....Function Name: Triangle
**************************************************************}

input:
OccurH1(numericsimple),OccurH2(numericsimple),OccurL1(numericsimple),
 OccurL2(numericsimple),PriceH1(numericseries),PriceH2(numericseries),
 PriceL1(numericseries),PriceL2(numericseries),StrenH(numericsimple),
 StrenL(numericsimple),Len(numericsimple);

value1 = SwingHighBar(OccurH1,PriceH1,StrenH,Len);
value2 = SwingHighBar(OccurH2,PriceH2,StrenH,Len);
value3 = SwingLowBar(OccurL1,PriceL1,StrenL,Len);
value4 = SwingLowBar(OccurL2,PriceL2,StrenL,Len);


Condition1 = high of value2 bars ago > high of value1 bars ago;
Condition2 =  low of value4 bars ago < low of value3 bars ago;
Condition3 = HighestBar(H,Len) = value2;
Condition4 = LowestBar(low,Len) = value4;

if 
Condition1 and
Condition2 and
Condition3 and
Condition4
then Triangle = true
else Triangle = false;

********************************************************************
Triangle Indicator Code starts here........Indicator Name: Triangle
********************************************************************

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,Stren
H,StrenL,Len)
= true then plot1(10,"TriFinder")
else plot1(0,"TriFinder");

if
Triangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1,PriceH2,PriceL1,PriceL2,Stren
H,StrenL,Len)
= true then Alert = true;

{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. The indicator plots
a simple "spike" graph, alerting the trader to the presence of a
triangle. The trader can then apply logical
trendlines to establish break-out points}
------------------------------------------------------------------------------
--