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

RE: Passing of variables from indicator to signal



PureBytes Links

Trading Reference Links

In TS 4.0 and 2000i, you can draw trendlines directly from custom functions.
So if you don't mind plotting your MA as a row of trendlines (not very
convenient, I know), you can write a function for your MA that also plots
the MA.  Then you can call the function from the signal, plotting the MA in
the process, and will not need to plot the indicator separately as an
"indicator".  For example:

	Function MA

	Inputs: Price(Numericseries), Length(Numeric);
	MA=Average(Price, Length);
	y=TL_New(Date, 0, MA, Date[1], 0, MA[1]);


Hope this helps,

Ivo



> -----Original Message-----
> From: Jack Griffin [mailto:jack_2231@xxxxxxxxx]
> Sent: Sunday, January 28, 2001 7:05 PM
> To: omega-list@xxxxxxxxxx
> Subject: Passing of variables from indicator to signal
>
>
> Hi gang,
>
> I have a signal which uses a moving average whose
> length I optimize.  What is the best way to plot this
> optimized moving average without having to type in
> final length after each optimization?  Since
> indicators and
> signals are different functions it seems I need to
> pass the value of the optimized variable to the
> moving average indicator.  Is there a way to
> pass information from an indicator to a signal?
> Are there global variables?
>
> A while back someone asked a similar question.  My
> answer and potential solution is to use the number of
> shares of my position as the variable, since it is
> modifyable and I think everything can read it.  Are
> there any other ways?
>
> Jack
>
>
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
>