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

[EquisMetaStock Group] Interger and Reference functions



PureBytes Links

Trading Reference Links



I have MS 8.01, EOD. I am getting an error with a formula that I don't 
understand, and thought someone might be able to put me on the correct 
path.

Lets say that I have a formula which looks like this:

Period:=Input("Periods",2,1000,100);
Perx:=(Period/4);
Price1:=Ref(C,-3*Perx)-Ref(C,-Period);
etc, etc

This works just fine in MS. However, since "Perx" may not be a whole 
number, I tried to substitute the following for line 2, above.
Perx:=Int(Period/4);

When I do this, MS will not accept the formula. The cursor stops just 
after "Ref(C, " , and the error message says that "This variable or 
expression must contain only constant data".

Clearly "Perx" is a variable no matter whether it contains Int() or 
not. What am I missing here, and how can I assure that "Perx" is 
always a whole number?

I also substituted ValueWhen () for Ref (), but got the same error 
message.

Thanks for your help,

Harry








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/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/