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

Parabolic twist



PureBytes Links

Trading Reference Links

Hi All

with much fiddling and not knowing what to try next, this 'green in the face
of TS' newbie is hoping you might be able to help solve some code with the
following exit, please.

Concept: Use the 'time delay' of Parabolic, but when its slope reduces then
it transforms somewhat into a trendline, continuing with the steepest slope
it's developed to date. Ultimately looking to exit more into the peak (or
trough), and minutes or days earlier.

The following starting point (ParaStar) is only for the indicator. This
would be changed for a system to where marketposition <> 0. Also, to avoid
non-trending action this code would only be used incojunction with other
stops.

Problems:
#1.  As per the .gif I cannot stop the trendline from plotting between
slope<0 and a new starting point.
#2.  Difficulty in creating the end point for each trendline, which should
be the day that price falls below the projecting trendline points, by a
certain amount. But this point is being worked out from the counter attached
to the crossing of the 'base' parabolic, and not the trendline points.
#3.  In the .gif a 'bump' in the trendline can be seen (in the middle of the
longer uptrend) where the new slope starts, from the the new low point of
the 'base' parabolic. An interesting alternative would be to see the new
trendline slope continue from the apex of the immediately preceding stage of
the trendline, rather than from the 'base' parabolic point. But How?

Anyhelp greatly appreciated.
****************************************
Inputs: AFVal(0.04), AFAdj(0.035), Slip(0);
Vars: Para(0), SL(0), Fin(0), Counter(0), ParaStar(False), ParaFin(False);
Array: Slpe[4](0);

Para = ParabolicCustom(AFVal,AFAdj)[1];
SL = (Para - Para[1]/1);
ParaStar = (Para < L) and (Para[1] > L[1]);
ParaFin = (Para[1] >= L[1]) or (Para[1] > L);

If CurrentBar > 2 then begin

If ParaStar = True then begin
 Slpe[0] = SL;
 Slpe[1] = Para;
 Slpe[2] = Para[1];
 Slpe[3] = BarNumber;
 Slpe[4] = BarNumber[1];
End;

If Parafin <> True then begin
 If SL > Slpe[0] then begin
  Slpe[0] = SL;
  Slpe[1] = Para;
  Slpe[2] = Para[1];
  Slpe[3] = BarNumber;
  Slpe[4] = BarNumber[1];
 End;

 If ParaFin = True then begin
  Fin = BarNumber;
  Slpe[0] = 0;
 End;

 If Slpe[0] > 0 then begin
  Value11 = BarNumber - Slpe[3];
  For Counter = Value11 DownTo Fin Begin
  Value2 = Slpe[1] + ((Value11 - Counter) * Slpe[0]);
   Plot1[Counter](Value2,"ParaTrnd");
   If Value2 crosses above L + Slip points then begin
    Slpe[0] = 0;
   End;
  End;
 End;
End;

Plot2(Iff(CurrentBar >=2,ParabolicCustom(AFVal,AFAdj),Close)[1],"Para");
End;
****************************************

Thanks to Arthur Putt's book where I got onto most of the coding (ideas, at
least, and butchered it I guess).
AND to Chris Cheatham for his ParabolicCustom code. (It was in the 9th July,
Digest No 223).

Jon Macmichael

Attachment: Description: "nfd ParaTrnd.gif"