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

RE: [RT] Re: Triangles- PPS Trading System



PureBytes Links

Trading Reference Links




Hello 
all,
<FONT face=Arial color=#0000ff 
size=2>    Here are few things on triangles that I have. Don't 
know who coded the first one. If anyone does know, please tell so that they may 
receive proper credit. Not sure how well these work, haven't really tested 
them. The strategy doesn't seem to work on EOD data. I think it's 
designed for intraday, but not sure. I only have EOD data and any help 
with this strategy would be appreciated. Hope this 
helps.
<FONT face=Arial color=#0000ff 
size=2>Trey
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>{--Triangle 
Function--}  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);
 <FONT face=Arial color=#0000ff 
size=2>
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 andCondition2 andCondition3 
andCondition4then Triangle = trueelse Triangle = false;
 
{--Triangle 
Indicator--}  input:OccurH1(1),OccurH2(2),OccurL1(1),OccurL2(2),PriceH1(high),PriceH2(high),PriceL1(low),PriceL2(low),StrenH(1),StrenL(1),Len(10);
 
ifTriangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1,PriceH2,PriceL1,PriceL2,StrenH,StrenL,Len)= 
true then plot1(10,"TriFinder")else plot1(0,"TriFinder");
 
ifTriangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1,PriceH2,PriceL1,PriceL2,StrenH,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". Largertriangles can be 
calculated by increasing thestrength and/or HighestBar/LowestBar range 
settings. The indicator plotsa simple "spike" graph, alerting the trader to 
the presence of atriangle. The trader can then apply logicaltrendlines 
to establish break-out points}
 
 {TrendLine Triangle Long/Short Entry Strategy Written by: 
HamFon Contact: <A 
href="">ncrowle@xxxxxxxxxxxxxx Web 
site: <A 
href="">www.hamfon.com/daytrade Date:  07/31/2002, 
first version 
07/31/2002 Version: 1.00 Status:  Gnu Public 
License - this indicator may be used or shared freely 
with    no fee, as long as this original header comment 
is included. Purpose: Generates a Buy or Sell Short order based on 
ascending or descending    triangle formed by 
trendlines.}inputs: Size (5), { Specifies how many bars on each 
side to validate a High or Low } EMALength 
(27), AllowMultipleEntries (false), { blocks new trades if one already 
active } DoLong (true), DoShort (true);variables: loop (0), 
FoundHigh (false), FoundLow (false);array: DateIndex[1, 1] (0); { index 
offsets for [Low,High]; [StartDate, EndDate] }array: DataValue[1, 1] (0); { 
[Low,High]; [StartPrice, EndPrice] }
 
if  CurrentBar > Size then begin FoundHigh = 
true; FoundLow = true; for loop = 1 to Size 
begin  if L[Size] > L[Size + loop] or L[Size] > L[Size - 
loop] then   FoundLow = false;  if H[Size] < 
H[Size + loop] or H[Size] < H[Size - loop] 
then   FoundHigh = false; end; if FoundHigh 
and CurrentBar - Size * 2 > DateIndex[1, 1] then 
begin  DateIndex[1, 0] = DateIndex[1, 
1];  DataValue[1, 0] = DataValue[1, 
1];  DateIndex[1, 1] = CurrentBar - 
Size;  DataValue[1, 1] = H[Size]; end; if 
FoundLow and CurrentBar - Size * 2 > DateIndex[0, 1] then 
begin  DateIndex[0, 0] = DateIndex[0, 
1];  DataValue[0, 0] = DataValue[0, 
1];  DateIndex[0, 1] = CurrentBar - 
Size;  DataValue[0, 1] = L[Size]; end;end;if 
DateIndex[0, 0] > 0 and DateIndex[1, 0] > 0 { make sure we have two 
trendlines } and (AllowMultipleEntries or MarketPosition = 
0) then begin if DoLong  and DataValue[1, 1] 
> DataValue[1, 0] { higher highs }  and DataValue[0, 1] > 
DataValue[0, 0] { higher lows }  and DataValue[1, 1] - 
DataValue[1, 0] < DataValue[0, 1] - DataValue[0, 0] { ascending 
}  and C - DataValue[1, 1] > DataValue[1, 1] - DataValue[1, 
0]  and C > DataValue[1, 1]  and L > XAverage 
(C, EMALength)  { order for long, chronologically: left high, left 
low, right high, right low }  and DateIndex[1, 0] < 
DateIndex[0, 0]  and DateIndex[0, 0] < DateIndex[1, 
1]  and DateIndex[1, 1] < DateIndex[0, 1]  then 
begin  Buy ("TriangleLE") next bar at C or 
higher;  Alert ("Ham Triangle LE"); end; if 
DoShort  and DataValue[1, 1] < DataValue[1, 0] { lower highs 
}  and DataValue[0, 1] < DataValue[0, 0] { lower lows 
}  and DataValue[1, 0] - DataValue[1, 1] > DataValue[0, 0] - 
DataValue[0, 1] { descending }  and DataValue[0, 1] - C > 
DataValue[0, 0] - DataValue[0, 1]  and L < XAverage (C, 
EMALength)  { order for short, chronologically: left low, left 
high, right low, right high }  and DateIndex[0, 0] < 
DateIndex[1, 0]  and DateIndex[1, 0] < DateIndex[0, 
1]  and DateIndex[0, 1] < DateIndex[1, 1]  then 
begin  Sell ("TriangleSE") next bar at C or 
lower;  Alert ("Ham Triangle 
SE"); end;end;

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: tradewynne 
  [mailto:tradewynne@xxxxxxxxx]Sent: Thursday, May 01, 2003 10:01 
  AMTo: realtraders@xxxxxxxxxxxxxxxSubject: [RT] Re: 
  Triangles- PPS Trading SystemTo 
  unsubscribe from this group, send an email 
  to:realtraders-unsubscribe@xxxxxxxxxxxxxxxYour 
  use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx





Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.