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

RE: Setting colour on a multi-plot indicator



PureBytes Links

Trading Reference Links

Bill,

The approach is dead on!  Very nice. I didn't get a chance to put the code
into MetaStock this evening to verify, but it looks like in your equity
formula that you want to reference the Fml("_Triple MA Positions") instead
of the _Triple MA Crossovers.  That should fix up your equity line as well
as the results of your explorations.

At this point you run an exploration across the TSE and get the results as
you suggested.  Certainly, your average return tells you how this system
performs over the broad market.  It's nice if it does better on more
securities, but I'm of the opinion that it's very unlikely that a single
system will work well on every market.

>From here, I would sort those results and look at the best performers.  On a
chart of those, I'd plot the equity line that you have programmed.  A
smoothly rising equity line suggests consistent, repeatable performance in
the past which should have predictive value for the future, assuming that
you have a fairly high number of trades that this is based on.

Dave Nadeau
Fort Collins, CO

 -----Original Message-----
From: 	owner-metastock@xxxxxxxxxxxxx [mailto:owner-metastock@xxxxxxxxxxxxx]
On Behalf Of Bill Irwin
Sent:	Monday, December 25, 2000 3:27 PM
To:	metastock@xxxxxxxxxxxxx
Cc:	dave_nadeau@xxxxxxxxx
Subject:	RE: Setting colour on a multi-plot indicator

Well Dave, I've got some of your suggestions working and I can see the power
in building tests on indicators that are based on other indicators.  This is
what I've done so far:

The first indicator is _Triple MA
ShortTime := 25;
MediumTime := 75;
LongTime := 200;
ShortMA := Mov(CLOSE, ShortTime, S);
MediumMA := Mov(CLOSE, MediumTime, S);
LongMA := Mov(CLOSE, LongTime, S);
ShortMA; MediumMA; LongMA;

Next is _Triple MA Crossovers:
Sma := FmlVar("_Triple MA","ShortMA");
Mma := FmlVar("_Triple MA","MediumMA");
Lma := FmlVar("_Triple MA","LongMA");
LongSignal := Cross(Sma, Mma) AND Lma > Mma;
ShortSignal := Cross(Mma, Sma) AND Lma < Mma;

Then comes  _Triple MA Positions:
BuyLong := FmlVar("_Triple MA Crossovers", "LongSignal");
SellShort := FmlVar("_Triple MA Crossovers", "ShortSignal");
If(
	BarsSince(Ref(BuyLong,-1)) <= BarsSince(Ref(SellShort,-1)), +1,
	If(
		BarsSince(Ref(SellShort,-1)) <= BarsSince(Ref(BuyLong,-1)),
		-1,0)
);

And lastly, _Triple MA Equity:
Cum(
    If(Fml("_Triple MA Crossovers")=1,
        OPEN-Ref(OPEN,-1),
        If(Fml("_Triple MA Crossovers")=-1,
            -1*OPEN-Ref(OPEN,-1),0
        )
    )
)

I've plotted the _Triple MA and set the 3 colours and saved that as a
template.  Plotting the Positions indicator produces a horizontal line at 1
when I'm long, -1 when short and zero when out.  That's as I think it should
be.

The Equity indicator, when applied to the price bars, produces a stepping
pattern that's horizontal until it steps vertically up or down to another
location, then horizontal again.  This doesn't seem right to me.

The Exploration:
ColA: FmlVar("_Triple MA","ShortMA")
ColB: FmlVar("_Triple MA","MediumMA")
ColC: FmlVar("_Triple MA","LongMA")
ColD: ((HHV(C,250)-LLV(C,250))/LLV(C,250))*100
ColE: Fml("_Triple MA Equity")
Filter: 	colD > 100 AND
		colD < 300 AND
		CLOSE > 5.00
Running this Exploration on the TSE produces a report where ColE ranges
from -1331.80 to 17.95.  Does this mean that, using this Triple MA
indicator, and buying/selling when the crossovers hit, the best stock earned
$17.95 over the history (5 years) and the worst stock lost $1,331.80?

> -----Original Message-----
> From: owner-metastock@xxxxxxxxxxxxx
> [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Dave Nadeau
> Sent: Thursday, December 21, 2000 7:00 AM
> To: metastock@xxxxxxxxxxxxx
> Subject: RE: Setting colour on a multi-plot indicator
>
> Now, you can create an Exploration with INDICATOR4 as one of
> the columns and quickly see the equity performance across your
> portfolio of stocks.  Then, you can change "Length:=17;" to
> 18 or 20 in INDICATOR1, and run the exploration again to get
> the results
> for that value.  You can repeat this for as many values as
> you like.  (I copy the exploration results into Excel to do
> my summary
> statistics).

Am I on the right track here?  Thanks again Dave.

Bill


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com