PureBytes Links
Trading Reference Links
|
------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.
To reply: http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5742
------------------------------------------------------------------------
Russ,
Let me add a little to what Roy has already answered.
Usually when there is an error, Metastock will let you know the type
of error and highlight where the error was found in the code with a
blinking cursor. From what you have posted, I can give you a couple
of things to look for. First is the use of quotes, colons, and
semicolons.
Quotes...metastock doesn't like them and they are not needed
Colons...make sure they occur right after the variable name-no space
Semicolons...always at the end
So you will need the following:
BuyPrice:= Close;
SellTrig1:= If(Close < (BuyPrice*.90),1,0);
an easier way is simply:
SellTrig1:= If(Close < (Close*.90),1,0);
which presents a problem...is the close ever less than 90% of itself?
maybe this would work better:
SellTrig1:= If(Close < (ref(Close,-1)*.90),1,0);
It is possible that todays close could be lower than yesterdays close.
Just some thoughts,
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, rsmiser <no_reply@xxxx> wrote:
> I'm hoping you system test guru's have an easy way to pass values
> between buy and sell systems test. At the end of my Buy test I set
> the a variable called "BuyPrice" = close. I want to add the
following
> IF statement in my sell test:
> SellTrig1 := If(close < BuyPrice * .90),1,0).......in other words
if
> the close drops 10% below the sell price then SellTrig1 is 1. The
> system tester gives me an error that it doesn't recognized the
> variable name. Any ideas or examples of successful code that does
> this would be greatly appreciated.
>
> Another system test question....is there any way to display the
> values of a variable somewhere in the system test. I realize I can
> write a function to display variable values but was trying to avoid
> writing a function everytime I wanted to see a variable value.
>
> Thanks in advance for your assistance.
>
> Regards, Russ
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|