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

Old Indicators from days gone bye



PureBytes Links

Trading Reference Links

>Resent-Date: Sat, 27 Mar 1999 17:15:16 -0800
>X-Sender: robert.cummings@xxxxxxxxxxxxxxxxxx
>X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
>Date: Sat, 27 Mar 1999 19:14:50 -0600
>To: Omega-list@xxxxxxxxxx
>From: Robert W Cummings <robert.cummings@xxxxxxxxxxxxxxxx>
>Subject: Old Indicators from days gone bye
>Resent-From: omega-list@xxxxxxxxxx
>X-Mailing-List: <omega-list@xxxxxxxxxx> archive/latest/33406
>X-Loop: omega-list@xxxxxxxxxx
>Resent-Sender: omega-list-request@xxxxxxxxxx
>
>
>That Zig Zag indicator helped Hank and it was just here and not being used.
>I thought it might be helpful to give away other indicators I've pickup on
>this list over the past year. I'm not much as EL programer but anytime
>somebody puts something on the list I downloaded it for the day I might
>know more and can use it. Not a lot I can contribute to this list other
>than trading experience so maybe this will help me feel better about that.
 Good time to do this on a Saturday night.
My friend Mark gave this one.
>
>Robert
>Resent-Date: Sun, 15 Mar 1998 20:20:12 -0800
From: mgj@xxxxxxxxxxxx
Date: Sun, 15 Mar 1998 20:09:00 -0800 (PST)
Subject: Series and Simple Functions
To: omega-list@xxxxxxxxxx
X-Mailer: SPRY Mail Version: 04.00.06.17
Resent-From: omega-list@xxxxxxxxxx
X-Mailing-List: <omega-list@xxxxxxxxxx> archive/latest/15851
X-Loop: omega-list@xxxxxxxxxx
Resent-Sender: omega-list-request@xxxxxxxxxx

>>Does anyone have a real live _example_ of code where the series/ simple
distinction makes a difference? (Maybe of code with a simple function
that is _not_ evaluated on every bar?)<<

Try this...
-----------------------------
User function:  My_Simple_MA
Properties: simple

var: avg(0) ;
avg = ( C + avg ) / 2 ;
My_simple_MA = avg ;
---------------------------
User function:  My_Series_MA
Properties: series

var: avg(0) ;
avg = ( C + avg ) / 2 ;
My_series_MA = avg ;
---------------------------
Indicator:  Compare_MA

if mod(currentbar,2) = 0 then begin

	value1 = My_Simple_MA ;
	value2 = My_Series_MA ;
	end;

plot1( value1 , "" ) ;
plot2( value2 , "" ) ;
---------------------------

The indicator executes the BEGIN block on every other bar.  Consequently, 
My_Simple_MA is evaluated on every other bar. In contrast, My_Series_MA is 
evaluated on every bar regardless of its location within the begin block.

When the indicator is plotted over the time series (set scale to "price"), we 
see both moving averages in a staircase action because the value1 and value2 
are updated on every other bar.  In addition, the two lines are different,
with 
My_Series_MA  closer to the original data than My_Simple_MA.  This is because 
the former is being updated twice as often as the latter.

- MArk Jurik