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

Re:Van Tharp and system developements



PureBytes Links

Trading Reference Links

This should take care of 10 day Exponential Average of the 3 day ATR.

First create the XAverageV  function from Bob Fulks without it you can't use
anything other than price in an XAverage function. Then create the indicator
XAverageTrueRange. Code Below.

{ *******************************************************************

 Study     : XAverage.V
 
 Last Edit : 11/2/96

 Provided By : Bob Fulks

 Description : This is a recoding of the XAverage function as a 
      "simple function" rather than as a "series function". For
      correct results it must be evaluated on every bar, as is 
      normal for Omega simple functions.

********************************************************************}
inputs : Price(NumericSeries), Length(NumericSimple);
vars   : Factor(0), XLast(0);

if Length + 1 <> 0 
then begin
 if CurrentBar <= 1 
 then begin
  Factor = 2 / (Length + 1);
  XAverage.V = Price;
  XLast = Price;
 end
 else begin
  Value1 = Factor * Price + (1 - Factor) * XLast;
  XAverage.V = Value1;
  XLast = Value1;
 end;
end;





{******************************************************************}
       {XAvgTrueRange}

Inputs:XAvgLen(10), ATRLen(3);

 Plot1(XAverage.V(AvgTrueRange(XAvgLen),ATRLen),"XAvgTR");



"The darkest hour in any man's life is when he sits down to plan
 how to get money without earning it"

Sentinel Trading
rjbiii@xxxxxxxxx
____________________Reply Separator____________________
Subject: Van Tharp and system developements
Author: angus@xxxxxxxxxxxx
Date:  12/10/98 2:30 PM

I just finished reading Van Tharps new book .Trading into financial
freedom.. I recommend it to all.. it is a classic. [ I have no affilation
with him] He had 2 concepts that I was hoping someone could code..

Profit stops & protective stops
10 day exponential of the 3 day average true range  [ if someone can make
it an indicator]

and a stop 
if you get  twice the daily volatilility from yesterdays close exit [if
someone can make it a show me or indicator]

thansk