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

[EquisMetaStock Group] Issues with Variables



PureBytes Links

Trading Reference Links

Folks,

I have run into an annoying issue with MS I need help with. Following
Roy Larsen's example I've been able to write some date code that works
well in isolating the start and end of data to look at.

The recent issue is that I want to be able to grab a value from a date
and return that value in a variable to use in explorations.

Right now I have the code set up so that I get the expected value on
the specific date and zero otherwise. That works fine as far as plots
go, but stops me dead in my tracks when it comes to using the variable.

Here is the code such as it is:
<< ---------------

Sd:=2;
Sm:=1;
Sy:=2004;

Start:=(DayOfMonth()>=Sd AND Month()=Sm AND
Year()=Sy);

End:=(DayOfMonth()>=Sd+1 AND Month()=Sm AND
Year()=Sy);

varB:=0;
varPercent:=0;
varC:=LastValue(C);

If((Start<>End),varPercent+(100*(varC-(varB+C))/varC),0)

------------------- >>

Is there a way to isolate a variable only to the non-zero result (this
would be varPercent)? The problem seems to be near as I can tell that
I must be getting only the last value back from this instead of the
variable, and thus always zero.

In other languages this would be a snap. I'm at a loss in how to tell
MS not to stomp all over this and return the non-zero result.

Hope this was resonably clear. I want the variable back in isolation
for that date by the way to use in other calculations. It is not
necessary for it to be plotted at all really.







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> 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/