PureBytes Links
Trading Reference Links
|
Bill,
Sorry for the delayed response. I've been away on travel, and came home mid
week to a pile of stuff to catch up on...
Regarding the $25 question, yes, that's exactly right. You have a $25
profit per share over the period tested.
Regarding what I mean by a "high number." For my results, I like something
like 40 or so trades. That's fairly arbitrary, but well into the total
amount for my results to be "statistically significant". And this is closed
trades per market or security. So, across a portfolio, I'm looking at a
"bunch" of trades.
To refine any of my systems, what I'm going to do with the results of any
single System Test is to export the trade by trade results into Excel and
look at MAE or Maximum Adverse Excursion while the system runs without
stops. Group the MAE's by winners and losers, with my thought being that
I'd set a stop at some level (preferring to use percentages rather than
whole dollar amounts here) of MAE where the probability of recovering to a
profitable trade becomes too low--again a subjective call based on my
trading preferences. This is another reason why I like a higher number of
closed trades in my System Test.
I have to be somewhere (to help move furniture...ugh!) so I'll finish the
Exits portion later. I'd like to work with your code some more when I have
a bit more time later today. Thanks for all of your detail and sharing your
code with us!
Dave Nadeau
Fort Collins, CO
-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx
[mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Bill Irwin
Sent: Friday, January 12, 2001 1:05 PM
To: metastock@xxxxxxxxxxxxxxxxxx
Subject: RE: Setting colour on a multi-plot indicator
Dave:
I've been wrestling with this System trying to improve it, amid all the
other demands on my time during the holidays. See below:
> -----Original Message-----
> From: owner-metastock@xxxxxxxxxxxxx
> [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Dave Nadeau
> Sent: Monday, December 25, 2000 9:57 PM
> To: metastock@xxxxxxxxxxxxx
> Subject: RE: Setting colour on a multi-plot indicator
>
> 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.
When an Exploration's Equity column shows +25 I think that means that the
trades gained $25/share over the run. Is this correct?
> 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.
How many is a "high number"?
What this system needs now is an exit signal for both long and short
positions that should be terminated. The Positions indicator is always in
either a long or short position once the crossover occurs that is the
opposite of the first crossover (it misses the first opportunity). We need
to recognize that a signal may be false because the trend doesn't continue
long enough for all the MAs to cross over so that the opposite signal can be
generated. In other words, some times after a long signal, the price trends
down before the Medium MA has crossed above the Long MA. Hence a short
signal isn't generated and the position stays long all the way through the
slide and up through (what should be) the next long position. The closest
I've been able to come follows:
_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;
FalseLong := BarsSince(LongSignal) <=
BarsSince(ShortSignal) AND
Sma < Mma;
FalseShort := BarsSince(ShortSignal) <=
BarsSince(LongSignal) AND
Sma > Mma;
_Triple MA Positions
BuyLong := FmlVar("_Triple MA Crossovers", "LongSignal");
SellShort := FmlVar("_Triple MA Crossovers", "ShortSignal");
ExitLong := FmlVar("_Triple MA Crossovers", "FalseLong");
ExitShort := FmlVar("_Triple MA Crossovers", "FalseShort");
If(BarsSince(Ref(BuyLong,-1)) <= BarsSince(Ref(SellShort,-1)) AND
(ExitLong = 0 OR
BarsSince(BuyLong) <= BarsSince(ExitLong)), +1,
If(BarsSince(Ref(SellShort,-1)) <= BarsSince(Ref(BuyLong,-1)) AND
(ExitShort = 0 OR
BarsSince(SellShort) <= BarsSince(ExitShort)), -1,0
)
);
The Positions indicator misses several Long and Short triggers early in the
graph. I haven't figgered out why yet but I suspect my efforts at defining
an early exit are preventing positions to be taken. I need a way to set a
variable when a position has been entered that can be referenced when
deciding if an exit should be done. The exit indicator shouldn't turn on
unless the condition exists AND we're currently in the position that the
exit is trying to get us out of. More study needed here...
I'm having difficulty identifying a position that's been exited while the
condition to enter the position is still true. In other words, After a Long
position is entered and the ShortMA drops back below the MediumMA, the
FalseLong indicator fires to exit the position. Then, if the Short pops
back above the Medium, a Long position is taken again. I need to smooth out
the short, temporary conditions that trigger an entry.
Any ideas would be greatly appreciated.
Bill
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|