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

RE: [Metastockusers] 8.0 System tester



PureBytes Links

Trading Reference Links

Roy,  

I stand corrected.  You can click on the symbol at the end of the price
line and an inter box will come up (I couldn't check that before because
I don't have MS 8.0 on both of my machines yet which are at two
different locations).  Thus, you do get more space that way than if you
just start typing on that line.

After playing around with it for a while, I was able to figure out how
to get both stops and limits to work (the software help files and manual
seem to be lacking in this particular area.  I got the idea for the
solution from something I read on Simulation.CurrentPositionValue which
has nothing really to do with normal stop and limit orders).  

The key is that in the regular system tester box, you normally don't use
"IF" functions.  Thus, if you want to close if a price falls below a
moving average you write:

Close < mov(close,20,s)

However, in the "price box" you have to use "IF" statements to tell it
which price you want to use as a stop. Thus, you would write:

If(Close < mov(close,20,s), mov(close,20,s),-1000)

{I picked the -1000 because the close could never be below -1000 thus
you would never trigger the price - for shorts, you would reverse this
to some price your security would never hit like 1000000 - this may or
may not be necessary but it was working.) 

Also, the reason you saw them cutting and pasting is that you have to
put all the same information in the top box and then copy it to the
price box, redefining your variables and putting in the "IF" statements.

Finally, I checked the stop-limit button since I had both stops and
limits.

This is what the final code looks like for the close out of the longs
that I described before:

In the Top Box (normal box you see in pre 8.0 versions):

OBBT :=BBandTop(CLOSE,20,S,2);
OBBB :=BBandBot(CLOSE,20,S,2);
IBBT :=BBandTop(CLOSE,20,S,1);
IBBB :=BBandBot(CLOSE,20,S,1);

LongS := ValueWhen(1,Cross(Close,OBBB), LLV(Low,2));
ShortS := ValueWhen(1,Cross(OBBT,Close), HHV(High,2));

High > IBBT
OR  
Low <  LongS

{not all variables are used here - some are for the short stop not
shown)
______________________________________

In the new bottom "price" box:

OBBT :=BBandTop(CLOSE,20,S,2);
OBBB :=BBandBot(CLOSE,20,S,2);
IBBT :=BBandTop(CLOSE,20,S,1);
IBBB :=BBandBot(CLOSE,20,S,1);

LongS := ValueWhen(1,Cross(Close,OBBB), LLV(Low,2));
ShortS := ValueWhen(1,Cross(OBBT,Close), HHV(High,2));

If(High > IBBT,IBBT,  
If(Low <  LongS,LongS,100000000))

------------------------------

I still haven't heard back from tech support but I suspect they'll come
back with something similar to this.

Thanks for you help on this, Roy.

Good Trading,

Joe J.




-----Original Message-----
From:	Roy Larsen
Sent:	Fri 11/1/2002 5:46 PM
To:	Metastockusers@xxxxxxxxxxxxxxx
Cc:	
Subject:	Re: [Metastockusers] 8.0 System tester

Joe

I saw about 10 lines of code pasted in. The "funny" symbols I saw
indicated
the end of each line. The pasting process never caused an error, which
it
does in older versions when the space is full. Sorry I can't check again
for
you.

Surely there must be someone out there who's used price code in the box
and
can confirm one way or the other.

Roy

I'm sure you can do the cut and paste routine but you are limited to how
much you can paste.  If you have a simple line of code that says:

High > Mov(c,20,E)

That will fit nicely.  However if you want to get a bit more detailed
and do something that requires a longer string or add "AND" and "OR", I
think you are out of luck.

I'll play with it a bit more and post back on how much you can cut and
paste a bit later on.

Thanks,

Joe J.

-----Original Message-----
From: Roy Larsen [mailto:rlarsen@xxxxxxxxxxxxxx]
Sent: Friday, November 01, 2002 4:19 PM
To: Metastockusers@xxxxxxxxxxxxxxx
Subject: Re: [Metastockusers] 8.0 System tester


Joe

My understanding was that you could create your stop using the indicator
builder then copy (mark and Ctrl+C) and paste (mark and Ctrl+V) into the
line available. That's the way I saw it being used though I didn't get
to
check the results to confirm that the code worked as expected. Then
again I
wasn't convinced that the equity curve matched earlier versions anyway.

> As for Trade Equity, thanks for the suggestion.  I've read good things
about it.  I trade both sides of the market and need to see both shorts
and longs, though.

A dll that I've been given helps overcome some aspects of the 20
variable
limit and it should be possible to combine long and short trades in the
same
indicator. One of the difficulties to overcome with conventional code is
the
fact that using both binary and price entries and exits demands 8
variables
before even starting to track trades and equity.

If there's any developments with TE as regards tracking both sides of
the
market in one indicator I'll post to the group. It may be time to take
the
project out of the too-hard basket though I doubt if anyone would use it
once working anyway.

Roy



I'll wait to hear back from Equis but if all else fails, I have been
thinking more about Excel since the post this morning.  You actually
don't need to know the formulas in Excel because you can build
everything in MS and cut and paste it over (I don't have to test a large
number of securities - only a handful).  Then you are down to just
referencing the boxes for longs, shorts, profit targets and stops.

The way I go about testing systems is first I find a concept that works.
Thus, in my example from earlier, I was testing the idea of the 1 and 2
std. dev. Bollinger Band system (that comes with MS) to first see if it
generated any useful signals with some x% stop.  If it can't at least do
that, I look no further.  If it does, I then look at all the losers to
see if there is something that can be detected from them that doesn't
also filter out all the good trades.  That is when I'll usually
introduce other indicators.  If anything useful comes of that, the last
thing I do is see if market based stops will improve the system (meaning
something based on concepts such as a recent low, ATR(), etc. - I don't
like fixed percentage stops).  It is this last part that I was working
on when I ran into the problem (the other parts are handled very nicely
by the new system tester).

Oh, and if all that works, I test the same system on other data not used
to build this system to make sure I haven't just been optimizing the
system (there are times when this has happened and the whole thing gets
tossed - no pride lost).  Every once in a while one sticks and I'll
trade it.

Good Trading,
Joe J.



-----Original Message-----
From: Roy Larsen [mailto:rlarsen@xxxxxxxxxxxxxx]
Sent: Friday, November 01, 2002 12:03 PM
To: Metastockusers@xxxxxxxxxxxxxxx
Subject: Re: [Metastockusers] 8.0 System tester


Joe

I gained the impression that you could paste much more code into the
small
box than is indicated by the box size. Admittedly I didn't see a scroll
bar
but I seem to recall seeing a funny symbol indicating each end-of-line.

If you're looking for a drop-down equity curve why don't you check out
'Trade Equity'. It probably won't do everything you want as it doesn't
accommodate leveraging or combine long and short trades at this stage.
The
current user guide containing most formulas can be found in the files
section of this forum.

Roy


----- Original Message -----
From: "Joe J." <jojab@xxxxxxxxx>
To: <DEFANGED_Metastockusers@xxxxxxxxxxxxxxx>
Sent: Saturday, November 02, 2002 7:29 AM
Subject: RE: [Metastockusers] 8.0 System tester


Well, we are mostly traders and not programmers!  If anyone has been
following along with eSignal's advanced chart development and system
tester on their Yahoo list, I think they have the right idea.  Their
programmers are listening to what the traders want (they are both on the
email list) and making refinements as they go along.  They constantly
post new builds in beta to try out.  I think they have a ways to go but
they are making strides.

I know there are Amibroker users on this list, does it allow you to
write formulas for both intrabar targets and stops at the same time?
Just curious.

Joe J.

-----Original Message-----
From: Lionel Issen [mailto:lissen@xxxxxxxxxxxxxx]
Sent: Friday, November 01, 2002 10:59 AM
To: Metastockusers@xxxxxxxxxxxxxxx
Subject: RE: [Metastockusers] 8.0 System tester


The point has been made before that the Metastock programmers are not
traders.

Lionel





-----Original Message-----
From: Joe J. [mailto:jojab@xxxxxxxxx]
Sent: Friday, November 01, 2002 11:32 AM
To: Metastockusers@xxxxxxxxxxxxxxx
Cc: equismetastock@xxxxxxxxxxxxxxx
Subject: [Metastockusers] 8.0 System tester



While I think Equis has done a good job improving their system tester in
8.0, last night I discovered what might be a limitation that I wouldn't
have expected.

Here is a copy of an email that I just sent to Tech Support, I'll keep
the group updated:

I was testing one of your standard Equis systems - the Bolliger Band
("BB") one. As you may recall, the idea is that you would plot two BB's,
one would be 2 std. dev. and one at 1 std. dev. You wait for a close
(for longs) below the 2 std. BB and then back inside it to enter the
trade (i.e., using the cross function). The suggestion then is to exit
the trade with profits when the price crosses the upper 1 std. dev.
band. Simple enough.

I wanted to take advantage of the ability to exit intrabar. Thus, I
wrote a condition to exit when High is greater than the upper 1 std.
band. I checked the "limit" button and entered the formula for the 1
std. band. All went well. The exits worked fine.

Then, I wanted to add stops. I wanted to tell it to exit if the low for
any bar was lower than the entry bar (i.e., the bar the condition for
the entry was made on - the cross bar). This was simple enough to write.
All I had to do was use a ValueWhen() function with the last time the
cross() condition was met and tell it if the low was lower to exit.

When I did this, the exit did not work. Puzzled, I went back and
unchecked the "limit" order box and changed it back to market. Now the
exit stop worked but even though the formula section still told it to
exit at a profit target when the high exceeded the upper 1 std. BB, it
did not (I figured it would exit at the close of the bar for which that
condition was true instead of intrabar since I didn't have the limit
button selected - but it didn't).

I tried one other thing and that was to put both conditions in the
"limit" box. I discovered 3 things:

1. The box is very limited, you can only write a small section of code
due to space.

2. You can not reference defined formulas that you wrote above in the
regular section (i.e., I wrote a formula called IBBT := for the 1 std
dev. upper BB so I wouldn't have to keep writing the formula out)

3. You can not put both statements in the box (i.e, a different stop and
a limit).

I think these issues should be addressed in the future.

Clearly the formulas are okay because I can get both to work
independently but not at the same time.

My questions for you are this:

When building and testing the system tester for 8.0, did you contemplate
users being able to enter both formula based limit orders for profit
targets and formula based stops at the same time to exit the position?
This is probably a very common things for a lot of traders.

I don't want to use percentage stops in my example above because I want
to adapt the system to current market conditions (i.e., using nearby
lows to judge stops) and also use the current market conditions to take
profits (i.e., the 1 std. dev BB).

If I am missing something, please let me know. I've tried several other
formulas to replace the ValueWhen/Cross/Low combination mentioned above
(still using the ValueWhen to tell me when the cross occurred but other
things that involved ATR() to set the stop levels - these didn't work
either).

Thanks in advance,

Joe J.











To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
< http://docs.yahoo.com/info/terms/> .


Yahoo! Groups Sponsor

ADVERTISEMENT

<
http://rd.yahoo.com/M=219695.2310151.3725769.1980433/D=egroupweb/S=1705
001779:HM/A=1226184/R=0/*
http://ad.doubleclick.net/jump/N879.ameritrade.
yahoo/B1054521.11;sz=300x250;adc=ZHS;ord=1036173540?>

<
http://us.adserver.yahoo.com/l?M=219695.2310151.3725769.1980433/D=egrou
pmail/S=:HM/A=1226184/rand=484938812>

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
< http://docs.yahoo.com/info/terms/> .







Yahoo! Groups Sponsor

ADVERTISEMENT

<
http://rd.yahoo.com/M=219695.2310151.3725769.1980433/D=egroupweb/S=1705
001779:HM/A=1226184/R=0/*
http://ad.doubleclick.net/jump/N879.ameritrade.
yahoo/B1054521.11;sz=300x250;adc=ZHS;ord=1036177402?>

<
http://us.adserver.yahoo.com/l?M=219695.2310151.3725769.1980433/D=egrou
pmail/S=:HM/A=1226184/rand=453450280>

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
< http://docs.yahoo.com/info/terms/> .







Yahoo! Groups Sponsor

ADVERTISEMENT

<http://rd.yahoo.com/M=219695.2310151.3725769.1980433/D=egroupweb/S=1705
001779:HM/A=1226184/R=0/*http://ad.doubleclick.net/jump/N879.ameritrade.
yahoo/B1054521.11;sz=300x250;adc=ZHS;ord=1036192733?>

<http://us.adserver.yahoo.com/l?M=219695.2310151.3725769.1980433/D=egrou
pmail/S=:HM/A=1226184/rand=286732939>

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .







Yahoo! Groups Sponsor	 
ADVERTISEMENT
 
<http://rd.yahoo.com/M=219695.2310151.3725769.1980433/D=egroupweb/S=1705
001779:HM/A=1226184/R=0/*http://ad.doubleclick.net/jump/N879.ameritrade.
yahoo/B1054521.11;sz=300x250;adc=ZHS;ord=1036198012?> 	
 
<http://us.adserver.yahoo.com/l?M=219695.2310151.3725769.1980433/D=egrou
pmail/S=:HM/A=1226184/rand=774524086> 	

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sell a Home with Ease!
http://us.click.yahoo.com/SrPZMC/kTmEAA/jd3IAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Attachment: Description: "winmail.dat"